Page 1 of 1

Jcl sortcard

PostPosted: Tue Oct 03, 2017 7:51 pm
by rajo1234
Hi,
I have a input file with records as
Input file:
0   VP01153201801021640

MY requirement is to deduct 1 from the end and place in
Output file.
Like:
0   VP01153201801021639


BELOW is my code
Sortin dd dsn=input file,disp=shr
Sortout dd dsn=output file,disp=shr
Sysin dd *
Sort fields=copy
Outrec fields=(1:1,22,23,1,zd,sub,+1,edit=(t))
 

my code looks fine for single last value.
Eg if the last is 6 it changes it 5. But for case as mentioned since 2 digits are involved 40 to 39 ,my code doesnt work.
Please help me.

Re: Jcl sortcard

PostPosted: Tue Oct 03, 2017 8:08 pm
by enrico-sorichetti
certainly You noticed that there are two sections in the forum
related to SYNCSORT and IBM-DFSORT

tell what sort product You are using
so that a moderator will move the topic to the proper section
- WER*** messages ==> SYNCSORT
- ICE*** messages ==> IBM-DFSORT

hard to believe that You could not find the solution by yourself :o
reread Your <sort> product documentation about the syntax of add/subtract
sort is smart enough that it can handle numbers longer than one digit

but, what about something along the lines of
Outrec fields=(1:1,18,19,5,zd,sub,+1,edit=(ttttt))


check the manual anyway

Re: Jcl sortcard

PostPosted: Tue Oct 03, 2017 8:56 pm
by rajo1234
Thanks for your feedback.i will post this in syncsort forum