@jcinma wrote:
I'm really liking the sound of this. But where/how do I write the list of filenames? Also, what if they're all the same but go up to 14 or something? My files are named like this:
In one instance I have something relatively basic:
julia01.txt.gz -- julia12.txt.gz
In other cases I have something more intricate like this:
jim01.file001.txt.gz -- jim01.file203.txt.gz
jim02.file001.txt.gz -- jim02.file098.txt.gz
--
jim14.file001.txt.gz -- jim14.file185.txt,gz
I would just put all of the files in a single directory that only contains those files. Then the LS command is easy to find all of the files.
Or you can just put the list as in-line data instead of executing an LS command.
....
infile cards truncover;
....
cards;
julia01.txt.gz
julia02.txt.gz
julia03.txt.gz
julia04.txt.gz
;
Or you could write a program to generate a dataset of filenames.
data files ;
length filename $200;
do i=1 to 203 ;
filename=cats('jim01.file',put(i,z3.),'.txt.gz');
output;
end;
do i=1 to 98 ;
filename=cats('jim02.file',put(i,z3.),'.txt.gz');
output;
end;
run;
And use a SET statement instead of INFILE/INPUT to drive the steps that reads the files.
... View more