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
 

 

Keep Header and Trailer as it is in the output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
swathykrishnan

New User


Joined: 01 Oct 2010
Posts: 43
Location: Bangalore

PostPosted: Tue Jun 28, 2011 12:20 pm    Post subject: Keep Header and Trailer as it is in the output file
Reply with quote

Hi

I have an input file like the one given below

Code:

HH  THIS FILE HEADER
IBM    100 
IBM    300
IBM    400

TT  THIS IS TRAILER



No other records except Header and Trailer will start with HH and TT.
I have to sort the records between header and trailer and the output file should also have the Header and trailer as it is in the input file. At present i am copying the the header and trailer records to two temp files and merging it with the sorted file.
Is there any other way to do the same?
Please note that I am using DFSORT.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 28, 2011 1:19 pm    Post subject:
Reply with quote

May I suggest reading the DFSORT smart tips document which shows the easy way to do this.

Click HERE to access the documentation.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Jun 28, 2011 2:01 pm    Post subject: Reply to: Keep Header and Trailer as it is in the output fil
Reply with quote

for the most general case ( multiple groups each with a header and a trailer ) see
http://www.ibmmainframes.com/viewtopic.php?t=50018&highlight=sort+header+trailer

for the simpler case
http://www.ibmmainframes.com/viewtopic.php?t=42457&highlight=sort+header+trailer
or
http://www.ibmmainframes.com/viewtopic.php?t=25769&highlight=sort+header+trailer
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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