Focal Point Banner


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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]concatenating an apostrophe to a string

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]concatenating an apostrophe to a string
 Login/Join
 
Platinum Member
posted
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
 
Posts: 117 | Registered: May 28, 2015Report This Post
Platinum Member
posted Hide Post
Does this help?

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


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Platinum Member
posted Hide Post
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
 
Posts: 117 | Registered: May 28, 2015Report This Post
Platinum Member
posted Hide Post
What about this?

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


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Platinum Member
posted Hide Post
My first example gives me this ...

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

Did you not get that?


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Platinum Member
posted Hide Post
The COMPUTE worked but the SET did not.

Thanks!


WF8
Windows
 
Posts: 117 | Registered: May 28, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]concatenating an apostrophe to a string

Copyright © 1996-2020 Information Builders