To format COBOL source code

You can format entire files or a selection of code in the editor:

  1. Open the COBOL source file in the editor.
  2. If you want to format only a portion of the code, mark a selection in the editor.
  3. Click Source, and then click one of the following commands:
    • Format - formats either the source code currently opened in the editor or just the selection you have made.
    • Format Program - this opens the Format COBOL Program dialog box which shows all the files that comprise the compile unit - source files and any dependent copybooks.
  4. If you have selected Format Program, ensure you select the program and only the copybooks you want to format, then click OK.

    The IDE formats the code according to the preferences in Window > Preferences > Micro Focus > COBOL > Editor > Formatter.