Color Coding

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:

To reconfigure a color code for a component in a code, do the following:

  1. Click Window > Preferences.  

  2. In the Preferences window, expand COBOL, and click Editor

  3. Click the Colors tab.

    Various components of a COBOL program are listed under Foreground: 

  4. Select one of the components, and click Color.

  5. In the Color dialog box, select a color, and click OK

  6. 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.

Identifying Unreferenced Variables

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:

Note: You can change the color of the unreferenced variables. Refer to Color Coding.