BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
xxformat_com
Barite | Level 11

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,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@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.

View solution in original post

4 REPLIES 4
ballardw
Super User

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.

xxformat_com
Barite | Level 11

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.

ballardw
Super User

@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.

SAS Innovate 2025: Register 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!

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
  • 977 views
  • 0 likes
  • 2 in conversation