Job Control Language (JCL) is a scripting language used on a mainframe to instruct the system on how to run a batch job. In AWS Blu Insights, it is handled in the mainframe group following the statements listed below.
DD DSN
The call on DD +DSN
can implies dependencies on “DATASET” object, “FILE_DEFINITION” object and a control card (.CTL).
//file-defintion-name DD (DISP=SHR,)? DSN(AME)?=dataset-name(controlcard-file)
Where file-defintion-name
, dataset-name
and controlcard-file
are respectively a “FILE_DEFINITION” object, a “DATASET” object and the name of a control card in the project. controlcard-file
and file-defintion-name
are optional. Dynamic dataset-name
, i.e with a name containing “%%” or “&”, are not handled yet.
DLBL
The call to DLBL
implies a dependency on a Mainframe file.
DLBL file_def 'mainframe_file'
Where file_def
is the name of the file definition and mainframe_file
the name of a mainframe file in the project.
EXEC PGM
The call to EXEC PGM
implies a dependency on a COB, EZT, REXX, PL1 or RPG file.
EXEC PGM=program_file ... PROGRAM=program
EXEC PGM=program_file ... PROG=program
EXEC PGM=program_file ... PGMNAME=program
EXEC PGM=program_file ... PGMNAME='program'
EXEC PGM=system_utility PARM=(program_type,program_name,psb_name, ...) ... PROGRAM=program
EXEC PGM=system_utility PARM=('program_type',program_name,psb_name, ...) ... PROGRAM=program
EXEC PGM=system_utility PARM='program_type,program_name,psb_name, ...' ... PROGRAM=program
Where program_file
can be the raw name of a file or a variable (&program_file
) containing a filename. PROGRAM, PROG and PGNAME
are parameters pass to program_file
and program
(JCL, PROC, COB, EZT, REXX, PL1 or RPG) the name of the program to be executed. PARM=( ... )
or PARM=' ... '
is optional parameter.
When system_utility
is configured with some system utility program (DFSRRC00, DLIBATCH, DBBBATCH, IMSBATCH and IMSFP) and the program_type
as DLI, BMP, DBB, IFP. The system utility program uses PARM
parameter to execute a COBOL program mentioned in program_name
and PSB file mentioned in psb_name
.
We can also call an in-stream procedure thanks to the EXEC PGM
statement. In that case, it will create no dependency.
EXEC PROC
The call to EXEC PROC
implies a dependency on a JCL, PROC, COB, EZT, REXX, PL1 or RPG file.
EXEC PROC=procedure_file ... PROGRAM=program
EXEC PROC=procedure_file ... PROG=program
EXEC PROC=procedure_file ... PGMNAME=program
EXEC proc=procedure_file ... PGMNAME='program'
EXEC procedure_file ... PROGRAM=program
EXEC procedure_file ... PROG=program
EXEC procedure_file ... PGMNAME=program
EXEC procedure_file ... PGMNAME='program'
Where procedure_file
can be the raw name of a file or a variable (&procedure_file
) containing a filename. PROGRAM, PROG and PGNAME
are parameters pass to procedure_file
and program
the name of the program to be executed.
We can also call an in-stream procedure thanks to the EXEC PROC
statement. In that case, it will create no dependency.
RUN PROG
The call to RUN PROG
implies a dependency on a JCL, PROC, COB, EZT, REXX, PL1 or RPG file.
RUN PROG(program_file)
Where program_file
can be the raw name of a file or a variable (&program_file
) containing this name.
RUN PROGRAM
The call to RUN PROGRAM
implies a dependency on a JCL, PROC, COB, EZT, REXX, PL1 or RPG file.
RUN PROGRAM(program_file)
Where program_file
can be the raw name of a file or a variable (&program_file
) containing this name.
SQL STATEMENT
In JCL program, SQL statements are getting executed in the in-stream data section. In-stream data will never begin with //
. End of the in-stream can be identified by line begins with // or /* or //*
and sometimes end of the file.
//SYSIN DD *
SELECT * FROM TABLE_NAME;
//SYSIN DD DATA
UPDATE TABLE_NAME SET COLUMN1 = VALUE1 WHERE ...;
Note: All in-stream data are not SQL commands. It may be RUN PROGRAM
statement or others.
INCLUDE MEMBER
The INCLUDE MEMBER
statement implies a dependency on a Mainframe file. Dependencies with variables (starting with “$” or having an “&” in their names) are ignored.
INCLUDE MEMBER=mainframe_file
Where mainframe_file
is the name of a Mainframe file in the project.
Variables
VAR=Test
This statement assignes the value Test
to the variable VAR
PROG=MY.PROG.OF.&VAR
This statement uses the variable VAR
, it is equivalent to do PROG=MY.PROG.OF.Test
.
When possible, the dependency analysis will replace the usage of a variable by its value.