Previous Topic Next topic Print topic


ACCEPT Fields at the Edge of the Screen

If your program contains an ACCEPT statement for a numeric data item at a position on the screen where the definition of the numeric data item would cause the ACCEPT field to go beyond the right-hand edge of the screen, both COBOL systems will truncate the input value. In RM/COBOL, the input value will be aligned into the ACCEPT field as an alphanumeric field, whereas in Studio Enterprise Edition, the input value is aligned as a numeric field.

Change the definition of the relevant PICTURE clause from numeric to alphanumeric. Alternatively, change the PICTURE clause so that the field does not go beyond the edge of the screen.

Example

If your program contains the following statement:

ACCEPT data-item AT COLUMN NUMBER 75.

where data-item is a numeric data item defined as PIC 9(10), a value of 123456 entered into the ACCEPT field will be held under Studio Enterprise Edition as "0000123456". However, in RM/COBOL, the value in the ACCEPT field would be held as "1234560000". To allow Studio Enterprise Edition to emulate the RM/COBOL behavior, alter the definition of the data item in your program to PIC X(10) or PIC 9(6).

Previous Topic Next topic Print topic