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 have diff format for only the 1st record in o/p file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ch.sridhar

New User


Joined: 01 May 2006
Posts: 7
Location: INDIA, Mumbai

PostPosted: Sat Dec 22, 2007 1:38 am    Post subject: How to have diff format for only the 1st record in o/p file
Reply with quote

I am taking an input file and sorting it based on some conditions. But the first record in the output file of the sort should have some extra characters which should not come from the next records in the output file.
So is there any way that this task can be accomplished in a single or multiple SYNCSORT steps?


Thanks&Regards,
Sridhar
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Dec 22, 2007 2:37 am    Post subject:
Reply with quote

Hello,

Quote:
So is there any way that this task can be accomplished in a single or multiple SYNCSORT steps?
I believe you'll be able to do what you want using a HEADER.

You can find the complete info jn the Syncsort manual (available for free for Syncsort to licensed users) and you might search in our forums - make sure any solution you find will work with Syncsort.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Sat Dec 22, 2007 6:16 am    Post subject:
Reply with quote

ch.sridhar
Explain your scenario with proper set of i/p and o/p records, so as to help you!
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Sat Dec 22, 2007 2:44 pm    Post subject: Reply to: How to have diff format for only the 1st record in
Reply with quote

sridhar,

Quote:
So is there any way that this task can be accomplished in a single or multiple SYNCSORT steps?


Yes, this is possible using SYNCSORT. First sort the input records based on the conditions and then add the SEQNUM on the sorted output. Then add the extra characters for the record with seqnum 1 and then build excluding the SEQNUM numbers.

Post the sample input/output incase if you need a working JCL.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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