Mazahar
New User
Joined: 11 Dec 2007 Posts: 82 Location: hyderabad
|
|
|
|
Hello All,
Can we write a single record to a single file using sort?
ex:
input FB 80
123
124
125
126
i need to write these 4 records to 4 output files using sort. record count 4 is not fixed, it can be anything between 1 to 20.
Please help me out if you have any suggestion. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Mazhar,
You can use a DFSORT job like the following to do what you asked for:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//OUT01 DD DSN=... output file1
//OUT02 DD DSN=... output file2
...
//OUT20 DD DSN=... output file20
//SYSIN DD *
OPTION COPY
OUTFIL SPLIT,
FNAMES=(OUT01,OUT02,OUT03,OUT04,OUT05,
OUT06,OUT07,OUT08,OUT09,OUT10,
OUT11,OUT12,OUT13,OUT14,OUT15,
OUT16,OUT17,OUT18,OUT19,OUT20)
/*
|
|
|