RJE Function

The RJE function enables an online or batch application program to submit jobs to the operating system for scheduling and execution in the batch environment. Card input via a batch job input stream is simulated through use of an internal pseudo card reader defined to Com-plete.

Job stream data to be submitted is stored in the working storage area of the application program. When the job stream data is submitted with the RJE function, the amount of data must be specified in bytes. The number specified must be a multiple of 80.

The application program using the RJE function may have a need to submit more job stream data than can contiguously be stored in the working storage area of the application program at any one time. Consequently, submission of the job stream data might require more than one use of the RJE function to, in effect, submit portions of the job stream data. This feature is provided for by the RJE function.

Format

The format for using the RJE function is:

RJE (retcode,area,length[,options]) 
retcode Required.
A fullword where Com-plete places the return code upon completion of the operation.
area Required.
A buffer area in the working storage area of the application program that contains the job stream data to be submitted.
length Required.
A binary halfword containing the length of the job stream data, in bytes, to be submitted. This value must be a multiple of 80.
options Optional.
A binary halfword containing the processing options to be invoked at the time of RJE submission.
"X8000" indicates that the internal reader will be held for additional RJE submission by the currently executing program after execution of the RJE function. The absence of this argument indicates that the reader is to be made available immediately for use by other programs.
If the application terminates, Com-plete will free the reader (if held). However, the reader is not freed over a screen I/O or rollout function. This may cause operational problems, so please be cautious about using the HOLD option.
Return Codes

The following return codes are issued by the RJE function:

0 The job stream data was successfully submitted.
4 The job stream was not successfully submitted. In this situation, the pseudo card reader defined to Com-plete is in use by another application program. The application program receiving a return code value of 4 should normally reissue the RJE request. Continued receipt of a return code 4 can indicate a potential operational problem, notify the system programmer.
8 The RJE functions have been disabled.
12 RJE submit aborted by user exit.
Abends

An abnormal termination may occur during execution of the RJE function. Possible causes include:

  • An invalid area or length argument was specified;

  • The length argument is not a multiple of 80.