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
 
Sequence number add in SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
pshongal

New User


Joined: 14 Jun 2012
Posts: 94
Location: India

PostPosted: Fri Sep 02, 2016 3:32 pm    Post subject: Sequence number add in SORT
Reply with quote

I am using below code to increase sequence number every time job runs.

Code:

SORT FIELDS=COPY                                     
OUTREC FIELDS=(1:1,24,25:&DATE1,33:C'|SEQNO=',       
             40:40,6,ZD,ADD,+1,TO=ZD,LENGTH=6,46:122X)


My Input:
Code:

H|Feeder=upstreams|Date=20160902|SEQNO=000001


I am getting output as below.
Code:

H|Feeder=upstreams|Date=20160902|SEQNO=00000B


I am expecting
Code:

H|Feeder=upstreams|Date=20160902|SEQNO=000002


What am I missing?
Back to top
View user's profile Send private message

enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10487
Location: italy

PostPosted: Fri Sep 02, 2016 3:53 pm    Post subject: Reply to: Sequence number add in SORT
Reply with quote

Quote:
What am I missing?

the understanding of the ZD representation
Back to top
View user's profile Send private message
pshongal

New User


Joined: 14 Jun 2012
Posts: 94
Location: India

PostPosted: Fri Sep 02, 2016 4:05 pm    Post subject:
Reply with quote

Thanks Enrico. You are right.

Changed as below and it worked.

Code:

TO=ZDF
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 324
Location: Maryland

PostPosted: Sat Sep 03, 2016 11:18 pm    Post subject:
Reply with quote

More clear and more flexible would be using the parameter EDIT:
Code:
....,ADD,+1,EDIT=(TTTTTT),....
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts finding anydata between positions of ... ram_vizag SYNCSORT 13 Tue Jul 17, 2018 9:14 pm
No new posts To remove spaces from a VB file using... Selvarajars DFSORT/ICETOOL 5 Thu Jun 21, 2018 6:57 pm
No new posts Question about dataset sequence numbe... harisukumaran JCL & VSAM 23 Tue May 29, 2018 9:31 am
No new posts INVALID RECFM FOR DDNAME SYSLIN AND C... sandeep kumar302 All Other Mainframe Topics 7 Fri Apr 27, 2018 6:07 pm
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am

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