I need to convert a character field(Contains numeric data) to PD format.
input file declared as below:-
PREM(Position 28:44) PIC -(13)9.99.
RATE(Position 47:53) PIC -(3)9.99.
RATE(Position 47:53) PIC -(3)9.99.
Input file have below record:-
----+----1----+----2----+----3----+----4----+----5---
***************************** Top of Data ***********
NH51418241IDBI014E 20200525 18.17YM 2.98
**************************** Bottom of Data *********
***************************** Top of Data ***********
NH51418241IDBI014E 20200525 18.17YM 2.98
**************************** Bottom of Data *********
In the Sort card, I have mentioned as below:-
//SYSIN DD *
OPTION COPY
OUTREC OVERLAY=(28:28,14,SFF,TO=PD,LENGTH=14,
43:43,2,SFF,TO=PD,LENGTH=2)
/*
OPTION COPY
OUTREC OVERLAY=(28:28,14,SFF,TO=PD,LENGTH=14,
43:43,2,SFF,TO=PD,LENGTH=2)
/*
I got this output and it is not correct format.
NH51418241IDBI014E 20200525 a@YM ð
DCFFFFFFFFCCCCFFFC4FFFFFFFF00000000000000087ED0000028
5851418241942901450202005250000000000000011F84000009F
DCFFFFFFFFCCCCFFFC4FFFFFFFF00000000000000087ED0000028
5851418241942901450202005250000000000000011F84000009F
My expected output should be as below:-
NH51418241IDBI014E 20200525 a@YM ð
DCFFFFFFFFCCCCFFFC4FFFFFFFF00000087ED028
5851418241942901450202005250000011C8409C
DCFFFFFFFFCCCCFFFC4FFFFFFFF00000087ED028
5851418241942901450202005250000011C8409C
Can you please help me solve this pblm?
Thanks