IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to have diff format for only the 1st record in o/p file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Sat Dec 22, 2007 2:37 am
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
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: 1287
Location: Chennai, India

PostPosted: Sat Dec 22, 2007 2:44 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top