I need help for 2 things:
I have a file one field is packed decimal (PIC S9(13)V9(5) COMP-3).
1) I need to convert Packed decimal it into readable format (Zoned decimal).
2) Transfer into note pad, load in to oracle database make some changes
3) Bring it back to mainframes and convert in back to Packed decimal.
Issue: When I convert from readable format (Zoned decimal) to packed decimal, in the output the starting position has 00. Also the conversion is ending at 91 instead of 90.
Please help to resolve the issue. PFb for the details:
Field Details:
Filed1 Start 1 Length 80 PIC X (80)
Field2 Start 81 length 10 PIC S9(13)V9(5) COMP-3
Field 3 Start 91 length 45 PICX(45)
1)
I used OUTREC fields to convert the packed decimal field:
OPTION COPY
OUTREC FIELDS=(1,80,X,
81,10,PD,TO=ZD,LENGTH=20,X,
91,44,X)
OUTREC FIELDS=(1,80,X,
81,10,PD,TO=ZD,LENGTH=20,X,
91,44,X)
Input before conversion:
----+----9
**********
l
0000014900
000028930C
**********
l
0000014900
000028930C
Input after conversion:
-
---+----9----+----0-
*********************
00000000002184993000
4FFFFFFFFFFFFFFFFFFFF
000000000002184993000
*********************
00000000002184993000
4FFFFFFFFFFFFFFFFFFFF
000000000002184993000
2) When I converting back from readable format (Zoned decimal) to Packed decimal, The output is not correct.
PFB the JCL, input and output
OPTION COPY
OUTREC FIELDS=(1,80,X,
82,20,ZD,TO=PD,LENGTH=10,X,
102,45,X)
OUTREC FIELDS=(1,80,X,
82,20,ZD,TO=PD,LENGTH=10,X,
102,45,X)
Input FIle:
----+----9----+----0-
*********************
00000000002184993000
4FFFFFFFFFFFFFFFFFFFF
000000000002184993000
*********************
00000000002184993000
4FFFFFFFFFFFFFFFFFFFF
000000000002184993000
----+----9-
**********
l
40000014900
0000028930C
**********
l
40000014900
0000028930C
Regards,
Navee N
Code'd