DATATRACE [ HPTOOLSET XL Reference Manual ] MPE/iX 5.0 Documentation
HPTOOLSET XL Reference Manual
DATATRACE
Monitors the value of a data item.
Syntax
DA[TATRACE] data-item [DO command-list [NOMESSAGE] ]
[OFF ]
Parameters
Data-item Any COBOL data name or index name defined in the COBOL
(COBOL) source program. A data item may be qualified with:
(1) OF,
(2) IN,
(3) subscript (must be an integer value), or
(4) periods separating the data names, where the most
significant data name is specified first.
You cannot reference a data item in a program other than
the one that is currently executing.
Data-item Any Pascal data name defined in the source program.
(Pascal) Standard Pascal selectors are used to qualify arrays and
records. In addition, TOOLSET/XL allows commas when
selecting Array elements. OF or IN may be used to
select record elements.
Data-item Any FORTRAN data name defined in the source program.
(FORTRAN) Standard FORTRAN delimiters are used in referencing
array elements.
DO Command List Specifies a list of TOOLSET/XL commands you want
automatically executed when the value of a data item
changes. Takes the form:
(command [; command]...)
NOMESSAGE Suppresses an identifying message when DATATRACE is
executed.
OFF Disables the DATATRACE. You may also use the Clear
function key which is available when the Show Debug menu
is displayed.
Description
The DATATRACE command saves the value of the data item you specify.
TOOLSET/XL compares the saved value with the current value of the data
item at the beginning of each paragraph, section, or procedure in your
program. If the value has changed, the new value will be saved and a
message containing the location and the new value will be displayed. Any
commands that you have specified will be executed. If there is no
command list, the program will continue running.
The maximum number of data items that can be traced is three.
If all the commands in your command list have executed, Symbolic Debug
will execute a RESUME command. If you include a BREAK or SYSDEBUG
command in the command list, the list will terminate.
Pascal
As with COBOL, only three data items can be traced at one time in a
Pascal program. In addition, a variable cannot be referenced outside of
the level of the procedure that it is declared in, nor can it be
explicitly turned off when your are working outside of its procedure
level.
If you need to set another datatrace and are outside of the procedure
where the first three are set, you can:
(1) Go back to the procedure level where the datatraces are set and
explicitly turn any or all of the datatraces off.
(2) Enter a SHOW DEBUG command. This produces a menu from which you
can mark any or all of the datatraces set and clear them by pressing
the Clear function key available when the Show Debug menu is on the
terminal screen.
The values of rows, elements, or entire arrays can be traced.
The RESUME command should not be included in a command list.
FORTRAN
As with COBOL and Pascal, only three data items can be traced at one time
in a FORTRAN program. To reference a variable outside the currently
executing subroutine or function, the variable must be in a common block.
Figure 4-4. Datatrace Command Screen
NOTE One cannot DISPLAY, MOVE, or DATATRACE Pascal local variables or
parameters that reference global types that have not been included
in the main outer block compile. In other words, variables or
parameters that reference newly added global types in their
subprogram compile. This may be a problem with mixed languages.
MPE/iX 5.0 Documentation