Page 3 of 3

Re: How to split a file into two file and remove dups?

PostPosted: Fri Oct 26, 2012 11:43 pm
by BillyBoyo
On your OUTREC you are specifying 9 bytes, you are ending your records with a blank.

I don't know why you'd have 11 byte records, unless perhaps you have an LRECL specified on the DD statement for OUT.

You don't need to specify the "columns", the numbers prior to the ":". All your data follows on from the previous. Putting the columns makes it harder to change later.

Personally, I change OUTREC to BUILD. BUILD exists for INREC, OUTREC and OUTFIL. OUTREC and BUILD are identical.

                  BUILD=(1,2,                 
                         09,03,             
                         09,03)
 


Should get you an eight-byte record-length, unless you have the LRECL in the JCL. Leave off the whole DCB, Sort will provide it.

Re: How to split a file into two file and remove dups?

PostPosted: Sat Oct 27, 2012 4:52 pm
by mainframegeek
Thanks Billy for correcting me. Its working perfectly :) .

Re: How to split a file into two file and remove dups?

PostPosted: Sat Oct 27, 2012 5:04 pm
by BillyBoyo
No problem. Looking now, shouldn't the first 09,03 be 06,03?

Re: How to split a file into two file and remove dups?

PostPosted: Sat Oct 27, 2012 6:09 pm
by mainframegeek
We need to have three bytes from 9th byte. 3,6 is Min-Nmbr, 6,3 is Max-nmbr and 9,3 is the nmbr from file-2. So only 9,3 is required after key field.