I am processing a flat file that has several decimal fields. I used a data structure to break each field down based on its location. One particular field has values that look like this:
000000001764.0000
000000001404.0000
000000001068.0000
000000000828.0000
000000013320.0000
000000007488.0000
000000003264.0000
I'm trying to move these values in a 13,5 Packed Decimal field in a file. I tried converting each to a string, stripping the decimal point, the using %DEC to convert to decimal, but it doesn't acknowledge the zeros to the left of the actual number. Here is the code I used:
PodOrdMsrTemp = %Subst(PodOrdMsr:1:12) + %Subst(PodOrdMsr:14:4);
P3ORIN = %Dec(PodOrdMsrTemp:16:4);
And here are the values that I get from this:
PODORDMSRTEMP = '0000000017640000'
P3ORIN = 17640000.00000
Does anyone know how I can get this value into the decimal field properly?
000000001764.0000
000000001404.0000
000000001068.0000
000000000828.0000
000000013320.0000
000000007488.0000
000000003264.0000
I'm trying to move these values in a 13,5 Packed Decimal field in a file. I tried converting each to a string, stripping the decimal point, the using %DEC to convert to decimal, but it doesn't acknowledge the zeros to the left of the actual number. Here is the code I used:
PodOrdMsrTemp = %Subst(PodOrdMsr:1:12) + %Subst(PodOrdMsr:14:4);
P3ORIN = %Dec(PodOrdMsrTemp:16:4);
And here are the values that I get from this:
PODORDMSRTEMP = '0000000017640000'
P3ORIN = 17640000.00000
Does anyone know how I can get this value into the decimal field properly?