So basically, the format is DECIMAL(14,4)/PIC s9(10)V9(4) comp-3. I am trying to reformat this decimal field ( ONLY right portion of it after decimal ('.')to its max limit by adding zeroes as needed).
And later on I will rewrite this field as PD or if you can do it in the same step then thats is good.
I have tried something but that has more hardcoding stuff, so the approach was to take left portion of it (before '.') and multiply by 10000 and add right portion ( after'.') to it.
123.67 ---> 123 multiply by 10000
1230000--- add/overlay 6700 .
1236700--- rewrite as PD
So when I read into PIC s9(10)V9(4) comp-3 then I get the right value back.
A couple of things. You don't need the ABSPOS=1. That is the default value for the initial PARSEd field. You need ABSPOS when you want to start the next PARSEd field at a position other than it would naturally be (you want to skip some bytes, or include in the PARSE something you've already PARSEd).
There's also a little thing with ALTSEQ, which removes the need for the FINDREP.