Focal Point
[SOLVED]concatenating an apostrophe to a string

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

February 22, 2019, 01:01 PM
Trudy
[SOLVED]concatenating an apostrophe to a string
I can't get the synatax right for adding an apostrophe in front of a string. I've tried the two scenarios below but get the same results for both

 
-SET &GRAD = 'COMPUTE GRAD/A6 = IF J7.SEG01.gradtermint NE MISSING THEN '|''|'gradtermint ELSE '|''|'EDIT(DEANHLD.SEG01.gradint);';


PRINT
     &GRAD
     COMPUTE GRAD2/A6 = IF J7.SEG01.gradtermint NE MISSING THEN ''|gradtermint ELSE ''|EDIT(DEANHLD.SEG01.gradint);
 


The results for both GRAD and GRAD2 are
19

when I want
'19

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


WF8
Windows
February 22, 2019, 01:30 PM
jfr99
Does this help?

-*
-SET &VAR1 = '19';
-SET &VAR2 = '''' | &VAR1;
-*
-TYPE VAR1 ------ &VAR1
-TYPE VAR2 ------ &VAR2
-EXIT



WebFocus 8.201M, Windows, App Studio
February 22, 2019, 01:47 PM
Trudy
That doesn't actually display the ' before the number. I still am displaying only 19 not '19. I've tried outputing this to HTML and XLSX


WF8
Windows
February 22, 2019, 01:51 PM
jfr99
What about this?

TABLE FILE CAR
PRINT
CAR
COMPUTE CAR1/A20 = '''' | CAR;
BY COUNTRY
END



WebFocus 8.201M, Windows, App Studio
February 22, 2019, 01:52 PM
jfr99
My first example gives me this ...

VAR1 ------ 19
VAR2 ------ '19

Did you not get that?


WebFocus 8.201M, Windows, App Studio
February 22, 2019, 02:36 PM
Trudy
The COMPUTE worked but the SET did not.

Thanks!


WF8
Windows