Version 4.2.6
 —  Debugger  —

Variable Maintenance

This function is used to display and modify variables within the debugger when a Natural object has been interrupted.

For the interrupted Natural object, the Variable maintenance function displays user-defined variables, global variables and the database-related system variables *COUNTER, *ISN and *NUMBER together with Natural data formats, lengths and contents.

This section covers the following topics:


Display User-Defined, Global and DB-Related System Variables

This section provides instructions for invoking either the Display Variables (summary) screen with a list of all variables, or the Display Variable (individual) screen with all details on a particular variable.

Display Variables - Summary

Start of instruction set To display a summary of user-defined, global and database-related system variables

The Display Variables (summary) screen provides a list of the variables specified for the interrupted Natural object. Long values may be displayed truncated on the screen. For arrays, only the contents of the first occurrence are displayed.

To switch between alphanumeric and hexadecimal representation of the variable contents, choose PF10 (Alpha) and PF11 (Hex).

To toggle between the truncated display of a variable and the full name display with the group name, variable name and indices (if relevant), choose PF5 (Zoom).

Display Variable - Individual

Start of instruction set To display an individual variable in its entirety

The Display Variable (individual) screen appears with all relevant specifications for the particular variable.

For large variables that exceed the length of 256 bytes, the screen displays the first 256 bytes by default.

Start of instruction setTo display the entire contents of the variable or navigate within the contents

You can choose PF10 (Alpha) and PF11 (Hex) to switch between alphanumeric and hexadecimal representation of the variable contents.

Start of instruction setTo display all occurrences of an array using screen functions

Start of instruction setTo display one or more occurrences of an array using direct commands

Top of page

Display System Variables

Start of instruction set To display system variables (except database-related system variables)

For variables of the type Handle, the name of the class of the instance that the Handle refers to is displayed in alphanumeric representation. If the class name is not available, the Globally Unique Identifier (GUID) is displayed instead. If the class was defined within Natural, the class name or GUID is suffixed with (NAT).

The contents of properties of an instance of a class cannot be displayed within the debugger.

Top of page

Modify Variable

This function does not apply to system variables.

This function is used to change the value of user-defined and global variables and the database-related system variables.

Start of instruction set To modify the contents of a variable from the Modify Variable screen

  1. Invoke the Modify Variable screen by marking the variable with the line command MO.

    Or:
    On the Display Variable screen, choose PF5 (Mod).

  2. On the Modify Variable screen, in the Contents field, change the value of the variable.

    The new contents must be valid for the Natural data format of the modified variable since the format of a variable cannot be modified within the debugger.

    On the Modify Variable screen, you can toggle between alphanumeric and hexadecimal representation of the variable value using PF10 (Alpha) and PF11 (Hex).

Start of instruction set To modify the contents of a variable via direct command

Note:
The Modify Variables function or the MODIFY VARIABLE command can be disallowed by Natural Security as described in Components of an Environment Profile in the Natural Security documentation.

Top of page