Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to add a trailer record while splitting with OUTFIL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to add a trailer record while splitting with OUTFIL
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 Moderator


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

PostPosted: Fri Jun 06, 2008 9:31 pm    Post subject:
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    Post subject: Reply to: How to add a trailer record while splitting with O
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 Moderator


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

PostPosted: Sat Jun 07, 2008 5:20 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us