I have defined a group variable in a COBOL program as
05 VAR1 PIC X(10).
05 VAR2 PIC 9(2).
05 VAR3 PIC 99.99.
Now I moves the following values to VAR1, VAR2 and VAR3 respectively.
After this move I am initializing the group variable GROUP-VAR by the following statement
INITIALIZE GROUP-VAR REPLACING NUMERIC BY ZEROS
ALPHANUMERIC BY SPACES.
But when I display the values of variables VAR1,VAR2 and VAR3 after initialize. I find that
it works for VAR1 and VAR2 as intended but VAR3 which is edited numeric remains un initialized.
Value of VAR3 after initialization
What could be the reason for such behavior?