View previous topic :: View next topic
|
Author |
Message |
pshongal
New User
Joined: 14 Jun 2012 Posts: 96 Location: India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
What am I missing? |
the understanding of the ZD representation |
|
Back to top |
|
|
pshongal
New User
Joined: 14 Jun 2012 Posts: 96 Location: India
|
|
|
|
Thanks Enrico. You are right.
Changed as below and it worked.
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2022 Location: USA
|
|
|
|
More clear and more flexible would be using the parameter EDIT:
Code: |
....,ADD,+1,EDIT=(TTTTTT),.... |
|
|
Back to top |
|
|
|