BookmarkSubscribeRSS Feed
kovamk
Calcite | Level 5

Hi, I need Carriage Return help please. 

I'm running a SAS program that puts data into an Excel Template. I query a SQL table, use RETAIN, and then LABEL the data. All of this works as intended and has for years. What I need now is to get this one particular LABEL to incorporate a Carriage Return so the words in parenthesis "(Display)" are put on the second line of the Excel Cell.

 

Section of Current Code:  

LABEL HEDIS_COLON_GAP         ='Colorectal Cancer Screening (Display)'      ;

 

I tried this but it didn't work:  

LABEL HEDIS_COLON_GAP         ='Colorectal Cancer Screening' ||'0D'x || '(Display)'      ;

 

Thanks,

Mike

1 REPLY 1
data_null__
Jade | Level 19

The label statement is not like the assignment statement, but it does have an implied concatenation.

 

37   data test;
38       HEDIS_COLON_GAP=1;
39       LABEL HEDIS_COLON_GAP ='Colorectal Cancer Screening' '0D'x '(Display)';
40       label=vlabel(HEDIS_COLON_GAP);
41       put label=$hex60.;
42       run;

label=436F6C6F72656374616C2043616E6365722053637265656E696E67200D20
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
  • 957 views
  • 0 likes
  • 2 in conversation