Hello all,
I want to somehow programmatically extract rules from my COBOL programs so I can load them to a database. The environment is COBOL LE / DB2 / CICS on an OS/390.
In addition I want to programmatically identify any copybook fields involved with each rule found. See example below.
I'm sure I can get this done by recompiling my programs with various options and scanning the output with REXX.
Questions
-----------
o Does anyone know of a tool that will do this for me?
o Would someone advise me on what compile option I
should use to get this done?
o Has anyone done something like this and would not object
to sharing the experience?
Thanks in advance for any help.
tbt102
Example
----------
WORKING STORAGE
01 WS-TEST-CASE PIC X(01) VALUE 'Y'
01 WS-OK PIC X(02) VALUE 'OK'
01 WS-NA PIC X(02) VALUE 'NA'
COPY CPYBOOKA
01 FIELD-A PIC X(01)
01 FIELD-B PIC X(02)
PROCEDURE DIVISION
IF FIELD-A = WS-TEST-CASE
MOVE WS-OK TO FIELD-B
ELSE
MOVE WS-NA TO FIELD-B
END-IF
Expected output
------------------
Rule Action
IF FIELD-A = WS-TEST-CASE MOVE WS-OK TO CPYBOOKA.FIELD-B
ELSE MOVE WS-NA TO CPYBOOKA.FIELD-B
I want to somehow programmatically extract rules from my COBOL programs so I can load them to a database. The environment is COBOL LE / DB2 / CICS on an OS/390.
In addition I want to programmatically identify any copybook fields involved with each rule found. See example below.
I'm sure I can get this done by recompiling my programs with various options and scanning the output with REXX.
Questions
-----------
o Does anyone know of a tool that will do this for me?
o Would someone advise me on what compile option I
should use to get this done?
o Has anyone done something like this and would not object
to sharing the experience?
Thanks in advance for any help.
tbt102
Example
----------
WORKING STORAGE
01 WS-TEST-CASE PIC X(01) VALUE 'Y'
01 WS-OK PIC X(02) VALUE 'OK'
01 WS-NA PIC X(02) VALUE 'NA'
COPY CPYBOOKA
01 FIELD-A PIC X(01)
01 FIELD-B PIC X(02)
PROCEDURE DIVISION
IF FIELD-A = WS-TEST-CASE
MOVE WS-OK TO FIELD-B
ELSE
MOVE WS-NA TO FIELD-B
END-IF
Expected output
------------------
Rule Action
IF FIELD-A = WS-TEST-CASE MOVE WS-OK TO CPYBOOKA.FIELD-B
ELSE MOVE WS-NA TO CPYBOOKA.FIELD-B