IEFJFRQ — Subsystem Function Request Exit
Topics for This Exit Appear as Follows:
- Controlling the Exit Routine through the Dynamic Exits Facility
- Exit Routine Environment
- Exit Recovery
- Exit Routine Processing
- Programming Considerations
- Entry Specifications
- Registers at Entry
- Parameter List Contents
- Return Specifications
- Registers at Exit
- Coded Example of the Exit Routine
You can use the IEFJFRQ exit to tailor the subsystem interface (SSI) processing of subsystem function requests. See z/OS MVS Using the Subsystem Interface for more information on subsystem function requests.
- Prerequest — before the SSI routes either a directed or broadcast subsystem function request to the target subsystem(s). For broadcast requests, IEFJFRQ is called once for each subsystem defined to the SSI.
- Postrequest — after the SSI has routed either a directed or broadcast subsystem function request to all appropriate subsystems.
- Suppress commands or WTOs.
- Prevent calls to a specific subsystem, for example, a subsystem that is failing repeatedly.
- Route directed requests to a different subsystem.
- Interrupt a broadcast request, that is, cause the SSI to discontinue routing the broadcast request to the subsystems that have not yet processed the request.
- Maintain records of subsystem invocation.
- Enforce installation policies for subsystem invocation.
- Modify the return code that the caller of the SSI receives.
- Update records to reflect the results of function requests acted on by multiple exit routines during the prerequest processing.
- Modify the return code that the caller of the SSI receives.
Applications using the IEFJFRQ installation exit can determine whether it is available by testing the JESFRQEX flag in the JESFLG field of the JESCT data area.
Controlling the Exit Routine through the Dynamic Exits Facility
IBM® has defined the IEFJFRQ exit to the dynamic exits facility. You can refer to the exit by the name IEFJFRQ. You can use the EXIT statement of the PROGxx parmlib member, the SETPROG EXIT operator command, or the CSVDYNEX macro to control this exit and its exit routines.
You may install more than one exit routine at the IEFJFRQ exit point. Each exit routine can examine and modify the control blocks that represent the subsystem function request. The control blocks passed to the target subsystem reflect the modifications made by all installed exit routines.
- The CSVYDYNEX REQUEST=ADD macro
- The SETPROG EXIT,ADD command
- The EXIT ADD statement of the PROGxx parmlib member.
- The exit routine does not provide recovery, or the exit routine provides recovery but percolates the error
- The system allows a retry; that is, the recovery routine is entered with bit SDWACLUP off.
You can use the DELETE parameter on the CSVDYNEX macro, or the SETPROG EXIT,DELETE command to delete exit routines from IEFJFRQ. If the delete request does not specify FORCE=YES, the system will not free the exit routine's storage, since the IEFJFRQ exit supports callers in any PSW key. See z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN for more information on the FORCE parameter on the CSVDYNEX macro, and z/OS MVS System Commands for more information on the FORCE parameter on the SETPROG command.
Exit Routine Environment
- Enabled for interrupts
- In the state and key of the caller of the SSI (issuer of the IEFSSREQ service that produced the subsystem function request that drives this exit)
- In AMODE 31
- With any locks held by the caller of the SSI
- In primary ASC mode
- In the dispatch mode (task or SRB) of the caller of the SSI
- In the cross-memory mode of the caller of the SSI.
Exit Recovery
You should consider the resources accessed by your exit routine and the impact on system performance, when evaluating whether your exit routine should provide its own recovery. IBM recommends that you establish your own recovery only if you access system resources, and only for subsystem function requests that concern your exit routine.
- The exit routine abnormally ends and the exit routine does not provide its own recovery
- The error percolates beyond the exit routine's recovery routine
Exit Routine Processing
- Validated the SSOB and SSIB control blocks to ensure that these control blocks are addressable and have the correct eyecatchers and lengths. Note that an SSOB may have more than one acceptable length.
- Set the SSOBSSIB field in the SSOB control block to point to the life-of-job SSIB, if the original subsystem function request did not specify an SSIB control block. See z/OS MVS Using the Subsystem Interface for more information on the life-of-job SSIB.
- For
directed requests, IEFJFRQ is called:
- Once before the target subsystem receives control
- Once after the target subsystem receives control
Note that the postrequest instance is called even if the prerequest instance caused the SSI to bypass the call to the target subsystem.
- For broadcast requests, IEFJFRQ is called:
- Once when the MSTR subsystem is invoked to initiate the broadcast processing
- Once for each target subsystem
- Once after broadcast processing is complete and the request has been routed to all appropriate subsystems.
Note that the postrequest instance is called even if the prerequest instance caused the SSI to bypass all broadcast processing.
Prerequest processing:
IEFJFRQ receives control at the prerequest processing exit point before the SSI routes either a directed or broadcast subsystem function request to the target subsystem(s). Note that IEFJFRQ is invoked once for each subsystem receiving the request.
Postrequest processing:
IEFJFRQ receives control at the postrequest processing point after the SSI has routed either a directed or broadcast subsystem function request to all appropriate subsystems. Its primary purpose is to inform exit routines of the actions the SSI has taken with respect to the current subsystem function request.
Programming Considerations
IEFJFRQ exit routines must be reentrant.
Exit routines receive a pointer to the control blocks that represent the subsystem function request, which include the SSOB, SSIB, SSOB extension, and any areas pointed to from these control blocks. Exit routines should be careful when modifying any of these control blocks.
IEFJFRQ exit routines should not take actions that result in a call to the SSI, such as issuing a system command or dynamic allocation request. Actions that result in a call to the SSI could result in infinitely recursive calls to the IEFJFRQ exit. For example, an exit routine cannot issue an SVC WTO when processing a WTO/WTOR function request (SSI function code 9).
- The token is not valid if the system clock is not operating
- The first 8 bytes of the token are unique over the life of an IPL on a single system
- The 8-byte single system token concatenated with the 4-byte system ID in the parameter mapping form a 12-byte token that is unique across a sysplex.
Performance Considerations:
- Exit routines installed at the IEFJFRQ exit point should not perform operations that may degrade system performance, such as; issuing WAIT requests, issuing requests for large amounts of dynamic storage, or issuing I/O requests. To reduce the need for storage requests, the system provides an area that your exit routine can use for dynamic storage. The FRQP_DYNSIZE constant in the IEFJFRQP parameter mapping defines the size of the dynamic storage area. The exit routine must clear the dynamic storage area before using it, because all exit routines installed at the IEFJFRQ exit point use the same work area.
- Exit routines should quickly determine whether the current subsystem function request is of interest, and return to the system immediately if not. Time consuming operations, such as obtaining storage, should be deferred until after this check. You can delay the establishment of recovery to perform this check, as long as the check references only information identified by the input control blocks, that is, the IEFJFRQP parameter area, the SSOB, and the SSIB.
Entry Specifications
- The address of the SSOB control block representing the subsystem function request
- Flags that indicate:
- Which instance (prerequest or postrequest) of the exit is being called
- Whether the subsystem function request is a broadcast request
- Whether the SSIB is a copy of the life-of-job SSIB or was provided by the SSI's caller.
- The current value of the return code that is passed back to the caller of the SSI, if IEFJFRQ does not change this value.
- A token that you can use to correlate exit calls resulting from a single subsystem function request.
For directed requests, the current return code value is always zero for the prerequest instance of the exit.
Every broadcast request begins as a subsystem function request directed to the MSTR subsystem. The SSI cannot determine if the request represents a broadcast request until the MSTR subsystem processes this request. Therefore, the broadcast indicator is not set when the SSI calls the prerequest instance of IEFJFRQ for a request directed to the MSTR subsystem, even if the request will eventually be a broadcast request.
Registers at Entry: The contents of the registers on entry to the exit are as follows.
- Register
- Contents
- 0
- Does not contain any information for use by the exit routine
- 1
- Address of a list of pointers
- 2-12
- Does not contain any information for use by the exit routine
- 13
- Register save area
- 14
- Return address
- 15
- Entry point address of IEFJFRQ exit routine
- The address of the IEFJFRQP parameter area
- The address of the working storage that the system provides for use by the exit routine.
Return Specifications
- A return code passed in register 15 that controls the system's processing of the subsystem function request
- A return code in register 0 that is passed to the caller of the SSI.
For the prerequest instance of the IEFJFRQ exit, the return code passed in register 0 for the caller of the SSI is used only if the return code passed in register 15 indicates that the SSI should not pass the subsystem function request to the target subsystem.
For the postrequest instance of IEFJFRQ, the return code passed in register 0 is passed back to the caller of the SSI. You can preserve the return code that would be returned by the SSI by copying FRQP CURRENT SSI RETCODE in register 0. Register 0 must contain one of the return code values defined in the IEFSSOBH mapping macro.
- The SETPROG EXIT command
- The EXIT statement of the PROGxx parmlib member
- The CSVDYNEX macro services.
If multiple exit routines match the ATTRIB KEEPRC criteria, the system returns information from the exit routine that finished first.
Note that the KEEPRC function specifies tests to be performed on the return code set in register 15 on exit from the IEFJFRQ exit routine. The results of the tests control the information that is returned to the SSI, that is, both the exit's return code in register 15 and the SSI caller's return code in register 0.
If you do not specify the ATTRIB KEEPRC function, the system returns the information from the exit routine with the largest return code value. If multiple exit routines return with the same value, the value in the exit routine that finished first will be returned.
Registers at Exit: Upon return from the exit processing, the register contents must be as follows.
- Register
- Contents
- 0
- Return code to be provided to the caller of the SSI
- 1
- The exit routine does not have to place any information in this register, and does not have to restore its contents to what they were when the exit routine received control.
- 2-14
- Restored to contents on entry
- 15
- One
of the following return codes:
- Return Code
- Explanation
- 0
- Route the subsystem function request to the target subsystem
- 4
- Do not route the subsystem function request to the target subsystem
- 8
- Do not route the subsystem function request to the target subsystem, or for broadcast requests, do not route the subsystem function request to any remaining subsystem that has not yet processed the request.
- 24
- Do not route the subsystem function request to the target subsystem, or for broadcast requests, do not route the subsystem function request to any remaining subsystem that has not yet processed the request. Do not call any remaining IEFJFRQ exit routines.
The IEFJFRQP macro provides mnemonic names for the return code values.
Coded Example of the Exit Routine
A sample IEFJFRQ exit routine is provided in SYS1.SAMPLIB (in member IEFJSXIT).