Halting on a line in LangX COBOL only if a condition is true
Often a particular part of your program works fine for the first
few thousand times, but it fails under certain conditions. Setting
a line breakpoint is inefficient because you will have to repeatedly
enter the GO
command.
Example: sample LangX COBOL program for debugging
In the COB03AO program, to halt z/OS® Debugger when the LOANAMT variable is set to 100, enter the following command:
AT 36 DO; IF 'LOANAMT ¬= 100' THEN GO; END;
Line 36 is the line COMPUTE INTEREST = LOANAMT * INTEREST-RATE. The command causes z/OS Debugger to stop at line 36. If the value of LOANAMT is not 100, the program continues. The command causes z/OS Debugger to stop on line 36 only if the value of LOANAMT is 100.