The SAS Output Delivery System and reporting techniques

^n resolves to "new line not available for tagset"

Accepted Solution Solved
Reply
Contributor
Posts: 53
Accepted Solution

^n resolves to "new line not available for tagset"

I am using proc SGPLOT to produce scatter plots. When I attempt to use ^n to force title text to a new line, I receive the above error. What I can do to address this? I also tried a line feed command and this also failed.


Accepted Solutions
Solution
‎10-25-2013 05:26 PM
SAS Super FREQ
Posts: 8,645

Re: ^n resolves to "new line not available for tagset"

Hi:

  This code worked for me in SAS 9.4 in all 3 destinations, including the TAGSETS.RTF destination.

cynthia


ods tagsets.rtf file='c:\temp\tr_use_esc.rtf' nogtitle;
ods rtf file='c:\temp\orig_rtf_use_esc.rtf' nogtitle;
ods pdf file='c:\temp\use_esc.pdf' nogtitle;
ods escapechar='^';
 
title 'This is line 1^nThis is line 2';
proc sgplot data=sashelp.class;
vbar age / response=height stat=mean;
run;
  
ods _all_ close;


View solution in original post


All Replies
Regular Contributor
Posts: 239

Re: ^n resolves to "new line not available for tagset"

Can you include sample code that replicates your problem with a SASHELP dataset?

SAS Super FREQ
Posts: 8,645

Re: ^n resolves to "new line not available for tagset"

Hi,

  You posted this question in 2 separate forums. I answered over in the Graphics forum, but I'll make the same comment here. Even knowing that you used ^n and that it's "not working", it is hard for anyone to make a constuctive suggestion without having more information. For example, seeing your full code and understanding your ODS destination would be useful. Some ODS destinations have GTITLE (keep the title in the graph) and NOGTITLE (allow ODS to control the title) options that you can use. Generally, you would want to use NOGTITLE to allow ODS to "receive" the ESCAPECHAR. However, without more information from you, that might or might not be the problem. For example, does your destination even support NOGTITLE? What destination did you use? Where did you use the code? Why did you use ODS ESCAPECHAR instead of multiple TITLE statements.

  I suggested that you might try working with Tech Support on this question.

cynthia

BTW -- this code worked for me with ODS PDF to use ODS ESCAPECHAR.

ods _all_ close;

ods pdf file='c:\temp\use_esc.pdf' nogtitle;

ods escapechar='^';

 

title 'This is line 1^nThis is line 2';

proc sgplot data=sashelp.class;

vbar age / response=height stat=mean;

run;

  

ods pdf close;

Regular Contributor
Posts: 239

Re: ^n resolves to "new line not available for tagset"

Actually, it was tagged ODS RTF, so that explains the issue.

Doug, ODS RTF uses different line control commands.  Base SAS: ODS RTF explains in more detail.  \line gives you a new line.

Solution
‎10-25-2013 05:26 PM
SAS Super FREQ
Posts: 8,645

Re: ^n resolves to "new line not available for tagset"

Hi:

  This code worked for me in SAS 9.4 in all 3 destinations, including the TAGSETS.RTF destination.

cynthia


ods tagsets.rtf file='c:\temp\tr_use_esc.rtf' nogtitle;
ods rtf file='c:\temp\orig_rtf_use_esc.rtf' nogtitle;
ods pdf file='c:\temp\use_esc.pdf' nogtitle;
ods escapechar='^';
 
title 'This is line 1^nThis is line 2';
proc sgplot data=sashelp.class;
vbar age / response=height stat=mean;
run;
  
ods _all_ close;


Contributor
Posts: 53

Re: ^n resolves to "new line not available for tagset"

It was the absence of nogtitle that was causing the issue. It is working fine now. Thanks!

Post a Question
Discussion Stats
  • 5 replies
  • 770 views
  • 0 likes
  • 3 in conversation