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: 72
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10352
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: 72
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: 212
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 Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

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