Changing the point of view in COBOL
The point of view is usually the currently executing block. You
can also get to inaccessible data by changing the point of view using
the
SET QUALIFY
command. The SET
keyword is
optional. For example, if the
point of view (current execution) is in main
and you want
to issue several commands using variables declared in subprog
,
you can change the point of view by issuing the following:
QUALIFY BLOCK subprog;
You can then issue commands using the variables declared in
subprog
without
using qualifiers. z/OS® Debugger does not see the variables declared in procedure main
.
For example, the following assignment commands are valid with the subprog
point
of view:
MOVE 10 TO var5;
However, if you want to display
the value of a variable in main
while the point of view
is still in subprog
, you must use a qualifier, as shown
in the following example:
LIST (main:>var-name);
The above method of changing the point of view is necessary for command files.