HP 3000 Manuals

Standard ANSI COBOL Debug [ Micro Focus COBOL Language Reference - Additional Topics ] MPE/iX 5.0 Documentation


Micro Focus COBOL Language Reference - Additional Topics

Standard ANSI COBOL Debug 

The decisions of what to monitor and what information to display are
explicitly in the domain of the user.  The COBOL debug facility simply
provides a convenient access to pertinent information.

The features of the language that support the COBOL debug module are:

   *   a WITH DEBUGGING MODE Switch--used at object code creation time

   *   a run-time switch

   *   a USE FOR DEBUGGING statement

   *   a special register--DEBUG-ITEM 

   *   debugging lines.

The reserved word DEBUG-ITEM is the name for a special register generated
automatically by your COBOL system that supports the debugging facility.
Only one DEBUG-ITEM is allocated per program.  The names of the
subordinate data items in DEBUG-ITEM are also reserved words.

Object-time Switch 

The DEBUGGING MODE clauseis written as part of the SOURCE-COMPUTER
paragraph in the Environment Division.  It serves as an object-time
switch over debugging statements written in the program.

When the WITH DEBUGGING MODE clause 
is specified in a program, all debugging sections and all debugging lines
are handled as specified in this section of the document.

When the DEBUGGING MODE clause is not specified in a program, all the
debugging sections and debugging lines are treated as if they were
comment lines and their syntax is not checked.

COBOL Debug Run-time Switch 

A run-timeswitch dynamically activates the debugging code inserted by
your COBOL system.  This switch cannot be addressed in the program; it is
controlled outside the COBOL environment.  If the switch is on, the
effects of any USE FOR DEBUGGING statements written in the source program
are permitted.  If the switch is off, all the effects described in the
USE FOR DEBUGGING statement are inhibited.  Re-creation of the object
code is not required to provide or take away this facility.

The object time switch has no effect on the execution of the object
program if the WITH DEBUGGING MODE clause was not specified in the source
program.  The switch is described in your COBOL System Reference.



MPE/iX 5.0 Documentation