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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm


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