View previous topic :: View next topic
Author
Message
RALAKKAL New User Joined: 03 Jun 2017Posts: 11 Location: Canada
HI,
I would like to get the trailer count as a signed field in the trailer and i am using below code for achieving it. But, i am not getting the trailer updated as signed field.
FYI- input is a VB file
Is there anything that we can leverage in SyncSORT to updated the trailer as signed?
I am using SYNCSORT FOR Z/OS 2.1.7
Any leads would be appreciated
Code:
//STEP001 EXEC PGM=SORT
//*
//SORTIN DD DSN=TESTINPUT,DISP=SHR
//*
//*
//SYSOUT DD SYSOUT=*
//*
//SYSPRINT DD SYSOUT=*
//*
//*
//SORTOUT DD DSN=TESTOUTPUT,DISP=(,CATLG,DELETE),
// UNIT=DVHSM,
// DCB=(*.SORTIN),SPACE=(TRK,(100,200),RLSE)
//*
//SYSIN DD *
SORT FIELDS=(5,2,PD,A)
OUTFIL IFTRAIL=(HD=YES,TRLID=(5,1,CH,EQ,X'FF'),
TRLUPD=(20:COUNT=(M26,LENGTH=8)))
The expected out put is
Code:
WS80-TRL-DR-COUNT WS80-TRL-DR-AMOUNT WS80-TRL-CR-COUNT WS80-TRL-CR-AMOUNT
ZS(8) (16-23) ZS(15,2) (24-40) ZS(8) (41-48) ZS(15,2) (49-65)
----------------- ------------------- ----------------- -------------------
+00000020 +000000000010923.76 +00000000 +000000000000000.00
The output recieved is
Code:
WS80-TRL-DR-COUNT WS80-TRL-DR-AMOUNT WS80-TRL-CR-COUNT WS80-TRL-CR-AMOUNT
ZS(8) (16-23) ZS(15,2) (24-40) ZS(8) (41-48) ZS(15,2) (49-65)
----------------- ------------------- ----------------- -------------------
00000020 +000000000010923.76 +00000000 +000000000000000.00
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1341 Location: Bamberg, Germany
Give it a try.
Code:
TRLUPD=(20:COUNT=(EDIT=(STTTTTTTT),SIGNS=(+,-),LENGTH=9)))
Back to top
RALAKKAL New User Joined: 03 Jun 2017Posts: 11 Location: Canada
Thanks for the quick help.
But no luck with the above control
The output it gives me is like this
Code:
WS80-TRL-DR-COUNT WS80-TRL-DR-AMOUNT WS80-TRL-CR-COUNT WS80-TRL-CR-AMOUNT
ZS(8) (16-23) ZS(15,2) (24-40) ZS(8) (41-48) ZS(15,2) (49-65)
----------------- ------------------- ----------------- -------------------
X'4EF0F0F0F0F0F0F +000000000010923.76 +00000000 +000000000000000.00
Back to top
RALAKKAL New User Joined: 03 Jun 2017Posts: 11 Location: Canada
I am also pasting the hex value of expected and obtained results.
Expected Results
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
0000002{0000000000109237F0000000{0000000000000000{ <
FFFFFFFFFFFFFFFFFFFFFFCFFFFFFFFFFFFFFFFCFFFFFFFCFFFFFFFFFFFFFFFFC4444444
FFFFFFFFFFFFFFF00000020000000000010923760000000000000000000000000000000C
Obtained Result
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000000200000000000109237F0000000{0000000000000000{ <
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFFFFFCFFFFFFFFFFFFFFFFC4444444
FFFFFFFFFFFFFFF00000020000000000010923760000000000000000000000000000000C
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1341 Location: Bamberg, Germany
You have just replaced that line of code, haven't you?
Code:
SORT FIELDS=(5,2,PD,A)
OUTFIL IFTRAIL=(HD=YES,TRLID=(5,1,CH,EQ,X'FF'),
TRLUPD=(20:COUNT=(EDIT=(STTTTTTTT),SIGNS=(+,-),LENGTH=9)))
Please show the output as it is seen. Leading X'4E' is the plus sign so something has worked.
Where is your quoted string X'4EF0F0F0F0F0F0F' in the HEX listing?
Back to top
RALAKKAL New User Joined: 03 Jun 2017Posts: 11 Location: Canada
My apologies. The hex value shown above was before trying the sort card shared by you.
After trying the sort card below. The results are
Code:
SORT FIELDS=(5,2,PD,A)
OUTFIL IFTRAIL=(HD=YES,TRLID=(5,1,CH,EQ,X'FF'),
TRLUPD=(20:COUNT=(EDIT=(STTTTTTTT),SIGNS=(+,-),LENGTH=9)))
Recieved result
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
+00000020000000000109237F0000000{0000000000000000{
FFFFFFFFFFFFFFF4FFFFFFFFFFFFFFFFFFFFFFFCFFFFFFFCFFFFFFFFFFFFFFFFC4444444
FFFFFFFFFFFFFFFE00000020000000000109237600000000000000000000000000000000
Expected Results
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
0000002{0000000000109237F0000000{0000000000000000{
FFFFFFFFFFFFFFFFFFFFFFCFFFFFFFFFFFFFFFFCFFFFFFFCFFFFFFFFFFFFFFFFC4444444
FFFFFFFFFFFFFFF000000200000000000109237600000000000000000000000000000000
[/code]
Back to top
Nic Clouston Global Moderator Joined: 10 May 2007Posts: 2454 Location: Hampshire, UK
In your last post 'expected result' did not match that in your first post. Your received result in your last post does match the expected result of your first post which I presume is the result that you want?
Back to top
RALAKKAL New User Joined: 03 Jun 2017Posts: 11 Location: Canada
Nic,
You are right.
I have not recieved the expected results yet.
The expected results in my first post and last post are the same..but the order got changed. Sorry for the confusion.
Back to top
Please enable JavaScript!