CALL statement

Defines a new job step and specifies the external JCL job to run.

Syntax

Pseudo-JCL CALL syntax

Parameters

label
The step name.
MEMBER
The external JCL file to run. Specify either a fully qualified sequential data set or a member of a PDS specified in the DD statement labeled CCUPROC.
WAIT
Specifies whether the build server should wait for the completion of this step before executing the next step. This parameter can have one of the following possible values:
yes
Waits for 30 seconds before executing the next step.
no (the default value)
Does not wait before executing the next step.
nnn
Waits for the specified number of seconds before executing the next step.
COND
code
The value to test against the return code in a prior step.
op
The comparison operator.
step
The name of the step that issues the return code.
Consider the following issues when calling external JCL from pseudo-JCL:
  • If WAIT=NO is specified (or is implied by default) the build continues with any following step, with the return condition of the called JCL assumed to be 0. In this case the called JCL job completes independently and the build server is unaware of that execution.
  • If WAIT=YES or WAIT=nnn is specified, there must be a variable defined, with the following information defined in the VARS card:
      CCULIB=buildServerLoadLibrary
    buildServerLoadLibrary
    The build server load library.
  • For WAIT=YES or WAIT=nnn, the JCL to be submitted is modified by the build server, which adds a step at the end to capture the job termination. This step writes a value to a temporary data set based on the return code of the last step in the submitted job. The build server uses this value for the return code of the step.
    Only the following return codes are possible:
    0, 4, 8, 12, 16, 20
    The job must end normally for the return code to be available. If the job ends with a return code other than one of those previously mentioned, the code is set to 20. The build server waits for the specified time (for WAIT=YES, the time is 30 seconds) for the job to complete, after which the build server assumes that the job completed with return code 20.
  • The content of the JCL file is expected to be a standalone job stream, with an appropriate job card.
  • The specified JCL is submitted for execution after being modified to substitute any variables known to the pseudo-JCL.

Example

The following example shows a pseudo-JCL file that uses the CALL statement:
//V VARS CCULIB=SYS1.SCCULOAD
//T0 EXEC PGM=IEFBR14
//T1 CALL MEMBER=MISC.JCL(COBCOMP),WAIT=YES,COND=(0,EQ,T0)
 
//T2 EXEC PGM=IEFBR14,COND=(0,EQ,T1) 
// 

Feedback