Usage Note 23456: How can I copy an entire ODS style or tagset directory to another location?
Use a macro along with PROC TEMPLATE. Use the ODS OUTPUT statement
along with the STATS output object to create an output data
set from PROC TEMPLATE with the LIST statement. The LIST statement
specifies the directory that we want to copy from, which is Style in
this example. The PROC SQL step creates a macro variable from each
template within this directory. The last step creates the location
where we want to store the templates by using the ODS PATH statement. In
this example, the templates are stored in the work library.
%macro test;
ods path sasuser.templat sashelp.tmplmst;
ods output stats(match_all=mac)=temp;
proc template;
list styles;
run;
proc sql;
proc sql noprint;
select count(path) into :last
from temp;
/* Create macro variables VAL1 to VAL/. The ending range */
/* range gets stored in the macro variable last */
select path into: val1- :val%left(&last)
from temp;
run;
quit;
ods path(prepend) work.template(update);
proc template;
%do i=1 %to &last;
%if %index(&&val&i,.) > 0 %then %do;
edit
&&val&i;
end;
%end;
%end;
run;
%mend;
%test
See also the full PROC TEMPLATE FAQ and Concepts.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Usage Note |
| Priority: | low |
| Topic: | SAS Reference ==> ODS (Output Delivery System) Data Management ==> Administration
|
| Date Modified: | 2007-10-04 14:38:06 |
| Date Created: | 2003-10-07 08:33:39 |