BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I want the string variable fstring1 to be:

'[select("r1c1:r10c1")]'. All quotation marks belong to the string.

The numeric variable lastrow has the value 10.

This expression doesn't work:

fstring1="'[select("r1c1:r" || strip(put(lastrow,3.0)) || "c1")]'".

In the expression I am trying to concatenate the 3 strings:

'[select("r1c1:r

strip(put(lastrow,3.0))

c1")]'.

Any suggestions?
1 REPLY 1
DanielSantos
Barite | Level 11
Try this:
[pre]
"[select(""r1c1:r" || strip(put(lastrow,3.0)) || "c1"")]"
[/pre]
Double every double quotes you wish to be represented within the string.

Same rule applies for sinqle quotes.

Cheers from Portugal.

Daniel Santos @ www.cgd.pt
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 877 views
  • 0 likes
  • 2 in conversation