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
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.