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.
I am trying to learn the Macguyver Technique and I am following the instructions from the Noreen Redden article. I have created the FSEQ.MAS as follows:
Then I created the FEX that creates the 79 records as follows:
-SET &ECHO=ALL; FILEDEF FSEQ DISK /ffosrdmmk1/app/ibi/apps/ibisamp/fseq.mas -RUN CREATE FILE FSEQ -DEFAULT &HOWMANY=79; MODIFY FILE FSEQ COMPUTE CTR/I9=; FIXFORM &HOWMANY(CTR/4 X-4) COMPUTE BLANK = ' '; COMPUTE COUNTER=IF COUNTER EQ 0 THEN CTR ELSE COUNTER + 1; MATCH BLANK ON MATCH CONTINUE ON MATCH INCLUDE MATCH COUNTER ON MATCH CONTINUE ON NOMATCH INCLUDE DATA 1 END -RUN JOIN BLANK WITH BODYTYPE IN CAR TO BLANK IN FSEQ AS AJ DEFINE FILE CAR BLANK/A1 WITH BODYTYPE = ' '; END -RUN TABLE FILE CAR PRINT COUNTRY CAR MODEL BODYTYPE COUNTER END -RUN
Upon doing this I do not get 79 records for each of the input CAR file records, but rather 21 records for each of the input CAR file records.
When I view the messages generated I saw this:
0 WARNING.. ON MATCH INCLUDE INPUTS DUPLICATE SEGMENTS (FOC415) TRANS 1 REJECTED NOMATCH SEG1 1 (FOC415) TRANS 2 REJECTED NOMATCH SEG1 repeated numerous times.... (FOC415) TRANS 78 REJECTED NOMATCH SEG1 (FOC415) TRANS 79 REJECTED NOMATCH SEG1 0 TRANSACTIONS: TOTAL = 79 ACCEPTED= 0 REJECTED= 79 SEGMENTS: INPUT = 0 UPDATED = 0 DELETED = 0
And When I table against CAR displaying the value of COUNTER I get every record printed 21 times with the COUNTER varying from 1 to 21.
How can I fix this process, so that I can get the 79 records for every 1 input CAR records, that the MacGyver Technique says should occur?
Posts: 62 | Location: New York City | Registered: December 29, 2004
We were never allowed to use modify, so I came up with my own routine that worked. I used the following as an example, DEFINE FILE GGORDER BLANK/A1 WITH ORDER_NUMBER = ' '; COUNT/I1 WITH ORDER_NUMBER = 1; END TABLE FILE GGORDER PRINT COMPUTE COUNTER/I2 = COUNT + COUNTER; BY BLANK ON TABLE HOLD AS FSEQ FORMAT FOCUS INDEX BLANK IF RECORDLIMIT EQ 79 END JOIN BLANK WITH MODEL IN CAR TO ALL BLANK IN FSEQ DEFINE FILE CAR BLANK /A1 WITH MODEL = ' '; END TABLE FILE CAR PRINT COUNTER MODEL END
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
We ran into this peculiarity a few years ago when we moved from IBM VM to unix. VM always used 80-character .mas files. Unix doesn't.
The length of 21 that you're seeing is the number of characters in the first line of the .mas file.
What I did was just add a bunch of spaces to the first line, ending with a comma (legal, but not necessary in the first line of a .mas file) to get the number of repeats I wanted.
Suzy
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003
The Fseq master describes not a focus file (suffix=fix) but a flat file that is 80 bytes long with a blank in the first byte. You do not need a modify procedure to create this file. Any flat file that is 80 bytes long with a blank in the first position will do. Allocate this file with fseq ddname and it should work.
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004
Thanks to all that helped solve this problem. Special thanks to Leah, who had a simple solution. Leah's approach eliminates the need to create a FSEQ master, allocate it, and create a MODIFY procedure.
I modified Leah's fex slightly, to better match the original example given by Noreen Reeden. Since Noreen's article was written 11 years ago, I think the example should be updated.
Heres the code I'm now using:
-** Use any arbitrary database that has at least N number of records -** to table against. Define an empty field (BLANK), and the starting -** count field (COUNT) -** DEFINE FILE GGORDER BLANK/A1 WITH ORDER_NUMBER = ' '; COUNT/I1 WITH ORDER_NUMBER = 1; END -** -** Create a HOLD file with the N number of records you wish to create. -** Within the HOLD file create the COUNTER field that will go from 1 to N. -** This will be a dummy HOLD database that you can use to create an equal -** number of duplicate records from your reporting database -** TABLE FILE GGORDER PRINT COMPUTE COUNTER/I2 = COUNT + COUNTER; BY BLANK ON TABLE HOLD AS MAC FORMAT FOCUS INDEX BLANK IF RECORDLIMIT EQ 79 END -** -** Join from your reporting database to the the dummy HOLD database -** You can now evaluate the COUNTER field in the dummy HOLD database -** to print out from 1 to N number of duplicate records. -** JOIN BLANK WITH BODYTYPE IN CAR TO ALL BLANK IN MAC DEFINE FILE CAR BLANK /A1 WITH BODYTYPE = ' '; END
TABLE FILE CAR PRINT COUNTRY CAR MODEL BODYTYPE COUNTER END
Posts: 62 | Location: New York City | Registered: December 29, 2004