View previous topic :: View next topic
|
Author |
Message |
vijikesavan
Active User
Joined: 04 Oct 2006 Posts: 118 Location: NJ, USA
|
|
|
|
Hi,
I need to copy first 1000 records from a sequential file - FileA to File B,
then I have to copy 2000 to 3000 records to file C.
I did this few yrs back using IEBGENER, but completely washed out from my mind now...can anyone help me plsss...
Any utitility is fine
Viji |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
Back to top |
|
|
vijikesavan
Active User
Joined: 04 Oct 2006 Posts: 118 Location: NJ, USA
|
|
|
|
I tried going thru the link even before posting my question but couldnot nail down exactly.
Any guidance to the utility or the control statement will be of great help.
Thanks,
Viji |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I don't know where in IEBGENER you can select records based on a count. Usually, most folks use SORT (see many examples in the DFSORT Forum) or IDCAMS (the COUNT parameter of REPRO). |
|
Back to top |
|
|
vijikesavan
Active User
Joined: 04 Oct 2006 Posts: 118 Location: NJ, USA
|
|
|
|
IDCAMS worked.
Thanks for your time Superk and William Thompson
-Viji |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can put the first 1000 records in one output file and the rest of the records in another output file using this DFSORT job:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//OUT1 DD DSN=... output file1 (first 1000 records)
//OUT2 DD DSN=... output file2 (rest of records)
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUT1,ENDREC=1000
OUTFIL FNAMES=OUT2,SAVE
/*
|
|
|
Back to top |
|
|
|