BookmarkSubscribeRSS Feed
thanikondharish
Fluorite | Level 6

ods escapechar='^' ;

title '^demographic^details' ;

proc report data=sashelp.class nowd;

column name sex age height; run;

 

I want to create 2 titles with single statement .I have tried above program but it is not working. 

 

4 REPLIES 4
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13
ods escapechar='^' ;
title '^demographic^details' ;
title2 'my second title line'
proc report data=sashelp.class nowd;
column name sex age height; run;
ballardw
Super User

@thanikondharish wrote:

ods escapechar='^' ;

title '^demographic^details' ;

proc report data=sashelp.class nowd;

column name sex age height; run;

 

I want to create 2 titles with single statement .I have tried above program but it is not working. 

 


Escapechar to have any effect is going to need a function or style element in some.

Perhaps you are looking for

 

ods escapechar='^' ;

title 'demographic^{newline}details' ;

proc report data=sashelp.class nowd;

column name sex age height; run;
Reeza
Super User

@thanikondharish wrote:

ods escapechar='^' ;

title '^demographic^details' ;

proc report data=sashelp.class nowd;

column name sex age height; run;

 

I want to create 2 titles with single statement .I have tried above program but it is not working. 

 


Depends on the output destination.

Cynthia_sas
Diamond | Level 26

Hi:
Your program above is not correct. you need more than just the ^ ESCAPECHAR you need the NEWLINE function:
title 'demographic^{newline 1}details' ;

But, also, this will work in RTF, PDF and HTML. Will not work in CSV, ODS EXCEL or ODS TAGSETS.EXCLEXP. So it really depends on your destination of interest, which you did NOT show. The ^ by itself is NOT a newline or line feed or carriage return instruction.

Cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 4 replies
  • 1264 views
  • 0 likes
  • 5 in conversation