ANSI ACCEPT and DISPLAY Verbs

The ACCEPT and DISPLAY verbs have ANSI formats that provide strict compatibility with the ANSI definition of these verbs. ACCEPT and DISPLAY also have expanded ACUCOBOL-GT formats that are not ANSI-compliant but offer more functionality. The ANSI definition is quite limited in that it does not provide any screen control facilities. However, these verbs can be useful when you are:

The ANSI formats of ACCEPT and DISPLAY are subsets of the extended ACUCOBOL-GT formats. Thus, the compiler needs guidance in determining which format is desired. This is important because different formats result in different behavior. When examining an ACCEPT or DISPLAY statement, the compiler applies the following rules, in order:

  1. If you specify FROM CRT or UPON CRT, the compiler uses ACUCOBOL-GT format.
  2. If you specify a FROM or UPON phrase for a device other than CRT, the compiler uses ANSI format.
  3. If you use any ACUCOBOL-GT extensions, the compiler uses ACUCOBOL-GT format.
  4. If you place the phrase CONSOLE IS CRT in Special-Names, the compiler uses ACUCOBOL-GT format.
  5. If you use the compile-time option -Ca (ANSI compatibility), the compiler uses ANSI format.
  6. Otherwise, the compiler uses ACUCOBOL-GT format.
Note: By default, the compiler uses ACUCOBOL-GT format.