Hello everyone,    I'm trying to read all the members of a z/OS PDS to store them in SAS Datasets (or to write them in another files). I'm working on a SEG Unix session (SAS Enterprise Guide 4.1 (4.1.0.1020)) and I access to the PDS through a FILENAME FTP statement with the DIR option.    The DOPEN and DNUM functions don't work, I guess it's because a Unix session can't read z/OS file attributes...    Here is how I managed to do what I want, but not in a perfect way :    /* Filename of the z/OS PDS */  filename pds ftp "'MP01.CTXPDBPX.MTXTPRM2'" mach = "vpbe0000" lrecl = 80 recfm = F dir;    /* Reading of every file corresponding to the combination of P1XXXijk (P1XXX00A, P1XXX00B...) */  data _null_;    do i = 0 to 9;      do j = 0 to 9;        do k = 'A','B','C','D','E','F','G','H','I','J','K','L','M',               'N','O','P','Q','R','S','T','U','V','W','X','Y','Z';          fic = 'P1XXX' !! strip(i) !! strip(j) !! strip(k);          call execute('data tbl_' !! strip(fic) !! ';');          call execute('infile pds(' !! strip(fic) !! ');');          call execute('input ligne $EBCDIC80.;');          call execute('run;');        end;      end;    end;  run;    Obviously, if the file does not exist (which has 90% probability to happen), an error is displayed and it takes quite a long time for the program to test every combination of file names :    NOTE: CALL EXECUTE generated line.  1         + data tbl_P1XXX00A;  2         + infile pds(P1XXX00A);  3         + input ligne $EBCDIC80.;  4         + put ligne;  5         + run;  NOTE: DATA statement used (Total process time):        real time           1.00 seconds        cpu time            0.01 seconds          NOTE: 220-FTPD1 IBM FTP CS V1R11 at VPBE0000, 08:39:19 on 2012-07-10.  ERROR: Physical file does not exist, P1XXX00A.  NOTE: The SAS System stopped processing this step because of errors.  WARNING: The data set WORK.TBL_P1XXX00A may be incomplete.  When this step was stopped there were 0 observations and 1 variables.  WARNING: Data set WORK.TBL_P1XXX00A was not replaced because this step was stopped.    If someone could help me, either telling me how to list all the members of a PDS, either telling me how to test if the PDS member exists, I would be very thankful to this person ! 😉    Sincerely yours,    Anthony   
						
					
					... View more