If
Automatically format on save is selected in your formatter preferences (), you only need to save your code from within the COBOL editor for the entire program to be formatted according to the active
formatter profile. To format only the current sentence when you terminate it with a period, use the
Format sentence on period option available from
. These methods of formatting are only applicable for formatter profiles (not code clean up profiles).
If neither of these options are selected, you must select the code to be formatted manually:
- Open the COBOL source file in the editor.
- If you want to format only a portion of the code, mark a selection in the editor.
- Click
Source, and then click one of the following commands:
- - formats either the source code currently opened in the editor or just the selection you have made, according to the active
formatter profile.
- Format with Clean Up - formats either the source code currently opened in the editor or just the selection you have made, according to both the
active clean up profile and active formatter profile.
- - this opens the
Format COBOL Program dialog box which shows all the files that comprise the compile unit - source files and any dependent copybooks.
- 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 contents of the active formatter profile.
The active profiles are specified in
and
> Clean Up.