05-14-2012 11:00 AM
I have a dataset that looks like this:
where cbg is a unique identifier tru is an array with a label that identifies its monthly date.
i want to pull the data together into quarters, so i want every 3rd column for tru1-tru100.
i was thinking about transposing and then using the mod function.
05-14-2012 11:17 AM
length cbg tru1-tru100 8;
proc sql noprint;
select name into :names separated by ' '
05-14-2012 11:23 AM
array q(*) q1-q30;
do _n_=1 to dim(q);
keep id %do i=3 %to 30 %by 3;
proc contents data=want;run;
05-14-2012 12:28 PM
What LinLin has used is not a regular 'do loop', instead, it was a Macro loop, which, for one, you can only use it inside a macro; for two, you can literally put it any where inside macro. Its purpose is nothing but to render a 'text string'.