Page 2 of 2

Re: Is it possible to use SEQNUM on TRAILER1?

PostPosted: Thu Nov 27, 2008 3:24 pm
by ranga_subham
Ok. I will go by what Alissa suggested. I will copy each file a temporary file with a letter from A to J assigned on each record on 1 to 10 files. So, I will have 10 temporary files with unique id now. What is next?

Please let me know the code to go further.

Thanks.

Re: Is it possible to use SEQNUM on TRAILER1?

PostPosted: Tue Dec 02, 2008 12:50 am
by Alissa Margulies
Assuming the original files were FB/80, and with the identifying character added at the end of each record, they are now FB/81, here is an example:

//STEP1 EXEC PGM=SORT
//SYSOUT  DD SYSOUT=*
//SORTIN  DD DISP=SHR,DSN=FILE1
//        DD DISP=SHR,DSN=FILE2
//        DD DISP=SHR,DSN=FILE3
//        DD DISP=SHR,DSN=FILE4
//        DD DISP=SHR,DSN=FILE5
//        DD DISP=SHR,DSN=FILE6
//        DD DISP=SHR,DSN=FILE7
//        DD DISP=SHR,DSN=FILE8
//        DD DISP=SHR,DSN=FILE9
//        DD DISP=SHR,DSN=FILE10
//SORTOUT DD DSN=OUTPUT.FILE,DISP=...
//SYSIN   DD *                                     
   SORT FIELDS=(81,1,CH,A)                         
   OUTFIL FILES=OUT,SECTIONS=(81,1,                 
     TRAILER3=(COUNT=(EDIT=(TTTTTTTTTTT)),1X,81,1)),
     REMOVECC,NODETAIL                           
/*     


The output produced would be as follows:
0000000010 A
0000000020 B
0000000030 C 

Re: Is it possible to use SEQNUM on TRAILER1?

PostPosted: Tue Dec 02, 2008 3:34 pm
by ranga_subham
Thank you very much for the help. :D

Regards.