|
> From: Dea Talu [mailto:deatalu@HOTMAIL.COM]
> Is it possible to merge all these datasets in one data-step?
> I am basically trying to improve the efficiency of the
> program. Thank you,
yes
data n_4001;
do until(EndoFile);
merge forecast (in=a)
n_4001 n_4002 n_4003 n_4004 n_4005 n_4006 n_4007 n_4008
end = EndoFile;
by day;
if a then output;
end;stop;
run;
your next question will be:
"How do I get the list of data sets N_*
into a macro variable?"
PROC Sql;select Name
into :List
separated by ' '
from Dictionary.Tables
where LibName eq 'WORK'
and substr(Name,1,2) eq 'n_'
;quit;
merge forecast (in=a)
&List.
end = EndoFile;
Ron Fehd the SQL into:macro maven CDC Atlanta GA USA RJF2@cdc.gov
keywords: list processing, dynamic coding
|