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 would like for some to share ideas on how to loop through a hold file....read the 1st record, loop through to the next record and read it to another amper variable, and so forth. If anyone could share some examples, I'd appreciate it. I have an idea of using a -READ and a loop and counter. However, I would like to see some other ideas shared.
ThanksThis message has been edited. Last edited by: Kerry,
You could use -READFILE with a -REPEAT loop. You can jettison the indexed variables if not needed.
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS CARHOLD
END
-RUN
-*
-REPEAT :ENDREPEAT1 FOR &I FROM 1 TO &LINES
-READFILE CARHOLD
-SET &COUNTRY.&I = &COUNTRY ;
-SET &CAR.&I = &CAR ;
-SET &MODEL.&I = &MODEL ;
-SET &RETAIL_COST.&I = &RETAIL_COST ;
-TYPE &COUNTRY.&I &CAR.&I &MODEL.&I &RETAIL_COST.&I
-:ENDREPEAT1
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
ON TABLE HOLD AS CARHOLD FORMAT ALPHA otherwise you're reading binary stuff
-READ NOCLOSE CARHOLD &something.A100 Using NOCLOSE allows you to go do stuff with the &vars you bring in, and then return to the top of the loop, otherwise you're reading the same record over and over and o....
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
While HOLD FORMAT ALPHA or SAVE is necessary for reading numeric values with -READ, I don't believe this is necessary for -READFILE because the master is used to read/format the data.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
[SOLVED]Originally posted by MCKELPA99: I would like for some to share ideas on how to loop through a hold file....read the 1st record, loop through to the next record and read it to another amper variable, and so forth. If anyone could share some examples, I'd appreciate it. I have an idea of using a -READ and a loop and counter. However, I would like to see some other ideas shared.
Originally posted by Dan Satchell: You could use -READFILE with a -REPEAT loop. You can jettison the indexed variables if not needed.
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS CARHOLD
END
-RUN
-*
-REPEAT :ENDREPEAT1 FOR &I FROM 1 TO &LINES
-READFILE CARHOLD
-SET &COUNTRY.&I = &COUNTRY ;
-SET &CAR.&I = &CAR ;
-SET &MODEL.&I = &MODEL ;
-SET &RETAIL_COST.&I = &RETAIL_COST ;
-TYPE &COUNTRY.&I &CAR.&I &MODEL.&I &RETAIL_COST.&I
-:ENDREPEAT1
I am working on a similar case. I need to use the &RETAIL_COST.&I in the javascript. How can i do that?Please help me out.