The keywords, variables, sections, and paragraphs are displayed in color when you open a COBOL element in the COBOL editor. The data dictionary variables are displayed in color only if you have configured data dictionary in Eclipse IDE for OS 2200.
You can reconfigure color codes for the following components in a COBOL program:
Sections
Paragraphs
Working-Storage Variables
Data Dictionary Variables
To reconfigure a color code for a component in a code, do the following:
Click Window > Preferences.
In the Preferences window, expand COBOL, and click Editor.
Click
the Colors tab.
Various components of a COBOL program are listed under Foreground:
Select one of the components, and click Color.
In the Color dialog box, select a color, and click OK.
Click
Apply, and then click OK.
Note: After
you successfully reconfigure a color code, you need to press F4 to reflect the color change in
the active editors. However, the change automatically reflects in
the new editors that you open.
Any variable (elementary, conditional, or group level) that is defined in the Working Storage section but not referenced in the Procedure Division of a COBOL program is referred to as an unreferenced variable. All unreferenced variables appear in bold. The following are a few scenarios:
Any unreferenced variable defined in the Working Storage section is highlighted in bold.
If a group-level variable, referenced or unreferenced, has an unreferenced elementary variable, the elementary variable is highlighted in bold. If the group-level variable is unreferenced, it is also highlighted in bold.
If an unreferenced conditional variable is referenced under an unreferenced elementary variable, the conditional variable is highlighted in bold.
If an unreferenced elementary variable that has a referenced conditional variable, the elementary variable is highlighted in bold.
Any redefined variable that has not been referenced directly in the Procedure Division is highlighted in bold. A variable that has been redefined by another variable and has not been referenced directly in the Procedure Division is highlighted in bold.
A variable is newly defined in the Working Storage section and is unreferenced in the Procedure Division. To highlight this variable in bold, do one of the following on the editor:
Close and re-open the COBOL program.
Reload the COBOL program from the OS 2200 system, press F5.
Refresh the color coding of the editor, press F4.
Note: You can change the color of the unreferenced variables. Refer to Color Coding.