INPUT command (C, C++, and COBOL)
The INPUT
command provides input for an intercepted
read and is valid only when there is a read pending for an intercepted
file. The INPUT
keyword cannot be abbreviated.
- text
- Specifies text input to a pending read.
Usage notes
- The text consists of everything between
the
INPUT
keyword and the semicolon (or end-of-line). Any leading or trailing blanks are removed by z/OS® Debugger. - If a semicolon (;) is included as part of the text, the text must be surrounded in quotation marks (") or apostrophes (') and conform to the syntax rules for a character string constant enclosed in quotation marks or apostrophes for the current programming language.
- If the text contains a quotation mark (") or apostrophe ('), the quotation mark or apostrophe must be followed by a matching quotation mark or apostrophe.
- This command is not supported for CICS®.
- To set interception to and from a file, use the
SET INTERCEPT
(C, C++, and COBOL) command. - The
INPUT
command cannot be used while you replay recorded statements by using thePLAYBACK
commands.
Example
You have used SET INTERCEPT ON
to make z/OS Debugger prompt
you for input to a sequential file. The prompt and the file's name
appears in the Command Log.
To substitute the input that would have come from the DD name specified
by the SET INTERCEPT ON
command with your desired
input, enter:
INPUT text you want to input ;
Program input is recorded in your Log window.
A closing semicolon (;) is required for this command. Everything
between the INPUT
keyword and the semicolon is considered
input text. If you want to include a semicolon, you must enter
your input as a valid character string for your programming language.
If you want to include a quotation mark (") or apostrophe (') in your
input, you must follow each quotation mark or apostrophe with a matching
quotation mark or apostrophe and enter the input as a valid character
string for your programming language.
Indicate that the phrase "quick brown fox" is input to a pending read. The phrase is written to the file.
INPUT quick brown fox;
Refer to the following topics for more information related to the material discussed in this topic.