Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    Storing results of HOLD FILES in variables
Go
New
Search
Notify
Tools
Reply
  
Storing results of HOLD FILES in variables
 Login/Join
 
Member
posted
I have a requirement wherein I need to store the values of a column in HOLDFILE in a variable as comma separated.

Let us suppose I have a holdfile HOLDVAL.
TABLE FILE HOLDVAL
PRINT VAL
END

If the result of the above query has rows such as
ONE
TWO
THREE.
I want them in the format ONE,TWO,THREE stored in a variable.


WebFOCUS 7.6.4
Windows
Excel, HTML, PDF
 
Posts: 1 | Registered: August 20, 2009Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi

Here is some sample code.

Jodye

 
-SET &ECHO=ALL;
TABLE FILE CAR
PRINT DST.COUNTRY
ON TABLE HOLD AS CNTRIES FORMAT ALPHA
END


-RUN
-SET &MYVAR='';
-DOREAD
-READ CNTRIES &X.A10.
-IF &IORETURN NE 0 GOTO LSTREAD;
-TYPE X=&X
-SET &MYVAR=IF &MYVAR EQ '' THEN &X ELSE &MYVAR || ',' || &X;

-GOTO DOREAD;
-LSTREAD
-TYPE MYVAR=&MYVAR
-EXIT
 


WF 8.0.0.5M
 
Posts: 246 | Location: Montreal, QC, Canada | Registered: October 01, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    Storing results of HOLD FILES in variables

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.