Page 1 of 1
Spaces to COMP-3 field in Mainframe
Posted: Mon Oct 12, 2009 6:05 am
by svga
Hi,
Is it possible to populated spaces to COMP-3 field? Thanks
Posted: Mon Oct 12, 2009 7:00 am
by Sainath.Srinivasan
Technically Yes. Functionally No.
What do you want to do ?
Posted: Mon Oct 12, 2009 7:14 am
by chulett
In COBOL it would involve a REDEFINES and you'd end up with a number like 202020.20 or some such. Or 404040.40, depending on the ascii versus ebcdicness of it, from what I recall.
Posted: Mon Oct 12, 2009 7:46 am
by svga
The target datatype is S999 COMP-3. I need to move spaces to this field
Posted: Mon Oct 12, 2009 2:14 pm
by ray.wurlod
Why? Spaces is not valid as COMP-3. Read again the advice above. It can only work if you re-define the field as something that will take spaces, typically PIC X(n).