A single record, row, or input line is accepted from the designated source. Ensure that there is only one record in the file from which the ACCEPT command is getting the variables.
If multiple variables are coded, each is sequentially assigned input text up to the first white space character encountered that is not within a quoted string.
Input text for numeric values must be delimited only by white space or record boundaries. Input text for character strings must be enclosed in apostrophes. For example:
.Accept age, name from file info;
The data record provided to satisfy the preceding ACCEPT should include two fields. The following example shows two sample data records, where the first is correct but the next is not:
32 'Tom' /* This line contains valid data. */ 32 Tom /* Tom is invalid data. */
An additional method of placing comments in input text is as follows:
32 'Tom'; This line contains valid data.
When the number of variables listed is greater than the number of responses available, unused variables remain undefined (NULL). If there are not enough variables to hold all responses, a warning message is issued. If the input source is a file, the next record (starting with the first) of the file is always retrieved.