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.
How can I get all the category and cat_desc from the item_master table and pass it to an included procedure inside a loop? I am able to pass one variable at a time as follows (is there a better way of doing it?). But I don't know how to read multiple values from the stack. Any ideas?
TABLE FILE ITEM_MASTER BY CATEGORY WHERE ( DEPT_ID EQ '23'); ON TABLE HOLD AS CAT_HLD FORMAT ALPHA END -RUN
-SET &CAT_COUNT = &LINES; -REPEAT LOOP1 FOR &CNT FROM 1 TO &CAT_COUNT; -READ CAT_HLD &TMPVAR.A8. NOCLOSE -SET &CAT_LIST.&CNT = &TMPVAR; -LOOP1 -CLOSE CAT_HLD
-REPEAT CAT_LOOP FOR &CNT FROM 1 TO &CAT_COUNT; -SET &category=&CAT_LIST.&CNT; -INCLUDE cat_details -INCLUDE cat_item_details -CAT_LOOP END
Here you go (tested on WF 528). Solution 1: Single -REPEAT
TABLE FILE CAR PRINT COUNTRY CAR ON TABLE SAVE AS CARHLD END -RUN -SET &NBR = &LINES;
-REPEAT L_LOOP1 &NBR TIMES -READ CARHLD NOCLOSE &CTR.10. &CAR.16. -*## from her this can be in -INCLUDE TABLE FILE CAR PRINT COUNTRY CAR WHERE COUNTRY EQ '&CTR' AND CAR EQ '&CAR'; END -*## until her this can be in -INCLUDE -L_LOOP1 [/code]And solution 2: Two -REPEAT [code] TABLE FILE CAR PRINT COUNTRY CAR ON TABLE SAVE AS CARHLD END -RUN -SET &NBR = &LINES;
-REPEAT L_LOOP1 FOR &IND FROM 1 TO &NBR ; -READ CARHLD NOCLOSE &CTR.&IND.10. &CAR.&IND.16. -L_LOOP1
-REPEAT L_LOOP2 FOR &IND FROM 1 TO &NBR ; -SET &WCTR = &CTR.&IND; -SET &WCAR = &CAR.&IND; -*## from her this can be in -INCLUDE TABLE FILE CAR PRINT COUNTRY CAR WHERE COUNTRY EQ '&WCTR' AND CAR EQ '&WCAR'; END -*## until her this can be in -INCLUDE -L_LOOP2
-INCLUDE just adds more code to the actual procedure. Therefore it is not a call like EX and so you cannot provide parameters with it. But as it is just an enhancement of the actual procedure, it will always know of all active DM variables. So you just have to -SET whatever you need.This message has been edited. Last edited by: <Mabel>,
Posts: 54 | Location: Switzerland | Registered: May 13, 2003