BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is there any way to obtain a list of templates that exist in all template stores (such as what is provided with the LIST statement in PROC TEMPLATE), and save it to an output dataset, or capture it in a macro variable so the information could be used later in the program? So far, I could only find the LIST statement, but that only produces a listing in the output window.

Thanks in advance!!

-Phil
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
The LIST statement does create an output object. You can see the name of the output object in the SAS log (because of the ODS TRACE ON/ODS TRACE OFF). This code should create a data set for you, named WORK.TEMPLIST.

cynthia
[pre]
ods listing;
ods trace on/label;
ods output 'Template Listing'=work.templist;

proc template;
list / store=sashelp.tmplmst;
run;

ods trace off;

proc print data=work.templist;
title 'template list';
run;
[/pre]
deleted_user
Not applicable
Thanks Cynthia!! I figured that there was a way, and I had a feeling that you would know !! Thanks again!

-Phil

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 661 views
  • 1 like
  • 2 in conversation