PULL
The current head-of-queue is read as one string. Without a
template_list
specified, no further action is
taken (and the string is thus effectively discarded). If specified, a
template_list is usually a single template, which is a list of symbols
separated by blanks or patterns or both. (The template_list can be several
templates separated by commas, but PULL parses only one source string; if you specify several
comma-separated templates, variables in templates other than the first one are assigned the null
string.) The string is translated to uppercase (that is, lowercase
a–z to uppercase A–Z) and then
parsed into variables according to the rules described in the section on parsing (see Parsing). Use the PARSE PULL instruction if you do not desire uppercase
translation.
- Terminal (TSO/E foreground)
- Input stream, which is SYSTSIN (TSO/E background).
In non-TSO/E address spaces, if the data stack is empty, PULL reads from the input stream as defined by the file name in the INDD field in the module name table (see Module name table). The system default is SYSTSIN. If SYSTSIN has no data, the PULL instruction returns a null string.
The length of each element you can place onto the data stack can be up to one byte less than 16 megabytes.
Say 'Do you want to erase the file? Answer Yes or No:'
Pull answer .
if answer='NO' then say 'The file will not be erased.'Here the dummy placeholder, a period (.), is used on the template to isolate the
first word the user enters.
The QUEUED built-in function (see QUEUED) returns the number of lines currently in the external data queue.
