z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


PRESERVE—Enable Saving of Trailing Blanks

z/OS ISPF Edit and Edit Macros
SC19-3621-00

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

Syntax

Read syntax diagramSkip visual syntax diagram
Macro command syntax

                      .-ON--.   
>>-ISREDIT--PRESERVE--+-----+----------------------------------><
                      '-OFF-'   

ON
The editor saves all trailing blanks in the record.
OFF
Turns truncation on. ISPF removes trailing blanks when saving variable-length files. If a line is empty ISPF saves 1 blank.
Read syntax diagramSkip visual syntax diagram
Assignment statement syntax

>>-ISREDIT--(varname)-- = --PRESERVE---------------------------><

Read syntax diagramSkip visual syntax diagram
                           .-ON--.   
>>-ISREDIT--PRESERVE-- = --+-----+-----------------------------><
                           '-OFF-'   

varname
The name of a variable to contain the setting of PRESERVE mode, either ON or OFF.
ON
Same as macro command syntax.
OFF
Same as macro command syntax.

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 record 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.

Return codes

0
Normal completion
6
Record format is not variable.
16
Error setting variable.
20
Severe error

Examples

To save the value of the PRESERVE mode in variable &TRMODE:
ISREDIT (TRMODE) = PRESERVE
To enable the editor to remove trailing blanks when the data is saved:
ISREDIT PRESERVE OFF

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014