> The easiest is probably using the SPLITBY parameter of the
> OUTFIL control statement.  This should work with either SyncSort or
> other sort products.  The SPLITBY=n parameter writes groups of records
> in rotation among multiple output data sets and distributes multiple
> records at a time among the OUTFIL data sets. N specifies the number of
> records to split by.  The following control statements will copy the
> first 1,00,000 (not sure if this is a typo or if is should be 1,000,000)
> to the first data set and the next 1,00,000 to the next data set and so
> on.  The only thing you need to be careful of is to allocate enough data
> sets.  If you need 6 data sets but only allocate 5, the next group after
> the 5th, the one that starts with the 6,00,001st record will be written
> to the fist data set again and the rotation continues.
> ...

Raj,
If you have access to DFSORT, you can use its SPLIT1R=n parameter instead
of SPLITBY=n.  Whereas SPLITBY=n rotates the records back to the first
output file (which is not desirable in your case), SPLIT1R=n will continue
to write the extra records to the last output file so each output file will
have contiguous records from the input file.

For complete details on DFSORT's SPLIT1R=n parameter, see:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

For another way to split the records evenly and contiguously, see the
"Split a file to n output files dynamically" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

Frank Yaeger - DFSORT Development Team (IBM) - [EMAIL PROTECTED]
Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration

 => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to