3. Exit programs that issue EXEC CICS commands, and that use the
DFHEIENT macro, should use the DFHEIRET macro to set a return code
and return to CICS. See “Returning values to CICS” on page 10.

Example program

CICS supplies, in CICSTS32.CICS.SDFHSAMP,an example program, DFH$XTSE,
that shows how to modify fields in the command-level parameter structure passed
to EXEC interface exits. DFH$XTSE is listed on page AppendixF, “The example
program for the XTSEREQ global user exit, DFH$XTSE,” on page 877.
File control EXEC interface SPI exits XFCAREQ and XFCAREQC
The XFCAREQ exit allows you to intercept a file control system programming
interface (SPI) request before any action has been taken on it by file control. The
XFCAREQC exit allows you to intercept the response after a file control SPI request
has completed.
Note: For information about the XFCREQ and XFCREQC exits that are invoked for
file control API requests, see “File control EXEC interfaceAPI exits XFCREQ
and XFCREQC” on page 85.
The file control SPI requests intercepted are:
vEXEC CICS INQUIRE FILE
vEXEC CICS SET FILE.
Using XFCAREQ, you can:
vAnalyze the SPI parameter list (function, keywords, argument values, and
responses)
vModify any input parameter prior to execution of the request
vPrevent execution of a request and set appropriate responses.
Using XFCAREQC, you can:
vAnalyze the SPI parameter list
vModify any output parameter value and set responses after execution.
Youcan also:
vPass data between your XFCAREQ and XFCAREQC exit programs when they
are invoked for the same request.
vPass data between your file control exit programs when they are invoked within
the same task. Youcan pass data between successive invocations of XFCAREQ
and XFCAREQC and also between invocations of other EXEC-enabled user
exits.
If you make changes to file states (that is, if you open, close, enable, or disable a
file) it is possible that exits in the file state change program (XFCSREQ and
XFCSREQC) could modify situations set up by XFCAREQ. Therefore you must
consider the order in which the exits are invoked. If all four exits are enabled, the
order of invocation is as follows:
vFor the SET FILE command:
1. XFCAREQ
2. XFCSREQ
3. XFCSREQC
98 Customization Guide