View previous topic :: View next topic
|
Author |
Message |
raam_kumar
New User
Joined: 25 Apr 2007 Posts: 44 Location: chennai, India
|
|
|
|
Hi
I have the following requirement. I have to sort a file and split it into two output files as given below. Could any one please help me
Input:
000001abc0126d
000002abc0126d
000003abc0126d
000004abc0126d
output: (file-1)
000001abc0126d
000003abc0126d
(file-2)
000002abc0126d
000004abc0126d |
|
Back to top |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
|
|
Raam Kumar.R
What field do you want to sort and do you mean you want to create a file with pair records and an other file with impairs ?
Alain |
|
Back to top |
|
|
raam_kumar
New User
Joined: 25 Apr 2007 Posts: 44 Location: chennai, India
|
|
|
|
Hi
After posting this i tried and found a way to do this. Here is the code which i used
Code: |
//ICETOOL EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(INPUT) USING(SPUB)
//INPUT DD DISP=SHR,DSN=<input dataset name>
//OUT1 DD DSN=<output dataset name>
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(500,50),RLSE)
//OUT2 DD DSN=<output dataset name>
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(500,50),RLSE)
//SYSOUT DD SYSOUT=*
//SPUBCNTL DD *
OUTFIL FNAMES=(OUT1,OUT2),SPLIT
|
Please if some one knows any other method let me know |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Please if some one knows any other method let me know |
Why - what's wrong with that method? What are you trying to accomplish that it doesn't?
Note that you could use DFSORT directly for this rather than ICETOOL, but it would accomplish the same thing. |
|
Back to top |
|
|
|