PRESERVE—Enable Saving of Trailing Blanks

The PRESERVE primary command enables or disables the saving of trailing blanks in the editor. This gives you the ability to override the setting for the Preserve VB record length field on the edit entry panel.

Syntax

Read syntax diagramSkip visual syntax diagramPRESERVEONOFF
ON
The editor preserves the record length of the record when the data is saved.
OFF
Turns truncation on. ISPF removes trailing blanks when saving variable-length files.

Regardless of the PRESERVE setting, if a line has a length of zero, ISPF saves 1 blank.

Description

PRESERVE ON causes the editor to save trailing blanks for variable length files. The number of blanks saved for a particular record is determined by one of these:
  • The original length of the record when it was read in to the editor
  • The number of blanks required to pad the record length specified by the SAVE_LENGTH edit macro command
  • The length of the record that was saved on disk during a previous SAVE request in the same edit session

PRESERVE OFF causes the editor to truncate trailing blanks. If a line is empty ISPF saves 1 blank.

Use of the PRESERVE command does not prevent the editor from working on data past the specified record length. The length set and returned by the PRESERVE command is only used when the data is written and does not affect the operation of other edit functions.

Examples

To enable the editor to remove trailing blanks when data is saved, enter this command:
PRESERVE OFF
To save the trailing blanks, enter this command:
PRESERVE ON