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.
This one is going to be hard to answer with the info provided. We need (I do, at least) a master file description for ITEM1. Also: Is the selection scheme (Price 1 for AA, 1 & 2 for BB, etc)chosen by the data or by you? In other words, did you decide not to print Price 2 & 3 data exist for AA, or is it not printing becuase it does not exist for AA?
Posts: 135 | Location: Portland, OR | Registered: March 23, 2005
Actually, I knew the PRICE1, PRICE2 & PRICE3 are existed for ITEM AA, BB & CC. But I do want to print the report will be look like my posted question above!
Ringo, could you post the Master File Description (.MAS). Are price1 price2 and price3 seperate fields or are they the same column but have a field that tell you they are price1, price2, price3.
Have you heard of the McGuyver Technique. and print multiple rows from 1 record. you could define price to = price1 when counter eq 1 or price2 when counter eq 2 or price3 when counter eq 3. If you have tech support you could search for mcguyver.
SET ASNAMES = ON; -* ITEM AA TABLE FILE CAR SUM ITEM PRICE1 AS 'PRICE' BY THEMONTH WHERE ITEM EQ 'AA' ON TABLE HOLD AS H0 FORMAT ALPHA END
-* ITEM BB TABLE FILE CAR SUM ITEM PRICE1 AS 'PRICE' BY THEMONTH WHERE ITEM EQ 'BB' ON TABLE HOLD AS H1 FORMAT ALPHA END
TABLE FILE CAR SUM ITEM PRICE2 AS 'PRICE' BY THEMONTH WHERE ITEM EQ 'BB' ON TABLE HOLD AS H2 FORMAT ALPHA END
-* ITEM CC TABLE FILE CAR SUM ITEM PRICE1 AS 'PRICE' BY THEMONTH WHERE ITEM EQ 'BB' ON TABLE HOLD AS H3 FORMAT ALPHA END
TABLE FILE CAR SUM ITEM PRICE2 AS 'PRICE' BY THEMONTH WHERE ITEM EQ 'BB' ON TABLE HOLD AS H4 FORMAT ALPHA END
TABLE FILE CAR SUM ITEM PRICE3 AS 'PRICE' BY THEMONTH WHERE ITEM EQ 'BB' ON TABLE HOLD AS H5 FORMAT ALPHA END
-* FINAL OUTPUT TABLE FILE H0 PRINT PRICE BY ITEM ACROSS THEMONTH MORE FILE H1 MORE FILE H2 MORE FILE H3 MORE FILE H4 MORE FILE H5 ENDThis message has been edited. Last edited by: <Mabel>,
Posts: 406 | Location: Canada | Registered: May 31, 2004
For Jack: I cannot access the link since I don't have User ID and Password.
For Curtis: It seems work. But, I don't want to hardcode the ITEM field for 'AA, BB, CC'. I have over two hundred records. If using this way, I need to hold hundred tables.
CREATE FILE ITEMCREF -RUN MODIFY FILE ITEMCREF FIXFORM ITEMCRF/10 MATCH ITEMCRF ON MATCH INCLUDE ON NOMATCH INCLUDE DATA AA PRICE1 AA PRICE2 BB PRICE1 CC PRICE1 CC PRICE2 CC PRICE3 END -RUN
Create a master as follows to use with the hold file that will be created (note you might have to adjust the ACTUAL because the master for the data file I used may not match yours
TABLE FILE PRICEFILE SUM PRICE1 OVER PRICE2 OVER PRICE3 ACROSS THEMONTH BY ITEM ON TABLE HOLD AS R1 FORMAT WP END -RUN
Join the wp hold file to your cross-reference file and simply print the report (You must reference the field in the cross-reference file for short pathing to eliminate those rows you do not want.)
SET ALL=OFF JOIN ITEMCRF WITH ITEM IN R1 TO ALL ITEMCRF IN ITEMCREF TAG T2 AS J1 DEFINE FILE R1 ITEMR/A4=IF ITEM EQ ' ' THEN LAST ITEMR ELSE ITEM; ITEMCRF/A10= ITEMR | PRICECOL; END TABLE FILE R1 PRINT ITEM PRICECOL T2.ITEMCRF NOPRINT MTH1 AS '01' MTH2 AS '02' MTH3 AS '03' MTH4 AS '04' MTH5 AS '05' MTH6 AS '06' MTH7 AS '07' MTH8 AS '08' MTH9 AS '09' MTH10 AS '10' MTH11 AS '11' MTH12 AS '12' END