Dave Guthrie wrote on 08/06/2007 06:48:16 AM:
> I have a 500,000 record text file with a record length of 150 bytes.I'm
tring
> to find some way of splitting it in two. Because of the record lenght,
I'm not
> able to use the tso edit function.  I'm sure I have the solution
somewhere.

Dave,

Here's a DFSORT job that will do what you asked for:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...    output file1
//OUT2 DD DSN=...    output file2
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=OUT1,ENDREC=250000
  OUTFIL FNAMES=OUT2,STARTREC=250001
/*

If you need a more general solution, the "Split a file to n output files
dynamically" Smart DFSORT Trick shows how you can use DFSORT's SPLIT1R
function to dynamically divide any number of input records among any number
of output files and ensure that the records in each output file are
contiguous.   You can access the Smart DFSORT Tricks from:

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
----------------------------------------------------------------------
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