Enable/Disable Trace Option

PURPOSE:  The TRACE option is a debugging aid that controls the display of line numbers at the terminal as the corresponding statements are executed in a CM, PM, or System File (SF).  This command is valid in a CM, SF and as a direct command.  It is not valid in a PM.

SYNTAX

{ENABLE; DISABLE } {CM; PM; SF} TRACE [{IF; UNLESS} clause]

ENABLE

activates the display of the line numbers as the corresponding statements are executed in a CM or PM.  For SF’s, ENABLE TRACE displays the statements as well as the line numbers during execution.

DISABLE

suppresses the display of line numbers or statements during the execution of a CM, PM, or SF.  This is the default state.

{CM; PM; SF}

indicates the object type to trace.  CM is a Command Module.  PM is a Process Module.  SF is a System File.  When SF’s are traced, the statements on each line number are also displayed.

{IF; UNLESS} clause

specifies certain criteria that must be met for the ENABLE or DISABLE command to take effect.

EXAMPLE

*LIST SF BOARD
00010  USE DS STOCK
00020  SORT ON OBJECT_NO
00030  EXTRACT
*ENABLE SF TRACE
*USE SF BOARD
<<SF 00010 USE DS STOCK
<<SF 00020 SORT ON OBJECT_NO
<<SF 00030 EXTRACT SHOW ALL
A-625 TAPE RECORDER 340.49 220 100
A-632 CASSETTE TAPE 4.50 500 200
C-202 MOVIE CAMERA 445.00 17 10
C-209 CAMERA LENS 154.85 35 20
C-235 SCREEN 99.98 40 10

NOTES:  The enabled TRACE state is used for detecting program flow during the execution of a PM, CM, or SF.  Text of the statements that correspond to the executed line numbers are not displayed when TRACE is enabled for CM’s and PM’s because ACCENT R processes the compiled code, not the source text, during program execution.