Editor save actions
The Save Actions feature allows for selected actions to occur automatically before and after a file is saved. The actions that are performed are defined by the Save Actions preference.
You can specify save actions for the COBOL source file and copybooks
separately. If save actions is enabled, the actions that are performed
during a save are defined by Formatter preference.
- For a COBOL file, the actions relate to indentation, capitalization, and line length. You can select whether all formatting options or just the capitalization options are automatically performed when you save a file. Additionally, the identify unused variables and remove white space actions can be performed.
- For a copybook, the save actions include uppercase of copybook code and comments and remove white spaces from the end of a text line.
When you save a file in the COBOL Editor, the following sequence
occurs:
- Real-time syntax checking is completed.
- Formatting is applied to the file.
- Trailing white spaces are removed.
- Lines exceeding the specified length are identified.
- File contents are saved.
- Preprocessor statements are identified.
- Unused variables are identified
After the save action is complete, a single Undo command can be used to remove all formatting and white-space removal changes.