Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Variable VSAM files
 Login/Join
 
Member
posted
I am having trouble trying to figure out how to do a simple Core Focus report displaying data from a variable portion of a VSAM file. I cannot find anything on how to do this in the Focus documentation. The variable portion is in an 'OCCURS DEPENDING ON' area. I only want to list the first 5 occurences something like this:

Store Dept1 Dept2 Dept3 Dept4 Dept5
xxx 111 222 333 444 555

The MFD is set up with an occurs with a variable as the number associated with the occurs.

Can anyone help? Confused

Thanks,
Jackie
 
Posts: 19 | Location: Little Rock, AR | Registered: July 21, 2003Report This Post
<Joseph Coule>
posted
Hi, Jackie,

A VSAM file with a segment described with OCCURS is exactly like a child segment in a FOCUS DB (or any other kind of DB for that matter). You're creating a logical hierarchy where the segment where STORE is located is the parent segment of the segment where DEPT is located. So FOCUS will treat each instance of DEPT as a separate record and, by default, will print each record on a separate line. So the question is really how can you get FOCUS to print 5 records on one line.

For this you'll probably need to use the McGuyver technique that is documented on the Tech Support web site so you can "flatten" out the records. But a simpler solution may be to create an alternate Master File Description to read the data for this particular report. This will only work if "DEPT" has at least 5 instances in each record. If you do not know this to be true, then don't try this.

Basically, what you would do is create a new Master file where you move the fields that are in the OCCURS=FIELDNAME segment up to the end of the parent segment and list these five times. If the only field in that segment is DEPT, then this is simple, just list DEPT 5 times, with different fieldnames (e.g., DEPT1, DEPT2, DEPT3, DEPT4, DEPT5), then follow this immediately with the existing child segment defined with OCCURS=VARIABLE (instead of OCCURS=FIELDNAME). This will allow FOCUS to keep reading the variable portion of the record, which you do not need for this particular report.

IF you can't create your own MFD, or if you're not sure that there are at least 5 instances of DEPT for each record, then you'd be best off going with the McGuyver technique which others on the board couple probably help you with more than I. But the fact that it's a VSAM file is not relevant to the reporting aspect of the question.

Hope that helps.

JC
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders