Obtaining a signed value when updating triler using TRLUPD



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Obtaining a signed value when updating triler using TRLUPD

Postby Healy » Wed Dec 24, 2014 10:57 pm

I have a file that is present in the following format
Header Record
Detail Record - 1
Detail Record - 2
Detail Record- 3
Trailer Record

In the Trailer Record I am taking in the count of total number of records present which in the above case works out to 3.

I have a requirement to update the number of records on file in the Trailer record which i am completing by making use of the IFTRAIL and TRLUPD functions.

I have my sortcard as below
OPTION COPY
OUTFIL FNAMES=OUT12,
    IFTRAIL=(HD=YES,TRLID=(1,2,ZD,EQ,+9),
    TRLUPD=(14:COUNT=(M11,LENGTH=4)))


Now, my problem is that the Output COUNT that appears should be an Signed value.

For Example: if the count of records comes out to 4 then i want it represented in the Trailer as 0004F. I want the Sign bit as well to show if it's positive or negative. I realise that the count of records will always be Positive but i still have to display that Sign bit.

Please let me know how this can be achieved in TRLUPLD part itself.

Thank You,
Healy
Healy
 
Posts: 14
Joined: Mon May 12, 2014 9:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Obtaining a signed value when updating triler using TRLUPD

 

Re: Obtaining a signed value when updating triler using TRLU

Postby BillyBoyo » Thu Dec 25, 2014 12:51 am

You're using an "edit mask" (the M11) to format your count, so it is always going to be human-readable (F not C). Look at the option for COUNT in the documentation.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Obtaining a signed value when updating triler using TRLU

Postby Healy » Thu Dec 25, 2014 7:39 am

I did look up the manuals but i couldn't find any mention of using COUNT in a way to display a signed Value. I realise that i am using an editing Mask pattern M11 but that is what i have to replace in order to get the Signed Bit.
Healy
 
Posts: 14
Joined: Mon May 12, 2014 9:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Obtaining a signed value when updating triler using TRLU

Postby BillyBoyo » Thu Dec 25, 2014 10:04 pm

COUNT=(TO=ZD,LENGTH=4))
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Obtaining a signed value when updating triler using TRLU

Postby Healy » Fri Dec 26, 2014 10:57 am

Thank you for your Help Billy.

The solution provided by you worked but i had to make a slight modification to it to obtain the Signed Bit.

COUNT=(TO=ZDC,LENGTH=4))


Thanks,
Healy
Healy
 
Posts: 14
Joined: Mon May 12, 2014 9:47 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post