Whereas I want output in this case as zeroes and if it is not spaces in input; input should be converted into output display format as per the edit field shown above.
How can I do this in the single pass of the input file ?
Whereas I want output in this case as zeroes and if it is not spaces in input; input should be converted into output display format as per the edit field shown above.
How can I do this in the single pass of the input file ?
Fields defined with COMP-3 attributes cannot contain spaces. It's a sort of bullshit.
S9(13)V9(2) COMP-3 fields may look like this:
Code:
X'012345678901C' - for +123456789.01
X'000000000001D' - for -.01
etc.
Find out accurately: what you really have on input?
Before that try to understand the difference between packed decimals (PIC COMP-3), and character/numerics (PIC 999999, or PIC XXXXX )
Regarding why originally data is spaces in this field; I have no idea.
Then thats the idea to start with to know what you say is true and find out is it even possible to have one like this case , because it doesn't make sense what you describe.
Run this yourself and check what happens to spaces.