Inspect Manual

Inspect Concepts
Inspect Manual429164-006
2-18
Data Locations
Data Locations
A data location is a symbolic reference to a data item within a program. Although the
syntax used to specify a data location varies for each source language, the general
syntax is the same for all languages.
scope-path
specifies the scope path to the scope unit containing the data item.
instance
specifies a specific activation of the scope unit containing the data item.
data-reference
specifies a data item using the syntax of the source language.
Usage Considerations
These considerations are valid for all source languages.
Modifying and Displaying Program Data
When program execution begins, the compilers add code in front of the first
program statement which initializes the run-time library and sets up the variables.
When you inspect a program, step to the first statement of your code before
accessing variables.
How Inspect Displays Names of Data Items
When Inspect displays the name of a data item (for example, when you direct
Inspect to display the value of a data item), Inspect uses a form similar to Pascal or
TAL. Assume you request Inspect to display the value of this COBOL data item:
hours OF overtime OF weeks-work (3)
Inspect displays its name as follows:
WEEKS-WORK[3].OVERTIME.HOURS
Specifying Subscript Ranges
When referring to arrays, Inspect enables you to specify a subscript range instead
of a single subscript value. For example, suppose the following data item occurs in
a COBOL program:
01 lumber-table.
03 thickness OCCURS 2 TIMES.
05 width OCCURS 6 TIMES.
07 price PICTURE 99V99.
[ scope-path [ (instance) ] . ] data-reference