Cobol Zoned-Decimal Negative Numbers ...

I have a Cobol copybook that defines a field as PIC S9(8)V99.

For all “positive” numbers, I am receiving valid results through my mappings.

For negative numbers ending in “0” (zero), I am getting valid results through my mappings.

My issue is, for any negative number where the “pennies” column is 1 - 9 I get invalid results.

My understanding of Zoned-Decimal is that the last byte will contain “A” through “I” for digits 1 - 9 positive and “J” through “R” for digits 1 - 9 negative. Positive zero = “{” and negative zero = “}”

I am receiving a value of ‘000000291Q’ which should resolve to -29.18, but instead it is resolving to -29.11. I have verified this back to the file source, and I have used Designer Data-Profiling to verify this from the source itself before passing it through a Dataflow.

So … Can someone please assist me in this?

I do not want to change the copybook to VARCHAR(10) and then write a custom transform to manage the type conversion to numeric based on a decode of the last byte, but I will if I have to. Argh!!!

Thanks …

Jeff in Chicago …

(Note: I cross posted this in Data Quality & Admin forums as well to see if I could get a reply quickly)


jwilgus :us: (BOB member since 2008-01-17)


Werner Daehn :de: (BOB member since 2004-12-17)

wdaehn,

Thanks for your reply. Well then, this certainly seems to be a bug, because the “rule” is being applied inconsistently in the transcoding. I’ve verified via screenprints from both the mainframe and the data received that a value such as 000000291Q is coverting as expected using codepage ibm-37_p100-1995. So, we do not have the situation where a EBCDIC “J” is being converted to an ASCII “q” for example. We are receiving and reading a “Q” as the zoned over-punch byte.

It is hard for me to believe that we are the first DI users to encounter the inability to handle negative zoned-decimal numbers through DI. What have others done that have encountered this issue?

The word document you referenced in your posting indicated the existence or the need for a property “overpunchedASCIISignStyle” to set which version of transcoding to use when the user knows what “style” they are receiving for the zoned decimal.

Does this parameter exist? What are my options? Are you suggesting then that I code around the issue for now until such time as BOBJ can provide a fix?

Please advise ASAP so that I know how to respond. This is a very serious issue as it is causing all adjusted claim amounts to either be off by 7 cents and/or to have unpredictable results.

Thanks again for you response, and I’ll await your reply.

Jeff


jwilgus :us: (BOB member since 2008-01-17)

Very good post, Jeff.

I have been doing a lot this type conversion, fortunately have not encountered the problem you have yet. But I am very interested in knowing the results.


Billy_qing :canada: (BOB member since 2007-11-16)

Thanks Billy_qing …

I’m sorry that I have to be the first one to encounter this issue. :frowning:

I’m thinking of having the mainframe change the format from PIC S9(8)V99 … zoned-decimal … to PIC S9(8)V99 COMP-3 … packed decimal to see if DI would interpret the data correctly?

In the meantime, that does not help me for the 10s of millions of historical claims that have already been loaded!

I’ve opened a case with BOBJ.

More to follow … I hope with good news!

Thanks again,

Jeff


jwilgus :us: (BOB member since 2008-01-17)

I am currently using Data services v12.2.2.0 and am having the exact issue described above. Has a solution to this been implemented or is there a work around?


jdferron (BOB member since 2010-09-29)

Good question.

Can you call up support and ask them to find the Support case that relates to this post?


Werner Daehn :de: (BOB member since 2004-12-17)

There was no record of a previous support ticket on this issue so I opened a new one.

They have confirmed that it is a bug and are currently looking into the cause. I will try to remember to post any results…although it may be a while.

Also, I did find that if the first zoned decimal field in the flat file is a positive number all of the records that follow will be translated correctly. Very odd I know but that seems to be the case.


jdferron (BOB member since 2010-09-29)

If you would post the case number or better the ADAPT number, that would help for later reference.


Werner Daehn :de: (BOB member since 2004-12-17)