Subprogram NWUTJSUB: CICS Batch Job Submission Utility


If you have any questions about the content of this page, please contact CICS Requests for  clarification

The CICS batch job submission utility, NWUTJSUB, enables  CICS application programs to submit batch jobstreams.

  • The application program writes the desired JCL statements to a temporary  storage queue 
  • and then links to NWUTJSUB for submission of the job.
  • NWUTJSUB merely submits what is present in the temp storage queue. NO  EDITING IS PERFORMED.
  • Correct and complete jobstreams are entirely the user's responsibility.
  • No more than 999 records will be submitted.
  • There may be more than one batch JOB in the temp storage queue.

Batch jobs submitted from CICS are required to contain a valid JOB card. Jobs  submitted without any password data assume the logon ID of the terminal  operator. They will succeed or fail based on the batch ACF2 security rules for  that logon ID. Jobs submitted with password data run independent of the terminal  operator's logon ID.

01) Include in your program the COPY statement for  the work fields needed by NWUTJSUB:


which will generate the following:

       10  NWUTJSUB-COUNT  PIC S9(4) COMP.
       10 NWJSUB-RETURN    PIC X(1).
       10 FILLER           PIC X(4) VALUE  'NWJS'.
       10 NWUTJSUB-TERMID  PIC X(4).

02) Define the proper temp storage queue name by moving the invoking terminal  id to the NWRDC-supplied work field. For example,


03) Write JCL, data, etc. to the temp storage queue one 80 character card  image at a time. For example,

         FROM (cardimage) LENGTH (80)   

where "cardimage" is the COBOL data name of a PIC X(80) field which has been  loaded with the desired card image. Actually, the length may be less than 80,  but it must not be greater than that.

04) After writing the entire jobstream(s) to the temp storage queue, the  program links to NWUTJSUB. The exact command is:


Upon return, NWUTJSUB-RETURN will contain a return code indicating success or  failure. The possible values are:

    '0' = successful
    '1' = user's temp storage queue does not  exist
    '2' = queue records are greater than 80 bytes in length
    '3'  = more than 999 records in queue
    '4' = undetermined error with user's  temp storage queue
    '5' = error with internal reader contact NWRDC

NWUTJSUB COUNT will contain a count of the number of records read from the  temp storage queue and submitted via the internal reader.

05) The NWUTJSUB program will delete the temp storage queue regardless of the  success or failure of the request.

If this process is used to print a report, pay special attention to the  TIME=x JOB card option.

Remember, The print will not start until the batch job finishes.

  • If this form of report generation is used to produce print that needs to be  produced immediately (for example, to hand to a student), remember to use the  'TIME=(,x)' parameter on the job card with a carefully selected value for "x".
  • If no 'TIME=' value is specified, the assigned priority of that batch job  will be very low. It may print quickly in times of low utilization. But during  the Fall crunch, it may take several hours for such a job with to run.