Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Signed Count in Trailer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
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    Post subject: Signed Count in Trailer
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

Active User


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

PostPosted: Fri May 15, 2020 5:27 am    Post subject:
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    Post subject: Reply to: Signed Count in Trailer
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    Post subject: Reply to: Signed Count in Trailer
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

Active User


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

PostPosted: Fri May 15, 2020 6:26 am    Post subject:
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    Post subject: Reply to: Signed Count in Trailer
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: 2378
Location: Hampshire, UK

PostPosted: Fri May 15, 2020 5:41 pm    Post subject: Reply to: Signed Count in Trailer
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    Post subject: Reply to: Signed Count in Trailer
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    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 Identify the count from two diffrent ... UmashankarSubramani DFSORT/ICETOOL 19 Sat Jul 11, 2020 4:35 am
No new posts VSAM Open During Copy-Excessive EXCP ... David Beckham JCL & VSAM 1 Sat Jun 27, 2020 5:23 pm
No new posts Want to check if trailer count is 0 a... rohanthengal JCL & VSAM 10 Fri Jun 26, 2020 10:47 am
No new posts Multiple rows within Cursor when Coun... iamdijkstra007 DB2 14 Mon Jun 08, 2020 12:53 am
No new posts Cobol redefines for Signed pictured c... gvvjags COBOL Programming 4 Thu Feb 27, 2020 4:33 pm

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