Hello.
I want to know the way to catch current setting
of "ods escapechar" .
For example, when you examine the attributes of the data set,we can do it byby "PROC CONTENTS" .
I want this to "ODS escapechar".
Say,before I do "ods escapechar='^';",just I want to catch now or default setting of it.
For catch this info, I tried Google search with the words "get ods current setting sas",but it can't figure out it.
The following sites were first hit, but it was different content.
http://support.sas.com/kb/24/065.html
(Image is result of above URL's sample code, by SAS Studio)
Thank you for your cooperation
HI:
There are some ODS statements that are global in addition to ODS ESCAPECHAR (like ODS RESULTS and ODS PTITLE) and I do not believe there is a way to retrieve the current setting. That would be a question for Tech Support.
But, even if you do not know what the current value of ESCAPECHAR is, you can always use (*ESC*) and it will work no matter what ESCAPECHAR has been set to. But, I consider it a best practice to either set a standard for ESCAPECHAR (always use ^) or to have the ODS ESCAPECHAR statement explicitly appear in your code.
Try this:
ods escapechar='^';
title '1) use carat as the ^{dagger} symbol for ESCAPECHAR';
title3 '2) Use the special command as the (*ESC*){dagger} symbol for ESCAPECHAR';
proc print data=sashelp.class(obs=3);
run;
title;
footnote;
And you will get the dagger in both TITLE statements beause of using (*ESC*) while ^ was the current ESCAPECHAR in effect.
cynthia
HI:
There are some ODS statements that are global in addition to ODS ESCAPECHAR (like ODS RESULTS and ODS PTITLE) and I do not believe there is a way to retrieve the current setting. That would be a question for Tech Support.
But, even if you do not know what the current value of ESCAPECHAR is, you can always use (*ESC*) and it will work no matter what ESCAPECHAR has been set to. But, I consider it a best practice to either set a standard for ESCAPECHAR (always use ^) or to have the ODS ESCAPECHAR statement explicitly appear in your code.
Try this:
ods escapechar='^';
title '1) use carat as the ^{dagger} symbol for ESCAPECHAR';
title3 '2) Use the special command as the (*ESC*){dagger} symbol for ESCAPECHAR';
proc print data=sashelp.class(obs=3);
run;
title;
footnote;
And you will get the dagger in both TITLE statements beause of using (*ESC*) while ^ was the current ESCAPECHAR in effect.
cynthia
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.