Packed decimal format issue.

UDA

Packed decimal format issue.

Hi All,
I have an input file, where in the DECIMAL(7,2) is being sent in a Comp - 3 format.
Along with the actual values, it has few null values also being sent across.
I have tried to view the contents of the file using the cobol copy book and the null value looks something like X'00000000'(Hexa decimal reprsentation)
ERROR: INVALID DECIMAL DATA DURING COMPARISON.
Record 1 of Import 1 rejected due to preceding error.

My Mload layout definition is .FIELD PRE_CNT_BK_VALUE * DECIMAL(7,2) NULLIF PRE_CNT_BK_VALUE= '00000000'; .
But when i use the above sytax, none of my records are being considered for loading.

Please suggest on how a Comp -3 NULL Decimal value can be converted to NULL.
I am using the MLOAD utility.

Regards,
Pratap.
2 REPLIES
Enthusiast

Re: Packed decimal format issue.

Try:

.FIELD PRE_CNT_BK_VALUE * DECIMAL(7,2) NULLIF PRE_CNT_BK_VALUE= '00000000'XB;

(Hex Binary)

Re: Packed decimal format issue.

Hi,
i tried it as suggested, but the job has failed with the following error.

** Invalid attempt to evaluate numbers against characters.

Regards,
Pratap