Doesn't PACK + CVB + EDMK pretty much just do this for you?

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Dave Clark
Sent: Friday, February 11, 2022 11:16 AM
To: [email protected]
Subject: Re: Rules for Zoned Overpunch

"IBM Mainframe Assembler List" <[email protected]> wrote on 
02/11/2022 01:40:42 PM:
> What do you want to do if it is /not/ FACEBD?


        I'm asking this question because I have to turn an ostensibly 
zoned-decimal field with an internal right sign (an "overpunch") into a 
string of digits with an external left sign.  I did finally find 
statements on the Internet which indicate that B and D zones are 
considered negative while A, C, E, and F zones are considered positive. 
Thus, for "positive" numbers I will just leave the external sign off but 
for "negative" numbers I have to prefix the string of digits with the dash 
character.

        So, I'm looking for the shortest way to validate whether the last 
byte in the zoned-decimal field has a B or D zone and consider all other 
zones to be positive.  At that point I plan to just force the zone to an F 
and position an external left negative sign if needed.  Therefore, I don't 
really care if the last byte has an invalid zone or not.

        The data is normally generated by an RPG or COBOL program.  So if 
invalid data is otherwise being forced into a zoned-decimal field then 
I'll just have to let the pieces fall where they may.

Reply via email to