The SAS Output Delivery System and reporting techniques

Outputting list of templates to a dataset

Reply
N/A
Posts: 0

Outputting list of templates to a dataset

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
SAS Super FREQ
Posts: 8,866

Re: Outputting list of templates to a dataset

Posted in reply to deleted_user
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]
N/A
Posts: 0

Re: Outputting list of templates to a dataset

Posted in reply to deleted_user
Thanks Cynthia!! I figured that there was a way, and I had a feeling that you would know !! Thanks again!

-Phil
Ask a Question
Discussion stats
  • 2 replies
  • 115 views
  • 0 likes
  • 2 in conversation