Summary: This section provides more detail about the support for specific Mainframe technologies and the way in which the they are supported.
Note: The embedded Mainframe Analyzer available in AIP Core is deprecated (no updates/bug fixes will be applied) in AIP Core ≥ 8.3.26. Please ensure that are using the Mainframe Analyzer extension for the best results.
Support for JCL Datasets
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". The dataset is defined with IDCAMS utility and VSAM command in SYSIN DD Card are also VSAM datasets (see Support for VSAM files for more information).
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
Support for IMS/DC
Support for IBM MQSeries
The Mainframe Analyzer (both the extension and the embedded analyzer in AIP Core ≥ 8.3.16) 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.
Main supported patterns
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:
Support for links between different technologies
The Web Services Linker extension will take all IBM MQ publisher and IBM MQ subscriber (of all technologies). Then it will check if they have the same:
- queue manager connection.
- queue name
- at least one topic from the topic list.
- Publisher TOTO publishes the topics (A, B, C)
- Subscriber TOTO subscribes to the topics (A, D, E) with the same queue manager so in this case a link between publisher and subscriber is created.
The Mainframe Analyzer supports MQI calls and dynamic calling of IBM MQ, see: https://www.ibm.com/docs/en/ibm-mq/8.0?topic=zos-dynamically-calling-mq-stub.
- Batch environment:
- CONNECT: CSQBCONN, CSQBCONNX
- OPEN: CSQBOPEN
- GET: CSQBGET, CSQBSUB
- PUT: CSQBPUT, CSQBPUT1
- CICS environment:
- CONNECT: CSQCCONN, CSQCCONNX
- OPEN: CSQCOPEN
- GET: CSQCGET, CSQCSUB
- PUT: CSQCPUT, CSQCPUT1
- IMS environment:
- CONNECT: MQCONN, MQCONNX
- OPEN: MQOPEN
- GET: MQGET, MQSUB
- PUT: MQPUT, MQPUT1
Automatic support of CMQODV copy book IBM MQ
IBM provides some default .cpy files for object queue name variables, topic name variables or queue manager name variables and sometimes these copybooks are not included in source code deliveries. Note that the file CMQODV is automatically supported.
Example basic Publisher/Subscriber
Publish a topic:
Subscribe to a topic:
Result in CAST Enlighten:
Some main properties are available:
The Request/Reply is described by IBM here: https://www.ibm.com/docs/en/was/8.5.5?topic=server-request-reply-messaging-using-websphere-mq. Just as in the send-and-forget pattern sample, this request/reply sample contains two programs. The first one sends a request message to a queue (the REQUEST queue) and waits for a response in another queue (the REPLY queue). The second program acts as the replier and it starts reading messages from a queue (the REQUEST queue). Whenever a message is put onto that queue, it sends a generic response to the REPLY queue.
The Cobol program (publisher) OPENS the REQUEST queue and PUT the message:
The Cobol Program (subscriber) tries to get the reponse from the request (PUT). Then the response message could be resent to the publisher by REPLY Queue:
The Mainframe Analyzer supports the main REQUEST queue, however publisher and subscriber items defined by the REPLY queue will not be created by the analyzer.
- When complex situations arise (i.e. due to the use of if_else, evaluate, when etc.), results may be ambiguous and potentially erroneous.
- If the queue names do not detect the request and reply queues, the analyzer cannot correctly detect the REQUEST Publisher/Subscriber queue name. Note that the analyzer attempts to detect items using REQUEST/REPLY keywords and if none are found, all publisher/subscribers are created (no REPLY publishers/subscribers are removed).
Unknown publisher/Unknown subscriber
When the analyzer cannot find the correct resolution between objects, the unknown publisher and unknown subscriber objects will be created, including the ID of the item. Note however that no links are created between unknown publisher and unknown subscriber objects.
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)
- Linear data set (LDS) (since 1.0.14-funcrel)
- Support since Mainframe Analyzer 1.0.14 funcrel:
- Support to abbreviations command VSAM e.g:
- DEFINE is DEF
- CLUSTER is CL
- EXPORT is EXP, ...
- By default, the VSAM data-set types is KSDS
- Support property for KEYS in KSDS VSAM
- Support to abbreviations command VSAM e.g:
- 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
AIP Core ≥ 8.3.22 and the Mainframe Analyzer extension support links from JCL Steps to Java Methods through the creation of a JCL_To_JavaProgram object. The JCL_To_JavaProgram object is created when the following utilities are detected in the code:
Example code with the JVMLDM utility:
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.
Support for REPLACE statement
The Replace statement (used to replace some keywords in COBOL programs) is supported in the Mainframe Analyzer extension ≥ 1.0.10-funcrel.
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.
Cobol data links with file handling COBOL statement
Sensitive data in Mainframe Analyzer
Supported in the Mainframe Analyzer extension ≥ 1.0.10-funcrel. The Mainframe Sensitive Data extension (com.castsoftware.mainframe.sensitivedata) is required. Some dataset and IMS Segment will raise an indicator property if these are a sensitive data.
Unknown / unresolved objects
An unknown unresolved object generally means that there is a missing component, directly or not. Usually unknown/unresolved objects are listed in the analysis log with a "Mainframe.09" warning message:
It is important to distinguish objects which have associated source files from the other objects which do not have a source file.
For instance, a program, a copybook, a screen map, a JCL job or a JCL procedure all have an associated source file. If they are involved in a log message which indicates they are unresolved, then you can immediately assume they are missing. On the contrary, data structures, paragraphs, and DD Names do not have a source file. Instead they are defined in a program or in a copybook.
So why is the analyzer not able to find a component? Because it has not been delivered or because the analyzer does not have any information about its location (source file directories or working folders). In the first case you must ask the application team to deliver it. You will find the complete list of missing components at the end of the analysis log. In the second case you must modify the parameters of the analysis unit.
You can also see missing components using the CAST Enlighten tool. The unknown / unresolved objects are classified in "Unknown" folders and you can easily find them with the Object Browser.
There are technical/system/utility programs which are called by application programs and JCL jobs. The Mainframe Analyzer can also produce "Unresolved objects" messages about them. Their name usually begins with the "DFH", "DSN", "IKJ", "DFS" or "IEB" prefixes. The "DFH" programs are dedicated to CICS, the "DSN" and "IKJ" programs are usually dedicated to DB2 and the "DFS" programs are dedicated to IMS. The JCL job can also invoke utilities such as the IEB family, IEF family or IDCAMS, FILE-AID… Do not ask the application team to deliver them because they do not have the corresponding source files. If they are used to run another program in a JCL job then you should change the analysis parameters. Otherwise, you can ignore the messages.
Cobol Data object Bookmarks
Currently the Mainframe Analyzer is designed such that bookmarks between Cobol Data object do not point to the exact line in which the data is being written to the Cobol Data object (for example MOVE statements) Instead the bookmark is placed at the start of the Cobol Data object.