Page 1 of 1

Sort Card to Extract data from a PDS Member

PostPosted: Sun Dec 09, 2012 12:27 pm
by rtammire
Hi All,

Can anyone please let me know is it possible to get belolw details by using a sort card?

I want to extract data from various files but the file names are not constant. File names will vary based on requirement

is it possible to give all the file names in a PDS meber and extract required data?

Please find below the my requirement details

File1 - FB REc Length 100
File2 - FB REc Length 100
File3 - FB REc Length 100
File4 - FB REc Length 100
File5 - FB REc Length 100

I need to extract data from above files based on the requirement. But which day which file i need to refer is not a constant.

On DAY1 based on previous job return code i may have to refer only FILE1 FILE2 FILE3

On DAY2 based on previous job return code i may have to refer only FILE3 FILE4 FILE5

On DAY3 based on previous job return code i may have to refer only FILE1 FILE2 FILE3

I have PDS memebr which has all the required files in it. So is it possible to give all the file names in a PDS member and extract required data from the files?

Ex:
USERID.MY.PDS(INPUTFIL) ---> This member will have all the list of files

FILE1
FILE2
FILE3

Could you please let me know is it possible to get data from various files.

Thanks is advance

Re: Sort Card to Extract data from a PDS Member

PostPosted: Sun Dec 09, 2012 3:20 pm
by NicC
Yes, it is possible. Which is what you asked for but you are expecting more so here goes...your files have to be be allocated to SORTIN before the step starts - ie they must be in the JCL. You could use a program to extract the file names to be used and generate a job to do the sort but this may not be allowed in production. You could do similar but only create a JCL INCLUDE member for the sort step - but he sort still has to be a separate job but, at least, it will be under the control of your scheduler. Or, you could figure out a way to copy the required files to another file which would be used by the sort step.

Re: Sort Card to Extract data from a PDS Member

PostPosted: Sun Dec 09, 2012 3:24 pm
by BillyBoyo
Is the list of file/dataset names "static", ie except for maintenance, is the list always the same?

Re: Sort Card to Extract data from a PDS Member

PostPosted: Mon Dec 10, 2012 10:28 pm
by Ed Goodman
Maybe it would be better to use IDCAMS? It has a REPRO command that takes file names.