In the age of Expediter, et al, it may seem old fashioned to want to use this old tool, but it’s still an unmatched gem. For those of you who don’t remember Ready Trace, it’s an old verb that was obsoleted by Cobol II. It lists every paragraph that a program executes. Expiditer, for all it’s great capabilities, cannot do this. Nor any other tool that I know of.
But, there is a way to make Cobol do it. It’s not quite as easy to implement, because you have to use several steps, but once you set up the template, it’s very straighforward.
You may have used the Cobol debug option to execute displays and special logic in your program, and displaying a list of all paragraphs executed is an extension of that option. Here are the steps.
003100 CONFIGURATION SECTION.
003300 SOURCE-COMPUTER. IBM-370 WITH DEBUGGING MODE.
003500 INPUT-OUTPUT SECTION.
Line 3300 is necessary, the lines before and after are just to show where to place it in your program. Then, right after PROCEDURE DIVISION, place this code. Line 12400 is necessary, as it’s a stopper for the DEBUG section.
011700 PROCEDURE DIVISION.
011900 DEBUG SECTION.
012000 USE FOR DEBUGGING ON ALL PROCEDURES.
012200 DISPLAY ‘—PARA: ‘ DEBUG-NAME.
012300 END DECLARATIVES.
012400 MAIN SECTION.
Use this parm in your execution JCL:
//PS001 EXEC PGM=UMCCALL,PARM=’/DEBUG’
If you need to pass parms to your program, temporarily hard code it as a literal in your program, as I don’t think there’s an easy way to add them to this required parm.
There are some special compiler options that your shop has to have implemented for the standard Cobol compile–if these code changes don’t work, make sure that you have TEST(NONE,SYM,SEPARATE) in your compiler options.
I’ve used this version of Ready Trace in several different programs at GEICO, so I’m confident it will work for you. You probably won’t use it every day, but for those situations where you’re pulling your hair out trying to solve a problem, this may shed some light on your program logic.