COBOL Scanner - Capture Compiler Version

Document ID : KB000047184
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

TR91275 provides an enhancement to the COBOL Scanner program, MSCANDB2 so that the Compiler information is now captured and written to the PROGRAM intermediate file. 

For example

IBM Enterprise COBOL for z/OS  4.2.0

The Compiler string is stored starting on column 32 and occupies 28 bytes.

In order to store this compiler string in the Repository, the PROGRAM entity must be extended so that a column and attribute is defined for this new string. 

 

Instructions

Apply TR91275 and then

execute the following 4 insert statements to define the new attribute to the Repository PROGRAM entity

INSERT INTO DBXREL30.DBX_SCREEN_ATTR                           

VALUES                                                         

(151, 'COMPILER', ' ', ' ', 'COMPILER',                        

92, 31, 60, ' ', ' ', ' ', ' ', 'COMPILER', ' ',               

0,0,' ',0,' ',' ')                                             

;                                                               

COMMIT                                                         

;                                                              

INSERT INTO DBXREL30.DBX_SCREEN_LIT                            

VALUES                                                          

(151,92,2,' ',' COMPILER')                                     

;                                                              

COMMIT                                                         

;                                                               

INSERT INTO DBXREL30.DBX_SCREEN_LIT                            

VALUES                                                         

(151,92,26,'Y','===>')                                         

;                                                               

COMMIT                                                         

;                                                              

INSERT INTO DBXREL30.DBX_IO_MAP_ATTR                           

VALUES                                                          

(151,0,' ','COMPILER',' ',' ',1192,60,'C',' ','N',' ',' ',' ',0)

;                                                              

COMMIT                                                         

;             

 

Define the new column to the underlying table

ALTER DBXREL30.DBX_IMS_PROGRAM

ADD COLUMN COMPILER CHAR(60) NOT NULL WITH DEFAULT    

;

 

To populate the repository with the compiler information for programs which have been loaded into the repository, the following DBXLOAD control card can be used.  It uses the intermediate PROGRAM file created by MSCANDB2 as its input

REUSE DATA FROM SYSRC01 ERROR SYSER01                 

    VALIDATE NO STATUS 'yourstatus'                       

    SAVEAUDIT VERSION '0'                             

    INTO DIALOG 'RECORDS'  ENTITY 'PROGRAM'           

  FIELDS                                               

  (PGM_NAME             POS(00001) CHAR(00008) READONLY

  ,COMPILER               POS(00032) CHAR(00060)        

  );                                                  

 

/*