ACUCOBOL-GT format 5 ACCEPT extension.

Format 5

ACCEPT dest-item FROM {ENVIRONMENT} env-name

      [ ON EXCEPTION statement-1 ]

      [ NOT ON EXCEPTION statement-2 ]

      [ END-ACCEPT ]

Syntax Rules

  1. dest-item is a data item that receives the accepted data. It must be USAGE DISPLAY unless the WITH CONVERSION phrase is also used.
  2. EXCEPTION and ESCAPE are equivalent.
  3. A NOT AT END phrase may not be paired with an ON EXCEPTION phrase, nor may a NOT ON EXCEPTION phrase be paired with an AT END phrase.
Note: ACCEPT FROM CONFIGURATION is not supported.

General Rules

  1. A Format 5 ACCEPT statement returns values from the user's environment. Env-name is the name of the environment setting whose value is to be returned. The value returned from this item is moved to dest-item.
    Note: ACUCOBOL-GT allows you to specify an ACUCOBOL-GT runtime configuration variable for Env-name. This COBOL system does not support specifying runtime configuration variables.