IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Signed Count in Trailer


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RALAKKAL

New User


Joined: 03 Jun 2017
Posts: 11
Location: Canada

PostPosted: Fri May 15, 2020 2:46 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1246
Location: Bamberg, Germany

PostPosted: Fri May 15, 2020 5:27 am
Reply with quote

Give it a try.
Code:
TRLUPD=(20:COUNT=(EDIT=(STTTTTTTT),SIGNS=(+,-),LENGTH=9)))
Back to top
View user's profile Send private message
RALAKKAL

New User


Joined: 03 Jun 2017
Posts: 11
Location: Canada

PostPosted: Fri May 15, 2020 6:11 am
Reply with quote

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
View user's profile Send private message
RALAKKAL

New User


Joined: 03 Jun 2017
Posts: 11
Location: Canada

PostPosted: Fri May 15, 2020 6:26 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1246
Location: Bamberg, Germany

PostPosted: Fri May 15, 2020 6:26 am
Reply with quote

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
View user's profile Send private message
RALAKKAL

New User


Joined: 03 Jun 2017
Posts: 11
Location: Canada

PostPosted: Fri May 15, 2020 2:54 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri May 15, 2020 5:41 pm
Reply with quote

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
View user's profile Send private message
RALAKKAL

New User


Joined: 03 Jun 2017
Posts: 11
Location: Canada

PostPosted: Fri May 15, 2020 7:20 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts To get the count of rows for every 1 ... DB2 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
Search our Forums:

Back to Top