SET INTERCEPT command (C and C++)
Intercepts input to and output from specified files. Output and prompts for input are displayed in the log.
Only sequential I/O can be intercepted. I/O intercepts remain in
effect for the entire debug session, unless you terminate them by
entering SET INTERCEPT OFF command. The initial
setting is OFF.
ON- Turns on I/O interception for the specified file. Output appears
in the log, preceded by the file specifier for identification. Input
causes a prompt entry in the log, with the file specifier identified.
You can then enter input for the specified file on the command line
by using the
INPUTcommand. OFF- Turns off I/O interception for the specified file.
FILE file_spec- A valid
fopen()file specifier includingstdin,stdout, orstderr. TheFILEkeyword cannot be abbreviated.
Usage
notes
- For Enterprise COBOL for z/OS® Version 5,
ACCEPTis not supported. - Intercepted streams or files cannot be part of any C I/O redirection during the execution of a nested enclave.
- You cannot use the
SET INTERCEPTcommand while you replay recorded statements by using thePLAYBACKcommands.
Examples
Turn on the I/O interception for the
fopen() file
specifier dd:mydd. The current programming language
setting is C. SET INTERCEPT ON FILE dd:mydd;Refer to the following topics for more information related to the material discussed in this topic.
- Related references
- INPUT command (C, C++, and COBOL)
- SET REFRESH command (full-screen mode)
