andreymurom
Programmer
Hello everybody,
My program uses 2 fields that are passed parameters from another another program where they are defined as a character fields. The data in these fields is numeric and I want to do some numeric operations on them.
They are defined as:
01 PGM-PARM.
...
05 FROM-AMT PIC -(8)9.
05 TO-AMT PIC -(8)9.
...
Then I have temporary numeric fields in the program (Thank you very much, Betty Scherber, for the great advice! It's worked.):
01 FROM-AMT-NUM PIC S9(9).
01 TO-AMT-NUM PIC S9(9).
Then I move parms into the numeric fields:
MOVE FROM-AMT TO FROM-AMT-NUM.
MOVE TO-AMT TO TO-AMT-NUM.
There is no problem with the negative numbers coming from the calling program. But when it moves positive numbers it gives an error:
Message . . . . : Floating character in numeric-edited sending field at statement 414 was not valid (C D F G).
Cause . . . . . : During the de-editing of a numeric-edited field containing the floating PICTURE character +, -, or $, a leading floating character was not found, or it was located at the wrong position in the field.
The value in the sending field when this happens looks like : "000001000".
Thank you
My program uses 2 fields that are passed parameters from another another program where they are defined as a character fields. The data in these fields is numeric and I want to do some numeric operations on them.
They are defined as:
01 PGM-PARM.
...
05 FROM-AMT PIC -(8)9.
05 TO-AMT PIC -(8)9.
...
Then I have temporary numeric fields in the program (Thank you very much, Betty Scherber, for the great advice! It's worked.):
01 FROM-AMT-NUM PIC S9(9).
01 TO-AMT-NUM PIC S9(9).
Then I move parms into the numeric fields:
MOVE FROM-AMT TO FROM-AMT-NUM.
MOVE TO-AMT TO TO-AMT-NUM.
There is no problem with the negative numbers coming from the calling program. But when it moves positive numbers it gives an error:
Message . . . . : Floating character in numeric-edited sending field at statement 414 was not valid (C D F G).
Cause . . . . . : During the de-editing of a numeric-edited field containing the floating PICTURE character +, -, or $, a leading floating character was not found, or it was located at the wrong position in the field.
The value in the sending field when this happens looks like : "000001000".
Thank you