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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 654 views
  • 0 likes
  • 2 in conversation