Another Approach. data WORK.HAVE;
infile datalines dsd truncover;
input ID:32. Company:$9. Period_End_Date:MMDDYY8. Q4_Amount:32. Q3_Amount:32. Q2_Amount:32. Q1_Amount:32. Q4_Filing_Date:MMDDYY8. Q3_Filing_Date:MMDDYY8. Q2_Filing_Date:MMDDYY8. Q1_Filing_Date:MMDDYY8. First_Date:MMDDYY8.;
format Period_End_Date MMDDYY8. Q4_Filing_Date MMDDYY8. Q3_Filing_Date MMDDYY8. Q2_Filing_Date MMDDYY8. Q1_Filing_Date MMDDYY8. First_Date MMDDYY8.;
datalines4;
1360442,MICROSOFT,12/31/14,-13070346,0,0,0,04/15/15,11/19/14,08/19/14,05/19/14,04/15/15
;;;;
run;
proc transpose data =have out=temp;
by ID Company Period_End_Date First_Date;
var Q1_Amount Q2_Amount Q3_Amount Q4_Amount Q1_Filing_Date Q2_Filing_Date Q3_Filing_Date Q4_Filing_Date;
run;
data want(rename=(col1=Amount) drop=_name_);
format Filing_Date MMDDYY8.;
set temp(obs=4) ;
set temp(firstobs=5 keep=col1 rename=(col1=Filing_Date));
Qurater=substr(_name_,2,1);
run;
... View more