Summary: This section provides more detail about the support for specific Mainframe technologies and the way in which the they are supported.
JCL Dataset support
The Mainframe Analyzer is able (in CAST AIP ≥ 8.3.25) to detect the following specific types of JCL Dataset, which will be visible in CAST Enlighten, Architecture Checker and CAST Transaction Configuration:
|Dataset type||Code example|
This type of file is identified in JCL DD cards. Its name ends with "(n)" where n is a negative, zero, or positive number.
This type of file is identified in JCL DD cards. Its name ends with the reference to a member enclosed in parentheses.
This type of file can be identified in DBD files, PSB files, and in JCL files:
GSAM datasets can be identified in JCL DD card and in PSB files.In PSB files, PCBs associated to a GSAM file are typed GSAM and the name of the DD card that references the dataset is in the NAME attribute. This name must be matched to the DD card with the same name in the STEP that calls the PSB.
A VSAM file can be identified in COBOL programs. In ENVIRONMENT DIVISION / INPUT-OUTPUT SECTION / FILE-CONTROL, logical files are declared with the INDEXED organization. The JCL Dataset object associated to a Cobol File Link object that has the indexed organization is sub-typed as "VSAM".
A temporary data set is a data set that is created and deleted in the same job, and is identified by coding one of the following:
For a temporary data set
For a member of a temporary PDS or PDSE
For a temporary data set to be named by the system
Rule documentation updates
Support for IMS/DC
Support for IBM MQSeries
In CAST AIP ≥ 8.3.16, Mainframe Analyzer supports the publisher/subscriber mode and point-to-point mode for IBM MQSeries. Publisher/Subscriber objects will be generated and Call links between Cobol objects and IBM MQ objects and between IBM MQ objects and Cobol objects will be generated by the Web Services Linker extension - you must ensure that v. ≥ 1.6.8 of this extension is installed, otherwise no links will be generated.
Point-to-point: MOVE MQOT-Q TO MQOD-OBJECTTYPE
In point-to-point, message producers are called senders and message consumers are called receivers. Senders produce messages to a queue, and receivers asynchronously consume messages from that queue. For point-to-point to work, connected applications need to know the name of the queue through which they interact. A queue could have a single receiver or be scaled to many, in which case each message is only consumed by one receiver, distributing the workload across them all. This style of messaging is built around the concept of message queues, and around the processing of messages by a single consumer.
Publisher/Subscriber: MOVE MQOT-TOPIC-Q TO MQOD-OBJECTTYPE
The producer of a message is known as a publisher and message consumers are known as subscribers. The publishing and subscribing applications within the infrastructure agree on the name of a topic. For a consumer to signal that they want to receive messages on that topic, they create a subscription to it. Any message published to a topic will be delivered to all the subscriptions, so every subscriber gets a copy. There could be many publishers and many subscribers to each topic, MQ handles the delivery of messages between all of them. For example:
Publish a topic:
Subscribe to a topic:
Result in CAST Enlighten:
MQ Publisher and MQ Subscriber objects are created by the Mainframe Analyzer:
|Subscriber IBM MQ|
|Publisher IBM MQ|
Call links will be generated by the Web Services Linker extension - you must ensure that v. ≥ 1.6.8 of this extension is installed, otherwise no links will be generated:
- between Cobol objects and IBM MQ objects
- between IBM MQ objects and Cobol objects
Support for VSAM files
- The analyzer will detect VSAM files in COBOL programs, just like other files, however, no specific object type for VSAM will be resolved in the results. Instead, VSAM files are resolved as follows (see Mainframe - Analysis results):
- COBOL: File Link objects
- JCL: Dataset objects
- Some structural rules have been adapted to take into account this VSAM files, for example:
- The analyzer does not analyze the VSAM system tables that contain technical information about file system management.
- Support for commands in "SYSIN" clauses (in CAST AIP ≥ 8.3.24), for example:
- Support for If IDCAMS utility and VSAM data-set types (for Cobol and JCL) when they call indexed, relative and sequential organisation (in CAST AIP ≥ 8.3.24):
Entry-sequenced data set (ESDS)
- Key-sequenced data set (KSDS)
- Relative-record data set (RRDS)
- The analyzer handles programs in PC file type format. However, in Mainframe, the structure of file/folder trees is not managed in the same way.
- The notion "Library" is not taken into account.
- When program names are identical, these programs may be ignored or may be incorrectly resolved.
The Inference Engine is implemented for the Mainframe Analyzer, but does have some limitations:
- Renaming (66) is not supported.
- Indexation of arrays, i.e.: the instructions MOVE with (position:length) is not supported
- The length of a variable when given by a constant (declared as 78 - Microfocus) is not supported.
- The Inference Engine will remain local to each program.
Creation of unknown objects
Given the following code:
The Inference Engine will consider that <do this> and <do that> can be done in the same control flow path although this is not actually possible. This leads to the situation where the analyzer will generate incorrect subprogram names and therefore an unexpected unresolved object will also be generated, that do not exist anywhere in the Application source code.
No links are created to variables handled by the instructions EXHIBIT.
Embedded SQL for Oracle Users
Calls to tables, views, synonyms, procedures, functions, sub-functions and package sub-procedures are all resolved. Calls to any other SQL object are not.
Analysis of Copybooks / Option "Save Copybook Structure"
A Copybook is analyzed implicitly when analyzing the Cobol program including it. You just have to make sure that the copybook is contained in one of the Working Folders defined in the Analysis Unit / Application. However, if you want to save the data structure located under a copybook, you need to activate the option "Save data found in copy books". Please be aware that in this case the copybook will be analyzed without performing any text replacements.
- Copybooks containing characters that are not authorized in Cobol identifiers can cause issues if they have been selected in the Cobol page and if the "Save Copybook Structure" option has been selected. This limitation occurs when a copybook is included via the COPY REPLACING statement and if it contains replacement patterns such as '&-' (including the quote characters). In this specific case, the Cobol analyzer cannot extract the Cobol identifier correctly and so it cannot create the corresponding data structure object. However, the Cobol analyzer expands the Cobol programs correctly: the replacement patterns are replaced and the expanded code is correct.
If a literal is modified between two analyses and if the "Save Data Structures" option is selected then the old version of the literal is not actually removed from the knowledge base.
DSN copied from earlier DD card
The JCL analyzer can not create a link from a step to a data set if the DD card copies a DSN clause from an earlier DD card. For instance, when the following DD cards are analyzed they will not generate a link from the step to the dataset:
CAST AIP provides partial support for the resolution of symbols in JCL. The following is supported:
- JCL symbols in procedure EXEC cards - links between procedure steps and programs/procedures where a JCL symbol is used
- JCL symbols in procedure DD cards
- JCL Symbols present in job DD cards (CAST AIP ≥ 8.3.11)
- JCL Symbols present in job EXEC cards (CAST AIP ≥ 8.3.11)
- Where JCL contains PROCS using parameters from a different JCL (CAST AIP ≥ 8.3.11)
- Where JCL calls PROC using a parameter (CAST AIP ≥ 8.3.11)
- JCL Symbols present in external PROCS (CAST AIP ≥ 8.3.11)
In other words:
- Text assigned to symbols will be extracted (e.g: "// SET MYVAR=VALUE")
- When symbols are replaced with their value (e.g.: "//STEP1 EXEC PGM=&MYPGM")
- Propagation via PROC calls
- Calling card example: "//STEP1 EXEC MYPROC, PROG=MYPROG"
- Default value assignment example: "//STEP1 PROC, PROG=MYPROG"
Links between JCL and JEE technologies
CAST AIP does not support the resolution of links between JCL Jobs that implement Java Classes.
Batch utilities using external parameter files
The JCL analyzer can parse, via the AdvancedJCL.xml file (see Mainframe - Analysis configuration for more information), the information sent to programs/utilities through a *DD ** card. However, if this DD card refers to an external file via the DSN parameter, then the analyzer cannot parse this information and create the objects and links. For instance, the following JCL code is correctly analyzed:
And the following JCL code cannot currently be analyzed:
Dynamic Call to CBLTDLI
The IMS CBLTDLI subprogram can be called by using a variable (dynamic call). If the variable is initialized in the DATA DIVISION (VALUE clause of data declaration) then the analyzer detects and manages the calls to IMS correctly. Otherwise, if the variable is only assigned in the PROCEDURE DIVISION (ie: by using a MOVE statement), then the analyzer does not detect a call to IMS.
PCB sent to subprograms via parameters
A Cobol program must be associated to a PSB in order to extract links to IMS via the PCB. If a program is not associated to a PSB but receives the PCBs via its parameters (it is generally the case for subprograms), then it is not possible to extract the links to IMS. Indeed, the Mainframe analyzer is not able to know which PSB defines the PCBs and it is not able to reconcile the PCBs. In addition, the PSB can be associated to one of the calling programs and this can send to the called program a part of its PCB list without taking into account the order defined in the PSB. Finally, the PCBs are sent via variables which can have different names in the caller and in the called programs. In conclusion, for this specific case, it is not possible to extract the links from a program to IMS.
It is possible to create links between objects belonging to different jobs but it is not possible to share objects between these jobs. This means that if a source file is analyzed several times in different Analysis Units, then several instances of objects will be created in the CAST Analysis Service.
In addition, copybooks referenced by programs via Working Folders in different analysis jobs will be duplicated in the CAST Analysis Service.
Cobol code containing "EXIT SECTION" statements
When analyzing Cobol source code implemented in MICRO Focus COBOL / AcuCOBOL, the "EXIT SECTION" statement will cause the Mainframe analyzer to issue the warning "Cannot find section or paragraph". To avoid this warning, replace the statement "EXIT SECTION" with its short form "EXIT".
The Mainframe analyzer does not allow to expand several level of copybooks (e.g: a copybooks references another copybook) if at level "n" a REPLACING clause is used to change the name of a referenced copybook in a COPY directive located at a level n+1. In this specific case, these copybooks specified at level n+1 are not found.
For example, considering the 3 levels of inclusion:
- level 1: COPY A REPLACING B BY C.
- level 2 (copybook A): COPY B.
- level 3 (copybook C)
The Mainframe analyzer will search for copybook B (that could be not found) and C is ignored when it will expand level 2.
Paragraphs containing termination statement
If a paragraph containing a termination statement (ex: GOBACK, STOP RUN...) is called by a PERFORM statement, then the analyzer will not draw a "Call" link between the paragraph containing the PERFORM statement and the next paragraph..
Nevertheless, there is a limitation if the termination statement is located in a conditional block (IF, EVALUATE). In this specific case, the analyzer will consider that the termination statement is always executed and the "Call" link between the paragraph containing the PERFORM statement and the next paragraph will not be drawn.
No "Call" link will be drawn between PARA-1 and PARA-2.
No "Call" link will be drawn between PARA-1 and PARA-2 (limitation).
This can impact the following quality rules based on paragraph calls:
- Avoid OPEN/CLOSE inside loops
- Avoid cyclic calls with PERFORM statements
- Avoid unreferenced Sections and Paragraphs
- Avoid GOTO jumps out of PERFORM range
Cobol Programs without a PROGRAM-ID or a PROCEDURE DIVISION
Cobol Programs (.cob files) that do not contain a PROGRAM-ID paragraph nor a PROCEDURE DIVISION (for example when a COPY statement is used to call a COPYBOOK which contains the PROGRAM-ID) will be considered as copybooks.