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

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