Focal Point
comma in -READ variable value

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1801017942

October 02, 2007, 02:20 AM
Abhi
comma in -READ variable value
i am reading some column value in a variable of PDF report:
-READ HOLDTBL &COL1.A20;

The string value from COL1, which I am saving is: AA,BB,CC

But when i print the variable value, it shows only 'AA'. I changed the comma using ASCII char &|#44, but in PDF it prints same '&|#44' in place of comma. How to show complete string as 'AA,BB,CC'?



WebFOCUS Versions using 7.1; Platform: Windows XP; Output Format: PDF.
October 02, 2007, 03:13 AM
FrankDutch
Abhi

What is the script you use to create the HOLD file? (please post it)
The string has 3 fields? so you want to read these 3 fields in separate variables?

If so change the command into

-READ HOLDTBL, &COL1 &COL2 &COL3

The comma after holdtbl indicates it is a comma delimited file.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

October 02, 2007, 03:33 AM
Abhi
These are not three fields. This is single string value reading from single column.

This message has been edited. Last edited by: Abhi,



WebFOCUS Versions using 7.1; Platform: Windows XP; Output Format: PDF.
October 02, 2007, 06:15 AM
GamP
Abhi,

If I run the following code:
FILEDEF IN DISK IN.TXT (LRECL 20 RECFM V
-RUN
-WRITE IN AA,BB,CC,DD
-WRITE IN So this is text
-RUN
-READ IN &COL.20
-TYPE &COL
-READ IN &COL.20
-TYPE &COL

Then the result is exactly as I expect:
AA,BB,CC,DD
So this is text

Please include your code so we can see what's wrong, because your short descriptiuon of the problem is not enough to go on.

GamP


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
October 03, 2007, 11:22 AM
ihf
GamP, FrankDutch has right approach (hope you dont mind Frank). Read it in as comma delimited like he said and add the line following his:
-READ HOLDTBL, &COL1 &COL2 &COL3
-SET ALLTHREE = &COL1||','||&COL2||','||&COL3 ;
YOU SHOULD SEE THE VALUES OF ALL THEEE SEPARATED BY COMMAS. YOU CAN CONTROL SPACING IN THERE USING PARENS AND WEAK CONCATENATION.