Negative Packed Decimals
Posted: Thu Jun 18, 2015 12:11 pm
Hello All -
I am having an issue with some negative packed decimal fields in the CFF.
Job Design:
Seq. File -> Transformer -> Sort -> CFF
The CFF Stage is packing the data.
I have two amount fields within my source. Both of which are [15,2] - PIC S9(13)V9(2) Comp-3.
A source will read as followed -000000000100600
I am able to get the desired output in the view data tab on the CFF. -0000000001006.00
However, the output seems to be one (or half) a byte short. The storage length here should be 8 bytes, but it is coming out as 7 bytes.
This issue ONLY happens when there are no cents in amount columns.
I have some records which contain -0000000000010.15 and these show up as 8 bytes on the final output.
To ensure this is the issue, I manually manipulated these columns so all the records had cents following the dollar amount. Amazingly, one of our mainframe gurus confirmed that this is the issue.
Here are the Properties we have set for this column in the CFF:
Signed
COMP-3
Field Width 16
Length 15
Scale 2
Please let me know if you have any suggestions or advice!
Thanks,
Jared
I am having an issue with some negative packed decimal fields in the CFF.
Job Design:
Seq. File -> Transformer -> Sort -> CFF
The CFF Stage is packing the data.
I have two amount fields within my source. Both of which are [15,2] - PIC S9(13)V9(2) Comp-3.
A source will read as followed -000000000100600
I am able to get the desired output in the view data tab on the CFF. -0000000001006.00
However, the output seems to be one (or half) a byte short. The storage length here should be 8 bytes, but it is coming out as 7 bytes.
This issue ONLY happens when there are no cents in amount columns.
I have some records which contain -0000000000010.15 and these show up as 8 bytes on the final output.
To ensure this is the issue, I manually manipulated these columns so all the records had cents following the dollar amount. Amazingly, one of our mainframe gurus confirmed that this is the issue.
Here are the Properties we have set for this column in the CFF:
Signed
COMP-3
Field Width 16
Length 15
Scale 2
Please let me know if you have any suggestions or advice!
Thanks,
Jared