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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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