Cobol

Cobol programs have multiple ways to make links to other programs, copybooks, datasets, etc. In addition, depending on the compiler and the Cobol flavor (Ansi, Tandem, OpenVMS…), the list of statements may change. BluInsights dependencies engine handles a large list of statements (see below) and can rapidly be extended to support new ones.

 

++INCLUDE / -INC / ?SOURCE

The call on ++INCLUDE / -INC and ?SOURCE implies dependencies on copybook files :

  • ++INCLUDE / -INC / ?SOURCE ‘COPYBOOK
  • ++INCLUDE / -INC / ?SOURCE “COPYBOOK
  • ++INCLUDE / -INC / ?SOURCE COPYBOOK`
CALL / CALL PROC / CALL PROCEDURE​

The list below uses only the CALL keywords but the dependencies will be the same with CALL PROC or CALL PROCEDURE. We expect to find dependencies of any extension :

  • CALL 'PROGRAM' implies a dependency on a file named “PROGRAM”
  • CALL "PROGRAM" implies a dependency on a file named “PROGRAM”
  • CALL PROGRAM_VAR implies dependencies on the values of PROGRAM_VAR including its initial value and all the values set with a MOVE ... TO PROGRAM_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybooks.
COPY/+COPY/$COPY

The call on COPY+COPY or +COPY implies dependencies on copybook files :

  • COPY 'COPYBOOK' implies a dependency on a copybook file named “COPYBOOK”
  • COPY 'folder:COBCOP.cobcop' implies a dependency on a cobcop file named “COBCOP”. The .cobcop in the string is optional.
  • COPY "COPYBOOK" implies a dependency on a copybook file named “COPYBOOK
  • COPY "folder:COBCOP.cobcop" implies a dependency on a cobcop file named “COBCOP”. The .cobcop in the string is optional.
  • COPY COPYBOOK implies a dependency on a copybook file named “COPYBOOK”
EXEC CICS
DELETE / READ FILE

We support several calls on DELETE FILE, the call itself could be on multiple lines or not. We expect to find dependencies of any extension but .CBL, .COB and .CPY :

  • EXEC CICS DELETE FILE(“FILE”) ... END-EXEC implies a dependency on a file named “FILE”
  • EXEC CICS DELETE FILE('FILE') ... END-EXEC implies a dependency on a file named “FILE”
  • EXEC CICS DELETE FILE(FILE_VAR) ... END-EXEC implies dependencies on the values of FILE_VAR including its initial value and all the values set with a MOVE ... TO FILE_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybooks.

We support several calls on LINK PROGRAM, the call itself could be on multiple lines or not. We expect to find dependencies of any extension :

  • EXEC CICS LINK / XCTL PROGRAM(“PROGRAM”) ... END-EXEC implies a dependency on a file named “PROGRAM”
  • EXEC CICS LINK / XCTL PROGRAM('PROGRAM') ... END-EXEC implies a dependency on a file named “PROGRAM”
  • EXEC CICS LINK / XCTL PROGRAM(PROGRAM_VAR) ... END-EXEC implies dependencies on the values of PROGRAM_VAR including its initial value and all the values set with a MOVE ... TO PROGRAM_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybooks.
RECEIVE MAP

We support several calls on RECEIVE MAP, the call itself could be on multiple lines or not. We expect to find dependencies of any extension but .CBL, .COB and .CPY :

  • EXEC CICS RECEIVE MAP(“MAP”) ... END-EXEC implies a dependency on a file named “MAP”
  • EXEC CICS RECEIVE MAP('MAP') ... END-EXEC implies a dependency on a file named “MAP”
  • EXEC CICS RECEIVE MAP(MAP_VAR) ... END-EXEC implies dependencies on the values of MAP_VAR including its initial value and all the values set with a MOVE ... TO MAP_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybooks.
RECEIVE MAPSET

We support several calls on RECEIVE MAPSET, the call itself could be on multiple lines or not. We expect to find dependencies of any extension but .CBL, .COB and .CPY :

  • EXEC CICS RECEIVE MAPSET(“MAPSET”) ... END-EXEC implies a dependency on a file named “MAPSET”
  • EXEC CICS RECEIVE MAPSET('MAPSET') ... END-EXEC implies a dependency on a file named “MAPSET”
  • EXEC CICS RECEIVE MAPSET(MAPSET_VAR) ... END-EXEC implies dependencies on the values of MAPSET_VAR including its initial value and all the values set with a MOVE ... TO MAPSET_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybooks.
REWRITE FILE

We support several calls on REWRITE FILE, the call itself could be on multiple lines or not. We expect to find dependencies of any extension but .CBL, .COB and .CPY :

  • EXEC CICS REWRITE FILE(“FILE”) ... END-EXEC implies a dependency on a file named “FILE”
  • EXEC CICS REWRITE FILE('FILE') ... END-EXEC implies a dependency on a file named “FILE”
  • EXEC CICS REWRITE FILE(FILE_VAR) ... END-EXEC implies dependencies on the values of FILE_VAR including its initial value and all the values set with a MOVE ... TO FILE_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybooks.
SEND MAP

We support several calls on SEND MAP, the call itself could be on multiple lines or not. We expect to find dependencies of any extension but .CBL, .COB and .CPY :

  • EXEC CICS SEND MAP(“MAP”) ... END-EXEC implies a dependency on a file named “MAP”
  • EXEC CICS SEND MAP('MAP') ... END-EXEC implies a dependency on a file named “MAP”
  • EXEC CICS SEND MAP(MAP_VAR) ... END-EXEC implies dependencies on the values of MAP_VAR including its initial value and all the values set with a MOVE ... TO MAP_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybooks.
SEND MAPSET

We support several calls on SEND MAPSET, the call itself could be on multiple lines or not. We expect to find dependencies of any extension but .CBL, .COB and .CPY :

  • EXEC CICS SEND MAPSET(“MAPSET”) ... END-EXEC implies a dependency on a file named “MAPSET”
  • EXEC CICS SEND MAPSET('MAPSET') ... END-EXEC implies a dependency on a file named “MAPSET”
  • EXEC CICS SEND MAPSET(MAPSET_VAR) ... END-EXEC implies dependencies on the values of MAPSET_VAR including its initial value and all the values set with a MOVE ... TO MAPSET_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybook.
WRITE FILE

We support several calls on WRITE FILE, the call itself could be on multiple lines or not. We expect to find dependencies of any extension but .CBL, .COB and .CPY :

  • EXEC CICS WRITE FILE(“FILE”) ... END-EXEC implies a dependency on a file named “FILE”
  • EXEC CICS WRITE FILE('FILE') ... END-EXEC implies a dependency on a file named “FILE”
  • EXEC CICS WRITE FILE(FILE_VAR) ... END-EXEC implies dependencies on the values of FILE_VAR including its initial value and all the values set with a MOVE ... TO FILE_VAR operation. The variable can be declared in the same file as the call or in one of its imported copybooks.
EXEC SQL

We support several calls on EXEC SQL, the call itself could be on multiple lines or not. We expect to find the dependencies of any extension. The dependencies are detected for the following operations in the request :

  • EXEC SQL ... FROM TABLE1, TABLE2 ... END-EXEC where TABLE1 and TABLE2 are files corresponding to SQL tables. TABLE2 is optional and if there are only two tables, commas aren’t needed.
  • EXEC SQL ... INSERT INTO TABLE1 ... END-EXEC where TABLE1 is a file corresponding to a SQL table.
  • EXEC SQL ... JOIN TABLE1 T1 ON ... END-EXEC where TABLE1 is a file corresponding to a SQL table and T1 is an optional alias for TABLE1 used in the rest of the request.
  • EXEC SQL ... UPDATE TABLE1 SET ... END-EXEC where TABLE1 is a file corresponding to a SQL table.
EXEC SQL CALL

The call on EXEC SQL CALL implies dependencies on SQL files :

  • EXEC SQL CALL SQLFILE(...) END-EXEC. implies a dependency on a SQL file named “SQLFILE”.
EXEC SQL INCLUDE

The call on EXEC SQL INCLUDE implies dependencies on copybook files :

  • EXEC SQL INCLUDE 'COPYBOOK' ... END-EXEC implies a dependency on a copybook file named “COPYBOOK”
  • EXEC SQL INCLUDE "COPYBOOK" ... END-EXEC implies a dependency on a copybook file named “COPYBOOK”
  • EXEC SQL INCLUDE COPYBOOK ... END-EXEC implies a dependency on a copybook file named “COPYBOOK”
EXEC SQL SOURCE

The call on EXEC SQL SOURCE implies dependencies on copybook files :

  • EXEC SQL SOURCE = 'COPYBOOK' implies a dependency on a copybook file named “COPYBOOK”
  • EXEC SQL SOURCE = "COPYBOOK" implies a dependency on a copybook file named “COPYBOOK”
  • EXEC SQL SOURCE = COPYBOOK implies a dependency on a copybook file named “COPYBOOK”
NNCOPY

The call on NNCOPY can be found in a COBOL comment and implies dependencies on copybook files :

  • *01 NNCOPY COPYBOOK(SEGMENT) implies a dependency on a copybook file named “COPYBOOK”
SWCOPY

The call on SWCOPY implies dependencies on copybook files :

  • SWCOPY 'COPYBOOK' implies a dependency on a copybook file named “COPYBOOK”
  • SWCOPY "COPYBOOK" implies a dependency on a copybook file named “COPYBOOK”
  • SWCOPY COPYBOOK implies a dependency on a copybook file named “COPYBOOK”