BookmarkSubscribeRSS Feed
0 Likes

Hi, we are running SAS 9.4 (TS1M7) on z/OS 2.5.
We use the FILENAME statement to allocate a concatenation of datasets under the same fileref.
The SAS limit for the number of concatenated datasets under the same fileref is 200.
(see https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hosto390/n0yrspsfthx1w5n1gyt6rgzh3qsu.htm )

Would it be possible for SAS to extend that to a larger limit in a future release please?
I think the limit has been 200 for a long time now and 200 datasets is not that many nowadays.

Thanks.

4 Comments
Tom
Super User
Super User

Perhaps, but there are work arounds. One is even mentioned in the documentation.

 

For a concatenation of members in a PDS, an asterisk (*) can be used in a wildcard file specification. The syntax 'physical-filename (*)' applies to all members of the PDS; (beg*) applies to all members or files whose names begin with beg, and (*end) applies to all files whose names end with end.

A more complete work around is to not use a concatenated fileref.  Instead store the list of files in a dataset and use the FILEVAR= option on the INFILE statement to specify which file to read and a DO Loop to read all of the lines (or records) from the file.

data filelist;
  input filename $50.;
cards;
PART1.PART2.PART3.FILEX
PART4.PART5.PART6.FILEY
;
data want;
  set filelist;
  fname=filename;
  infile dummy filevar=fname end=eof ..... ;
  do while(not eof);
      input ....;
      ....
      output;
  end;
run;

 

PS The documentation is using IBM mainframe terminology of calling a FILE a "data set".  Which should not be confused with a SAS dataset, which is a special type of file that SAS uses to store data.

 

Rob_D
Calcite | Level 5
Thanks for the suggestion. Yes unfortunately the use case we have is for sequential datasets rather than PDSs and the names of the datasets are very specific for each run, so a wildcard at the beginning or the end of the dataset name wouldn't work.
Patrick
Opal | Level 21

@Rob_D The approach @Tom suggests doesn't require any wildcards but reads one file at a time in sequence. Why is that not working for you?

Rob_D
Calcite | Level 5
Sorry, I didn't see all of Tom's post as I was just replying to the email. I'll take a look at the FILEVAR= suggestion and see if that will be of use.
Thanks.