This document describes the entities and relations the JCL Scanner creates on encountering various JCL code constructs.
Parameter and symbol uses are not expanded at parse time. Thus, symbols that expose delimiters, such as quote and parentheses, can parse incorrectly.
For example, the following code contains an imbalanced quote on the EXEC statement:
// SET ENDSTRING='.END'''
//S1 EXEC PGM=EXAMPLE,PARM='BEGIN.&ENDSTRING
JCL will expand the ENDSTRING symbol to produce the following EXEC statement:
//S1 EXEC PGM=EXAMPLE,PARM='BEGIN.END'
which it then parses and recognizes a syntactically correct statement. Since our tool parses before symbolic substitution, it sees an unbalanced quote and will report an error.
Features improved over CA-provided scanner
Detail on JCL-specific entities
Job library metrics are reported on the job's syntax: it includes in-stream procedures but not cataloged procedures or step libraries. Step library inclusion is not reported directly: the steps are processed into the stream of the job or procedure. The scanner issues a diagnostic error if a library is unavailable.
The scanner reports both program and procedure execution job steps. The scanner issues a diagnostic error if a cataloged procedure is unavailable.
In-stream procedures are reported within their surrounding job. Cataloged procedures have static information (e.g. default arguments and metrics) in a separate file, but dynamic information (e.g. program calls, DD to DSN maps) within the calling job.
Procedure step DD overrides are propagated if the procedure is available. DD to DSN maps are given on a per-call basis.
Programs are external entities to JCL, encountered only as targets to exec steps. Scanner unification can interlace these entities with those of the target language (e.g. COBOL).
The scanner computes a variety of standard code-line metrics, including:
It also computes a variety of complexity and maintainability metrics based on standard industry practices, including:
All metrics are reported in the same XML format in the same manner as for JCL and COBOL.
XML entities, declared in format `name : attributes` with explanatory text below. Every entity and relation has a unique, numeric `id` attribute.
Entities
Job - JobName
Proc - JobName
Program - Name
JobStep - JobStepName
File - Name
DataFil - Name
Step - StepId ParentId
StepPrg - StepId PrgId
StepProc - StepId ProcId
StpPrcDS - StpPrcDSName StepProcId DataFilId
StepFile - StepFileName StepId FileId
FileDS - FileDSName StepFileId DataFilId