PURPOSE: The ACCEPT statement allows field values to be entered directly from the terminal while the. Process Module (PM) is executing.
ACCEPT \\fields\\ [HUSH] [IF; UNLESS clause] [iterate clause]
fields |
specifies that field into which data will be entered; fields can be global, system, declared, or Data Set (DS). |
TYPE “Enter Author and Book TITLE”, @CR, ‘:’, NOCR
ACCEPT AUTHORS:D, BOOK_TITLE HUSH
NOTES: For multiple field input, data can be entered at the terminal by typing a carriage return after each entry or separating entries on one line with the character stored in @DELIM (a comma by default).
Input is accepted until values for all requested objects have been entered. Additional data on a typed line is ignored and a warning message is displayed.
Input edit and VALID clauses will be applied to the data input if they are defined for a given field.
Input for the ACCEPT statement can be taken from a System File (SF) if one is declared.