ULSRRJE - Remote Job Entry User Exit

ULSRRJE is a user-written routine used to examine and/or modify the RJE input data submitted for background processing via the RJE function call. This exit is similar in capability and function to the UEDIT RJE exit UUEEX3. ULSRRJE, however, has the advantage of being able to process RJE requests from any source, not just the editor. Possible uses for this exit include:

  • To syntax-check JCL;

  • To enforce installation standards;

  • To insert UQ security statements into the input stream.

ULSRRJE is loaded dynamically at Com-plete initialization. The address of the module is found in COMREG, field AUSRRJE. It is given control via call from TLSRRJE before RJE begins: once before each card image is passed to the operating system, and at the end of the data.

The module is invoked with service-routine status (that is, it is in Com-plete's protect key, and all Com-plete and supervisor calls are valid). Note that if an abend occurs in the exit, Com-plete terminates abnormally. The exit routine must be reentrant to allow for multiple thread access.

Com-plete user program functions (MCALL) are not available to the exit. Any environmental data (user ID, TID, etc.) must be obtained from the standard Com-plete control blocks passed to the exit.

This document covers the following topics:


How to Use ULSRRJE

Upon entry to ULSRRJE, registers are set according to the Com-plete convention (R2=COMREG, R3=UPCB, R4=THCB, R5=TIB, R13=18-fullword save area, R14=return address, R15=entry point).

R1 contains the address of a parameter list. Word 1 of the parameter list contains the address of a return code halfword that has been initialized to zero. Word 2 of the parameter list contains the address of the requesting RJE parameter list. Word 3 of the parameter list contains the address of the call-type flag byte (character). Word 4 of the parameter list contains the address of the statement being submitted.

Note that the last parameter address is not valid if the call-type byte is S.

Upon return from the exit, the return code halfword is examined and processed.

At the end of the job stream, the call-type is set to E and ULSRRJE is called repeatedly until a return code of 0 or 12 is given.

A statement can be modified by ULSRRJE by simply changing it in the data area addressed by the fourth word and returning with return code 0.

Once a return code of 12 or more is returned by ULSRRJE, no further calls are made to the exit.

ULSRRJE Conventions

The following table summarizes the linkage conventions of ULSRRJE.

Feature Convention
Attributes None required.
Type Nucleus.
Size No restrictions.
Registers at Entry
Register 1 Address of the parameter list
Register 2 Address of the COMREG
Register 3 Address of the UPCB
Register 4 Address of the THCB
Register 5 Address of the TIB
Register 13 18-fullword save area
Registers at Return All registers must be unchanged.
Parameters
Word 1 Address of a return code halfword
Word 2 Address of the requesting RJE parameter list
Word 3 Address of a flag byte indicating the type of call:
S start of the job submission before the first statement
sp (space) statement being submitted
E end of the submission following the last statement
Word 4 Address of the statement being submitted
Return Codes
0 Normal return. Process the next statement unless end-of-file.
4 Delete the current statement. Valid only if the call-type=space.
8 Insert statement before the current card image. Statement to be inserted was placed in the data area pointed to by word 4 of the parameter list. After inserting the statement, TLSRRJE will again call ULSRRJE with the original card image until a different return code is received. A return code of 8 is valid only for call-types of space and E.
12 Abort the submission, passing return code 12 to the application program.
16 Abort the submission, terminating the application program. An online dump is taken.
Considerations
a Is given control when called from TLSRRJE before RJE begins : once before each card image is sent to the z/OS, and at end-of-data.
b Must be reentrant in order to allow multiple thread access.
c Is invoked with service-routine status in Com-plete's protect key. All supervision calls are valid.
d Com-plete user program functions are not available to the exit.
e Environment data must be obtained from the standard Com-plete control blocks passed to the exit.
f Called in Com-plete's key.
g All control blocks and areas passed for the use of the exit will be in Com-plete's key.
h Active thread will generally be in a different key to Com-plete's key.