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

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.

 

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