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.
The call on DD +DSN can imply dependencies on "DATASET or Partitioned DataSet" object, "FILE_DEFINITION" object and a control card (.CTL).
//file-defintion-name DD (DISP=SHR,)? DSN(AME)?=dataset-or-PDS-name(controlcard-file-or-generation)Where
file-defintion-name: a “FILE_DEFINITION” object (optional)dataset-name: a “DATASET” object or a Partitioned DataSet (PDS) object.controlcard-file-or-generation: either a control card name in the project OR a GDG generation number (optional)The parentheses content can be:
1. Control card file: A control card name. In this case, the dataset-or-PDS-name will create a dependency to a PDS object and the control card dependency will have the property JCL.PartitionedDataSet. This allows reconstruction of the fully qualified DSN to locate the control card in case it was missing.
2. GDG generation: A generation number for Generation Data Groups:
- (0) or (+0): refers to the most current generation
- (-1): refers to the previous generation
- (+1): specifies a new generation to be added
- Other numeric values like (-2), (+2), etc.
Dynamic dataset-or-PDS-name, i.e with a name containing “%%” or “&”, are not handled yet.
When the file-definition-name is equal to STEPLIB, JOBLIB, or JCLLIB, a PDS dependency is created instead of a DataSet dependency. This helps distinguish between DataSets that are files and Partitioned DataSets that are folders.
Examples:
//SYSIN DD DSN=MY.LIB.AWS(MYCTL),DISP=SHR
Creates:
{
"dependencyType": "Control card",
"name": "MYCTL",
"properties": {
"JCL.PartitionedDataSet": "MY.LIB.AWS"
},
"path" : "MY.LIB.AWS/MYCTL",
"type" : "CTL"
}and
{
"dependencyType": "PDS use",
"name": "MY.LIB.AWS",
"path": "Global:PDS:MY.LIB.AWS",
"type": "PDS"
}
For library statements such as STEPLIB, JOBLIB, and JCLLIB, only one PDS dependency is created
//STEPLIB DD DISP=SHR,DSN=AWS.M2.CARDDEMO.LOADLIB
Creates:
{
"dependencyType": "PDS use",
"name": "AWS.M2.CARDDEMO.LOADLIB",
"path": "Global:PDS:AWS.M2.CARDDEMO.LOADLIB",
"type": "PDS"
}
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.
An MQN (Message Queue Name) represents a message queue configuration.
MQN NAME=<mqn-name>The MQN statement defines a message queue object. It creates a dependency link of type "Define Queue" between the MQN and the referencing object.
An APL statement defines an application configuration.
APL NAME=<apl-name>,RENAME=<program-name>The APL statement defines an application object. It creates a dependency link of type "Define Program" between the APL and the specified program name.
EXEC statements like NAME1.NAME2.EXEC implies a dependency on a JCL, PROC, COB, EZT, REXX, PL1, CLIST or RPG file.
NAME1.NAME2.EXEC(MY_PROG) implies a dependency on the program MY_PROG where NAME1 and NAME2 can be any valid names
NAME1.EXEC(MY_PROG) implies a dependency on the program MY_PROG where NAME1 can be any valid names
The call to EXEC PGM implies a dependency on a COB, EZT, REXX, PL1 or RPG file.
EXEC PGM=program_file ... PROGRAM=programEXEC PGM=program_file ... PROG=programEXEC PGM=program_file ... PGMNAME=programEXEC PGM=program_file ... PGMNAME='program'EXEC PGM=system_utility PARM=(program_type,program_name,psb_name, ...) ... PROGRAM=programEXEC PGM=system_utility PARM=('program_type',program_name,psb_name, ...) ... PROGRAM=programEXEC PGM=system_utility PARM='program_type,program_name,psb_name, ...' ... PROGRAM=programEXEC PGM=system_utility PARM=(program_type,program_name,psb_name,'PROG(nested_program)', ...) ... PROGRAM=programWhere 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, RPG or CCDEF) 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, IMSFP and DLIBMP) and the program_type as DLI, BMP, DBB, IFP. The system utility program uses PARM parameter to execute a program (COBOL, JCL, PROC, REXX, PL1, RPG, ASM, LNK, EZT, CTL or CCDEF) mentioned in program_name and PSB file mentioned in psb_name.
Inside the PARM parameter, we can find a PROG call where nested_program will be the name of an existing file in the project. This nested parameter will create another link to nested_program.
We can also call an in-stream procedure thanks to the EXEC PGM statement. In that case, it will create no dependency.
The call to EXEC PROC implies a dependency on a JCL, PROC, COB, EZT, REXX, PL1, CLIST, RPG or CCDEF file.
EXEC PROC=procedure_file ... PROGRAM=programEXEC PROC=procedure_file ... PROG=programEXEC PROC=procedure_file ... PGMNAME=programEXEC proc=procedure_file ... PGMNAME='program'EXEC procedure_file ... PROGRAM=programEXEC procedure_file ... PROG=programEXEC procedure_file ... PGMNAME=programEXEC procedure_file ... PGMNAME='program'EXEC PROC=system_utility ... NAME=program,PSB=psb_nameEXEC system_utility ... NAME=program,PSB=psb_nameWhere 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.
When system_utility is configured with some system utility program (DFSRRC00, DLIBATCH, DBBBATCH, IMSBATCH, IMSFP and DLIBMP) then it executes a program (COBOL, JCL, PROC, REXX, PL1, RPG, ASM, LNK, EZT, CLIST, CTL or CCDEF) mentioned in program_name and PSB file mentioned in psb_name.
We can also call an in-stream procedure thanks to the EXEC PROC statement. In that case, it will create no dependency.
The call to ISPSTART CMD can be used to reference a program (COBOL, JCL, PROC, REXX, PL1, RPG, ASM, LNK, EZT, CLIST or CTL)
ISPSTART CMD(MY_PROG) implies a dependency on a program called MY_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.
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.
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 DATAUPDATE TABLE_NAME SET COLUMN1 = VALUE1 WHERE ...;Note: All in-stream data are not SQL commands. It may be RUN PROGRAM statement or others.
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_fileWhere mainframe_file is the name of a Mainframe file in the project.
The call to ADDRQ statement implies a dependency on a JCL file, like the following example:
ADDRQ,JOB=file_name_1,DEPJOB= file_name_2Where file_name_1 and file_name_2 can be the names of a JCL files.
The call to DEMAND statement implies a dependency on a JCL file, like the following example:
DEMAND,JOB=file_name_1,DEPJOB= file_name_2Where file_name_1 and file_name_2 can be the names of a JCL files.
The call to DEMANDH statement implies a dependency on a JCL file, like the following example:
DEMANDH,JOB=file_name_1,DEPJOB= file_name_2Where file_name_1 and file_name_2 can be the names of a JCL files.
VAR=TestThis statement assignes the value Test to the variable VAR
PROG=MY.PROG.OF.&VARThis 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.