vijayalayancse
New User
Joined: 29 Aug 2005 Posts: 25 Location: Chennai
|
|
|
|
Hi all,
I wanted to split the file into Mulitple files.
Explanation:
say, i have 1000 records, I wanted to to split into 10 files each contains
100 records without sorting them(as it is in the i/p file)
I tried with Sort/Iceman/icetool. Found no solution.
I got some other o/p from what i really wanted.
Can youn plz help me out in fixing this? |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's SPLIT1R function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:
Use [URL] BBCode for External Links
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//OUT01 DD DSN=... output file 1
//OUT02 DD DSN=... output file 2
//OUT03 DD DSN=... output file 3
//OUT04 DD DSN=... output file 4
//OUT05 DD DSN=... output file 5
//OUT06 DD DSN=... output file 6
//OUT07 DD DSN=... output file 7
//OUT08 DD DSN=... output file 8
//OUT09 DD DSN=... output file 9
//OUT10 DD DSN=... output file 10
//SYSIN DD *
OPTION COPY
OUTFIL SPLIT1R=100,
FNAMES=(OUT01,OUT02,OUT03,OUT04,OUT05,
OUT06,OUT07,OUT08,OUT09,OUT10)
/*
|
Note that if you have 1000 records or less and you don't have the April, 2006 PTF, you could use DFSORT's older SPLITBY=100 function. But if you can have more than 1000 records, SPLITBY=100 will rotate back to OUT01, so you'll need SPLIT1R=100 to handle the extra records correctly. |
|