Look man, this is all a little heavyweight for me right here.
But this is what I might do.
Input the raw file into SAS
Libname <saslibrary 'address';
data saslibrary.filename1;
infile 'raw file address';
input var1 var2 var3.......varn;
run;
data saslibrary.filename2;
set saslibrary.filename1;
where industry in ('industry1, industry2,.....industry n);
run;
data saslibrary.filename2;
<perform your calculation, need to refer to an accounting book;
run;
proc tscsreg data=saslibrary.filename2; #(Use tscsreg since its panel data data is over 10 years for )
model y= var1 var2 .....varn; each month I believe)
run;
as far as writing macros in concerned im still in the process of learning it, so don't wanna make a fool of myself just yet. Can you please help me out!