The FTCHKJES user exit

FTCHKJES is called if the server is in FILETYPE=JES mode and the client tries to submit a job. The exit can allow or refuse the job to be submitted to the JES internal reader based on any criteria passed to the exit. For example, the exit can look for a USER= parameter on the JOB statement and check it against the client’s user ID. The reply 550 User Exit refuses this job to be submitted by userid is sent to the user if the remote job submission is denied. The following parameter list is passed to FTCHKJES.
Offset
Value
+0
Pointer to the word with the return code
+4
Pointer to a word containing the number of following parameters (13)
+8
Pointer to the 8-character user ID that is logged on
+12
Pointer to the buffer containing the current logical record being submitted
+16
Pointer to a word with the number of bytes in the buffer
+20
Pointer to a word containing the JES LRECL being used
+24
Pointer to a word containing the logical record number
+28
Pointer to a word containing the total number of bytes transferred so far
+32
Pointer to a word containing the unique client ID
+36
Pointer to a word containing the JES RECFM (0 for fixed, 1 for variable)
+40
Pointer to a word containing the JES user exit anchor. (One possible use of this anchor is to provide the exit routine with a location to store the address of a persistent storage area for handling multiple calls.)
+44
Pointer to a copy of the socket address structure for the client's control connection. This area is mapped by the SOCKADDR DSECT found in the sample exit. The FAMILY field denotes whether the structure contains an IPv4 or an IPv6 address. When the family is AF_INET, the structure contains an IPv4 address. When the FAMILY is AF_INET6, you must inspect the address itself to determine whether it is an IPv6 address or an IPv4 mapped IPv6 address.
+48
Pointer to a copy of the socket address structure for the server's control connection. This area is mapped by the SOCKADDR DSECT found in the sample exit. The FAMILY field denotes whether the structure contains an IPv4 or an IPv6 address. When the family is AF_INET, the structure contains an IPv4 address. When the FAMILY is AF_INET6, you must inspect the address itself to determine whether it is an IPv6 address or an IPv4 mapped IPv6 address.
+52
Pointer to a buffer containing a 2-byte length followed by the session identifier created by the daemon when the connection was first established for this session. The identifier is unique within this instance of the daemon. It is included in messages written to SYSLOG and can be used similarly by the exit. It is preferred over the similar client ID found at +32 in the parameter list.
+56
Pointer to a 256-byte scratchpad buffer, which can be used to pass information between user exits. All exits receive a pointer to this buffer, except FTCHKIP and FTCHKPWD. FTP does not query or alter the contents of the scratchpad at any time. The extended tracing (DUMP) identifier of the scratchpad is 87. If extended tracing of the scratchpad is requested, the contents are dumped after execution of the user exit.
The return code word is initialized to 0 so the user exit can return without changing it if there is a correct return code. Any other return code denies access to the resource in question.