View previous topic :: View next topic
|
Author |
Message |
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Hi,
I have a requirement in which I need to write records to three different files by the following criteria...
1)First two records from input file should be written to first file
2)Next two records from input file should be written to second file
3)Next two records from input file should be written to third file
Then the process should be repeated as
Next two records from input file should be written to first file
Next two records from input file should be written to second file
Next two records from input file should be written to third file
How can we achieve this?
Lokesh |
|
Back to top |
|
|
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:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//OUT1 DD DSN=... output file1
//OUT2 DD DSN=... output file2
//OUT3 DD DSN=... output file3
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLITBY=2
/*
|
|
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Thanks a lot Frank..!! |
|
Back to top |
|
|
|