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.

Read syntax diagramSkip visual syntax diagram
>>-INPUT--text--;----------------------------------------------><

text
Specifies text input to a pending read.

Usage notes

Example

You have used SET INTERCEPT ON to make Debug Tool 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.