Hi All, I am trying to create macro variables for the file names from a SAS data set.The dataset lists the File names from a Unix directory in order to create datasets by reading the files. I have listed all the files from a directory, but the Sas dataset looks something like this. Data Set file: Filename ABC.txt xyz.txt Def.txt wht.txt——————————————- Tyua.txt egg.txt Dder.txt hiy.txt ——————————————- Sret.txt Amy.txt vgu.txt uil.txt ——————————————— The Macro Variables are only created for the first observation and not for the other observations in the dataset. The variables are only created for the first observation. Even after I have tried to loop on the count of the table. I have tried taking the countW, Length of the macro variables. Proc sql; Select count(*) into :Recs from filenames: Quit; Proc sql; Select filenames into: fnme from filenames; Quit; I have tried looping the Scan for both the counts mentioned above. Please Suggest!
... View more