Hi,
As you know, a warning appear when you attempt to delete a style which does not exist. There is no NOWARN option in proc template. Correct me if I'm wrong here.
So I was considering the dictionaries to find out if a style was existing before deleting it but could not find the styles created by the user in a permanent library.
libname demo '/folders/myfolders/';
proc template;
Define Style styles.demo_pdf / store=demo.blabla;
parent = styles.pearl;
*...;
run;
proc sql;
select *
from dictionary.styles
where upcase(libname)='DEMO';
quit;
Any idea what is going on here?
Regards,
@xxformat_com wrote:
Hi,
The file is created. I know it as I can see it in my folder and it appears here
proc template ;
list styles /store=demo.blabla;
run;
The question is why does it not appear in the dictionaries although it exists.
Because you have not executed a PATH statement that tells SAS to look for styles in that location.
Try this code to see what paths SAS is currently using to look for styles:
ods path show;
These are the ACTIVE template stores. The List with store as you use will show the contents of the store even when the store is not in active use.
Then try
ods path (append) demo.blabla(update);
ods path show; /* to see that it is now active)*/
and should be usable.
Look up the ODS PATH statement for setting where to read or write with Proc template and search order.
Or the Proc template PATH statement. And LIst.
proc template; path sashelp.tmplmst; list / where=(lowcase(type) = 'style' ); run;
will show the SAS supplied styles.
The Libname.memname combo in dictionary.styles is the PATH for storing the definition.
Most likely if a path was not assigned in proc template the style was written to SASUSER.TEMPLAT.
Hi,
The file is created. I know it as I can see it in my folder and it appears here
proc template ;
list styles /store=demo.blabla;
run;
The question is why does it not appear in the dictionaries although it exists.
@xxformat_com wrote:
Hi,
The file is created. I know it as I can see it in my folder and it appears here
proc template ;
list styles /store=demo.blabla;
run;
The question is why does it not appear in the dictionaries although it exists.
Because you have not executed a PATH statement that tells SAS to look for styles in that location.
Try this code to see what paths SAS is currently using to look for styles:
ods path show;
These are the ACTIVE template stores. The List with store as you use will show the contents of the store even when the store is not in active use.
Then try
ods path (append) demo.blabla(update);
ods path show; /* to see that it is now active)*/
and should be usable.
Thanks. I got it now.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.