View previous topic :: View next topic
|
Author |
Message |
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
Hi,
By using SORT OUTFIL I am writing output to multiple files from a single input file, now in each file I want to add EOF as a trailer. I there any way to do this, please let me know
Thanks |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Do you mean you want a record at the end of each file with 'EOF'? If so, the obvious way would be to use REMOVECC and TRAILER1=('EOF') for each OUTFIL statement.
If that's not what you want or doesn't do what you want, then explain more clearly what you want to do. Show the control statements you are using. Show an example of the input records and what you want for the output records. Give the RECFM and LRECL of the input file. |
|
Back to top |
|
|
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
yes, instead of using TRAILER1=('EOF') in every OUTFIL, I want to do it in a single statement. Is it possible? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use an OUTFIL statement like this to write the same records to three different OUTFIL data sets and add a trailer record to each:
Code: |
OUTFIL FNAMES=(OUT1,OUT2,OUT3),REMOVECC,
TRAILER1=('EOF')
|
If you are using different OUTFIL statements to write different records to different data sets, then you need a TRAILER1 operand for each OUTFIL statement. |
|
Back to top |
|
|
|