SAVE—Save the Current Data

SAVE saves edited data without ending your edit session. Generally, you do not need to use SAVE if recovery mode is on. See AUTOSAVE, CANCEL, and END for more information about saving data.

Syntax

Read syntax diagramSkip visual syntax diagramSAVE NEWGENNOGEN
NEWGEN
Applicable only when editing a member in a PDSE version 2 data set that is configured for member generations. Saves the member in a new generation. This new generation becomes the current generation, also known as generation zero. The generation being edited is left unchanged. This is the default behavior when editing the current generation.
NOGEN
Applicable only when editing a member in a PDSE version 2 data set that is configured for member generations. Saves the member to the same generation that is being edited. This is the default behavior when editing a non-current generation.
Note: The default SAVE behavior when editing a non-current member generation can be changed in the ISPF site configuration table.

Description

SAVE writes the data to the same data set from which it was retrieved unless you specified a concatenated sequence of partitioned data sets on the Edit Entry panel. In that case, the data is saved in the first library in the concatenation sequence, regardless of from which library it came. For a sequential data set, the complete data set is rewritten. For a partitioned data set, the member is rewritten with the same member name.

For a member in a PDSE version 2 data set that is configured for member generations, the behavior depends on the member generation being edited:
  • When editing the current generation, also known as generation zero, the default behavior is to write the member to a new generation.
  • When editing a non-current generation, the default behavior is to write the member to the same generation that is being edited. The default behavior when editing a non-current generation can be changed in the ISPF site configuration table.
  • These default behaviors for member generations can be overridden using the NEWGEN and NOGEN keywords.

If stats mode is on, the library statistics for the member are automatically updated.

If both number mode and autonum mode are on, the data is automatically renumbered before it is saved.

If SAVE cannot successfully rewrite the data because of I/O errors or insufficient space, the system displays a message in the upper-right corner of the panel, accompanied by an audible alarm, if installed. You can then try to save the data in another data set by taking these steps:

  1. Enter CREATE or REPLACE with no operand on the command line. Use CREATE only if the destination is a member of a partitioned data set, such as an ISPF library member.
  2. Type CC on the first and last data lines to specify that all lines are to be copied. Then press Enter.
  3. Fill in the data set and member name of the alternate library on the Edit Create or Edit Replace panel, and press Enter.

When a space ABEND such as D37 occurs, ISPF deallocates the data set so that you can swap to another screen or user ID and reallocate the data set. This does not occur for data sets that were edited using the DDNAME parameter of the EDIT service.

See Creating and replacing data for more information.

Examples

To save the data in the data set or member that you are editing:

  1. On the command line, type:
    SAVE
  2. Press Enter.

When you are editing generation zero of a member in a PDSE version 2 data set and you want the data to be saved to the same generation (rather than create a new generation):

  1. On the command line, type:
    SAVE NOGEN
  2. Press Enter.