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

Syncsort Counting records


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Fri Jul 24, 2009 4:10 pm
Reply with quote

How can I do this??

Input
aaaa
bbbb
cccc
dddd

output
aaaa0001
bbbb0002
cccc0003
dddd0004

thanks
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Fri Jul 24, 2009 4:48 pm
Reply with quote

miosne,

Which SORT product are you using?

Search for SEQNUM in the JCL forum and you will find working examples.

All you need is to reformat the field and add a sequence number of bytes 4 from position 5.
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Fri Jul 24, 2009 5:56 pm
Reply with quote

Hi,
Use this sort card may be this can help you

//SYSIN DD *
SORT FIELDS=(1,4,CH,A)
OUTREC FIELDS=(1,4,12:SEQNUM,1,ZD)
/*

Use the reformat fields to chnage the output
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Fri Jul 24, 2009 6:31 pm
Reply with quote

It works.

thanks a lot
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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top