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.
TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD FORMAT ALPHA
END
-*
TABLE FILE HOLDFILE
PRINT COUNTRY
WHERE RECORDLIMIT EQ 3
ON TABLE HOLD AS CHOLD
END
-*
TABLE FILE YOURFILE
PRINT FIELDS
WHERE COUNTRYFIELD IN FILE CHOLD
END
I like Glenda's solution. However, couldn't you eliminate one hold file, as follows:
TABLE FILE CAR PRINT COUNTRY ON TABLE HOLD FORMAT ALPHA WHERE RECORDLIMIT EQ 3 ON TABLE HOLD AS COUNTRY END -RUN TABLE FILE YOURFILE PRINT FIELDS WHERE COUNTRYFIELD IN FILE COUNTRY END
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
TABLEF FILE CAR
LIST COUNTRY
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
TABLE FILE HOLD1
"HOLD1:"
PRINT *
END
-RUN
TABLE FILE HOLD1
PRINT COUNTRY
IF LIST FROM 4 TO 5
ON TABLE HOLD AS HOLD2
END
-RUN
TABLE FILE HOLD2
"HOLD2:"
PRINT *
END
-RUN
TABLE FILE CAR
PRINT SEG.MODEL
BY COUNTRY
BY CAR
WHERE COUNTRY IN FILE HOLD2;
END
The LIST verb in the first HOLD request adds a column called LIST to its output, which the WHERE in the second HOLD request references in order to pull the desired instances.This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
You can use &LINES in your -REPEAT statement which will loop through the -REPEAT as many times as there are &LINEs. The WHERE statement in your initial TABLE FILE CAR can be used as your selection criteria to only get those countries which you desire.
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
-* File tomsweb.fex
-SET &ECHO=ALL;
-DEFAULT &F=3, &T=4
DEFINE FILE CAR
-* Number the countries
L/I1 WITH COUNTRY = 1+LAST L;
AL/A1=EDIT(L);
-* Create DM variables
DMCOUNTRY/A30 = '-SET &|COUNTRY' | AL | ' = ''' | COUNTRY || ''';';
END
-RUN
-* Save the DM variables in a fex
FILEDEF CSET DISK CSET.FEX
TABLE FILE CAR
PRINT DMCOUNTRY
ON TABLE SAVE AS CSET
END
-RUN
-* Include the variables in the procedure
-INCLUDE CSET
TABLE FILE CAR
PRINT SALES
BY COUNTRY BY BODYTYPE
WHERE COUNTRY IN (
-* Use the variables that you want, here the 3rd and the 4th
-REPEAT #W FOR &I FROM &F TO &T;
'&COUNTRY.&I'
-#W
);
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006