DATA Step, Macro, Functions and more

Permanent styles created by user not available in dictionary.styles

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

Permanent styles created by user not available in dictionary.styles

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,

 

 


Accepted Solutions
Solution
‎03-28-2018 01:30 AM
Super User
Posts: 13,046

Re: Permanent styles created by user not available in dictionary.styles

Posted in reply to xxformat_com

@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


All Replies
Super User
Posts: 13,046

Re: Permanent styles created by user not available in dictionary.styles

Posted in reply to xxformat_com

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.

Occasional Contributor
Posts: 7

Re: Permanent styles created by user not available in dictionary.styles

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.

Solution
‎03-28-2018 01:30 AM
Super User
Posts: 13,046

Re: Permanent styles created by user not available in dictionary.styles

Posted in reply to xxformat_com

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

Occasional Contributor
Posts: 7

Re: Permanent styles created by user not available in dictionary.styles

Thanks. I got it now.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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