Bob R wrote on 09/04/2007 12:59:39 PM:
> I need to split a large physical sequential dataset into two separate
> files.  Unfortunately, it's too large to edit using ISPF Edit.  I
> thought about using IEBGENER or DFSORT.  I thought there was an easy way
> to write the first 100,000 records to a dataset and skip the rest, then
> skip the first 100,000 records and write the remainder to another
> dataset, using IEBGENER or DFSORT and the right control cards.  I got
> around the problem without having to write a simple read/write program,
> but I'm still curious - is there a simple way to do what I wanted to do
> using IEBGENER, DFSORT, or another IBM utility?

There are several ways to do this with DFSORT, but the easiest is to use
DFSORT's SPLIT1R=n option as follows.  The first 100000 records will be
written to OUT1 and the remaining records will be written to OUT2.

//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 SPLIT1R=100000,FNAMES=(OUT1,OUT2)
/*

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