File truncation warning
The COBOL Editor provides a file truncation warning when you attempt to save a remote or local file that contains lines that exceed the file's record length limit.
- In the Preferences window, expand , and select Save Actions.
- Under File truncation warning, select Enable maximum line length and specify the maximum line length allowed before a truncation warning is issued.
An additional check is done when you save a remote file in the COBOL Editor, it checks for any lines that exceed the record length limit.
If any line exceeds either limit, a window opens warning you that these lines are truncated when the file is saved. Click Yes to continue with the file save operation or No to return to the editor to fix the lines in question.
Starting with version 17.0.3, the COBOL Editors display a warning that includes the line number of the line exceeding the limit and provides a post-truncation preview.
In version 17.0.3, you can now access the Preview option:
- OK – Truncate the lines and save the program.
- Cancel – Return to the warning dialog.
- One truncation warning based on the advanced editor settings.
- One truncation warning dialog for the host record length limit, when the host record length limit is less than the advanced editor setting.
If line truncation is performed by the advanced editor during a save, the line position is not changed.
If the code that saves the remote file truncates lines based on LRECL, the editor cursor position is changed to the first line that exceeds the record length limit.