IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to add a trailer record while splitting with OUTFIL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Fri Jun 06, 2008 6:19 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jun 06, 2008 9:31 pm
Reply with quote

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
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Sat Jun 07, 2008 9:04 am
Reply with quote

yes, instead of using TRAILER1=('EOF') in every OUTFIL, I want to do it in a single statement. Is it possible?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Jun 07, 2008 5:20 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top