MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Add 1 to each record

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Sun Mar 27, 2011 9:56 am    Post subject: Add 1 to each record Reply with quote

Hi,

I have below input file and attibutes are Lrecl=80 & Recfm=FB

Code:
                     
00000
00001
00002
...
00099


Output file shoud be in below way i.e add 1 to each record


Code:
                     
00001
00002
00003
...
00100


Can someone provide me a sortcard.

Thanks,
Siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Sun Mar 27, 2011 1:17 pm    Post subject: Reply with quote

sivafdms,

Is this a trick question? Isn't it as simple as this?

Code:

//STEP0100 EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                             
00000                                       
00001                                       
00002                                       
00099                                       
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                             
  SORT FIELDS=COPY                         
  INREC OVERLAY=(1,5,ZD,ADD,+1,M11,LENGTH=5)
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Sun Mar 27, 2011 9:16 pm    Post subject: Reply with quote

Thx kolusu.i am not fully aware of M11 in sort
Back to top
View user's profile Send private message
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Mon Mar 28, 2011 4:00 am    Post subject: Reply with quote

M11 is just an edit mask - idea is to just add +1 to the numbers in posistion 1 to 5.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group