Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 query to fetch record which has only ... maxsubrat DB2 2 Mon Dec 11, 2017 5:03 pm
No new posts POSSIBLE TO HAVE SAME OUTFIL FNAME? pshongal DFSORT/ICETOOL 8 Wed Nov 29, 2017 3:42 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us