Formatting COBOL code elements

Use the Formatter preference to specify preferences for formatting code in the editor.

Procedure

  1. Click Window > Preferences > COBOL > Editor > Formatter.
  2. Select the Indentation tab to specify indentation for the record description and procedure code divisions.
    Start of Area A
    Specify a column 8 - 11 used to align language elements that are required to begin in Area A. Column 8 is the default value.
    Start of Area B
    Specify a column 12 - 16 to specify the leftmost column to align language elements that are required to begin in Area B. Column 12 is the default value.
    Indent length
    Specify the number of spaces to indent for each language element level in Area A and B. The default value is 3.
    Use fixed indent length
    Click to specify a fixed length that is defined by the Indent length field.
    Indent EXEC blocks
    Indicates to indent EXEC blocks.
    Indent END-EXEC phrase
    Indicates to indent the line that contains the END-EXEC phrase with the contents of the EXEC block.

    The Custom Indentation section allows for specifying the number of spaces to indent the listed language phrases. You can specify a value 0 - 10.

  3. Select the Capitalization tab to specify the type of capitalization to be used for language elements.
    You can select the following capitalization options for some language elements in the editor:
    • Upper
    • Lower
    • Mixed, which is a mix of uppercase and lowercase characters, for example: FirstLast or firstLAST.
    • None

    The default value for the reserved word, user-defined word, function, date format, and complier directive language elements is uppercase. The default value for comments is none.

  4. Select the Line Length tab to
  5. Click Apply when finished to save your changes.

Feedback