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
 

 

Adding a nine digit sequential counter to each record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
naveen_amudalapelly
Warnings : 1

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Fri Feb 16, 2007 3:09 am    Post subject: Adding a nine digit sequential counter to each record
Reply with quote

Hi,

I have one dataset which consist of 1000 records(ID, NAME), now i would like to add a nine digit sequential counter to each record

say ex: output file
id name sequential counter
1 Naveen 000000001
2 Naveen1 000000002
3 Naveen2 00000003 etc....
: :
: :
1000 Naveen1000 000001000

Cany one please advice jcl
I appreciate your all your help
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Feb 16, 2007 3:21 am    Post subject:
Reply with quote

Standard responce:
Which sort do you have?
Have you looked at the manual?
What you want is quite simple, Use sort copy and outrec to add an additional field for the sequence number.
If I were you, I'd start here: DFSORT/ICETOOL Reference Material
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Feb 16, 2007 4:18 am    Post subject:
Reply with quote

Naveen,

Here's a DFSORT job that will do what you asked for. Just change c to the starting position you want for the sequence number:

Code:

//S1 EXEC PGM=ICEMAN                     
//SYSOUT    DD SYSOUT=*                 
//SORTIN DD DSN=...  input file     
//SORTOUT  DD DSN=...  output file             
//SYSIN     DD *                         
  OPTION COPY                           
  INREC OVERLAY=(c:SEQNUM,9,ZD)         
/*                                       
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 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 IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


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