Data item values can be checked and changed with the debugger. This section explains debugging functions for data items.
Note
When a REPLACE statement or a COPY statement with a REPLACING phrase, DISJOINING phrase, or JOINING phrase is described in the source program, the source program before string replacement is displayed. In order to reference, change, or monitor the value of the data item to be replaced, specify the data item name after replacing.
This section explains methods that can be used to reference a data item value.
Displaying the value in a tooltip
When the mouse cursor is positioned on a data item displayed in the COBOL editor, a tooltip appears with the value of the data item.
Using the Watch view
The value of a data item and more detailed information on it can be referenced by adding the data item to the "Watch" view. For details on the "Watch" view, see "7.2.3 Watch view."
This section explains the methods that can be used to change the value of a data item added to the "Watch" view.
Changing a data item in automatic format
To change the value of a data item in automatic format:
In the "Watch" view, select the data item whose value is to be changed.
Select "Change Value" from the context menu.
Enter the replacement value for the current value in the "Set Value" dialog box, and click the "OK" button.
Changing a data item in hexadecimal format
Follow the procedure below to change the value of a data item in hexadecimal format.
In the "Watch" view, select the data item whose value is to be changed.
Select "Change Hex Value" from the context menu.
Enter the replacement value for the current value in the "Set Value" dialog box, and click the "OK" button.
Data items can be monitored so that execution of the program can be halted when the value of a data item is changed.
Use either of the following methods to specify whether to halt execution of the program when such a value is changed:
During registration in the "Watch" view:
Check the "Suspend by Value Change" checkbox in the "Add Data Item" dialog box.
For a data item registered in the "Watch" view:
Select "Suspend by Value Change" from the context menu of the "Watch" view.
The following alphanumeric data items are considered as Int type binary integer data items.
int type binary integer data item | Treatment in Debug | |
---|---|---|
BINARY-CHAR | PIC X(1) | Alphanumeric data item for 1 byte |
BINARY-SHORT | PIC X(2) | Alphanumeric data item for 2 bytes |
BINARY-LONG | PIC X(4) | Alphanumeric data item for 4 bytes |
BINARY-DOUBLE | PIC X(8) | Alphanumeric data item for 8 bytes |
In addition, set the hexadecimal format if you want to set the value in int type binary integer data item.
When using the debug function to handle the data (value reference, value change, and interruption in changing value), if the area length is specified in an extremely large data item, the debugging operation may be very slow. Although it is not possible to say unconditionally that the limit of the data length depends on the ability and environment of the debugging machine, pay attention to the data size in the debugging operation.
When considering the slow operation during debugging due to using a large area length data item, specify the reference modification and limit the scope of the data area that is taken as the handle target.