COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
9 Procedure Division Verbs
This section describes the COBOL verbs that you can use in the Procedure Division, in alphabetic
order. The descriptions of some verbs, such as ADD and INSPECT, show more than one syntax
format.
For descriptions of the COPY and REPLACE verbs, which you can use in any divisions, see COPY
Statement (page 499) and REPLACE Statement (page 508).
ACCEPT
ACCEPT With Mnemonic-Name
ACCEPT with a mnemonic-name delivers small amounts of data to a process from a terminal or
another process.
accept-name
is the identifier of an elementary item or data structure (not an index-name, index data item,
special register, or national data item) in which the process can store accepted data.
mnemonic-name
identifies a terminal or another process from which the process can accept data. You must
associate mnemonic-name with a terminal or file name in the Environment Division (see
SPECIAL-NAMES Paragraph (page 105)).
NOTE: If mnemonic-name is associated with CONSOLE in the SPECIAL-NAMES paragraph,
you cannot use it in an ACCEPT statement. CONSOLE maps to $0, an output-only device.
Usage Considerations:
• Differences in the OSS and Guardian Environments
In the OSS environment but not in the Guardian environment:
◦ No prompt is given for an ACCEPT statement.
◦ If an ACCEPT statement includes mnemonic-name, it must be the OSS pathname of a
Guardian process or terminal. If mnemonic-name is an OSS device, the compiler issues
a warning and the default input device (#IN) is used instead.
• If mnemonic-name Is Not Specified
If you omit the phrase FROM mnemonic-name, the process accepts data from its default
input device or default input-output device. (See Specifying Default Input and Output Devices
(page 826) or Specifying a Default Input-Output Device (page 822).) The default input device
or default input-output device is usually the home terminal, except in a Pathway environment
where the COBOL run unit is functioning as a server. In that case, the server class command
SET SERVER determines the default input device or default input-output device (see the TS/MP
System Management Manual).
• Specifying the Default Input-Output Device as mnemonic-name
If you want the process to accept data from its default input-output device, omit the FROM
phrases from the ACCEPT statements and specify a default input-output device before executing
the program. (See Specifying Default Input and Output Devices (page 826) or Specifying a
278 Procedure Division Verbs










