Load Module Scanner: COBOL example

The literal pool in VS COBOL II is part of the Constant Global Table (CGT). Having calculated the offset from the start of the program, subtract the start of the CGT from your calculated offset to obtain the offset within the CGT.

An MVC instruction with the argument zero as the source is in the listing, in this form:
MVC   D1(L,R1),D2(R2)       DFHEIV0              PGMLIT AT ...
where :
DFHEIV0
Is the slot in working storage into which the argument zero is copied before the BALR to the CICS® stub.
D2
Is the decimal offset of the argument zero within the CGT, which you have just calculated.
R2
Is the CGT base register.

When you know the offset of the argument zero within the CGT, you can find the MVC and hence the EXEC CICS command.

An example of finding an EXEC CICS command is given in Figure 1.
Figure 1. Example of finding an EXEC CICS command from the argument zero
For the Load Module Scanner output:
CICS INTERDEPENDENCIES ANALYZER
LOAD MODULE SCANNER - DETAILED LISTING OF CICS.DEVR212.LOCLLOAD

Module Name - ACCT04    /  Load Module Length - 000159D0  /  Module Entry Point
Offset    Storage Content (HEX)                               EDF DEBUG  Possibl
--------  --------------------------------------------------  ---------  -------
000007A6  0A02E0000700004100                                     00669   WRITEQ
Total possible Dependency cmds   =         1
The COBOL source after translation was:
001123
001124               *EXEC CICS WRITEQ TS QUEUE('ACERLOG') FROM(ACCTERRO)
001125               *    LENGTH(ERR-LNG) END-EXEC.
001126                     MOVE '  \      00669   ' TO DFHEIV0
001127                     MOVE 'ACERLOG' TO DFHC0080
001128                    CALL 'DFHEI1' USING DFHEIV0  DFHC0080 ACCTERRO ERR-LNG
The equivalent assembly-language is:
 001126  MOVE
     002764  D210 8558 A6C6          MVC  1368(17,8),1734(10)     DFHEIV0
     00276A  9240 8569               MVI  1385(8),X'40'           DFHEIV0+17
     00276E  D232 856A 8569          MVC  1386(51,8),1385(8)      DFHEIV0+18
 001127  MOVE
     002774  D207 8340 ACEA          MVC  832(8,8),3306(10)       DFHC0080
 001128  CALL
     00277A  4130 8558               LA   3,1368(0,8)             DFHEIV0
     00277E  5030 D1B0               ST   3,432(0,13)             TS2=0
     002782  4130 8340               LA   3,832(0,8)              DFHC0080
     002786  5030 D1B4               ST   3,436(0,13)             TS2=4
     00278A  4130 75A8               LA   3,1448(0,7)             ACCTERRO
     00278E  5030 D1B8               ST   3,440(0,13)             TS2=8
     002792  4130 9A0E               LA   3,2574(0,9)             ERR-LNG
     002796  5030 D1BC               ST   3,444(0,13)             TS2=12
     00279A  9680 D1BC               OI   444(13),X'80'           TS2=12
     00279E  4110 D1B0               LA   1,432(0,13)             TS2=0
     0027A2  4100 D150               LA   0,336(0,13)             CLLE@=2
     0027A6  0530                    BALR 3,0
     0027A8  5030 D158               ST   3,344(0,13)             TGT FDMP/TEST-
     0027AC  58F0 A000               L    15,0(0,10)              V(DFHEI1  )
     0027B0  05EF                    BALR 14,15
     0027B2  50F0 D078               ST   15,120(0,13)            TGTFIXD+120
     0027B6  BF38 D089               ICM  3,8,137(13)             TGTFIXD+137
     0027BA  0430                    SPM  3,0
For this example, the calculations are:
    Load Module Scanner offset     = X'7A6'
    CICS stub length   = X'28'
    Offset of CGT      = X'B8'
    CGT base register  = GPR 10
    Offset within CGT  = X'7A6' - X'28' - X'B8' = X'6

    MVC instruction looks like:
    MVC   d(l,r),1734(10)       DFHEIV0              PGMLIT AT ...'
To determine the EXEC CICS command:
  1. Look at the assembly language for:
    MVC   d(l,r),1734(10)       DFHEIV0              PGMLIT AT ...
    which occurs for the first MOVE:
    001126  MOVE
  2. Look at the COBOL source for the MOVE at line 001126. This code is for the EXEC CICS WRITEQ TS command starting on line 001124.