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 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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