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


Undoing edit interactions

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

If you enter an edit primary, line, or macro command, or type over existing data by mistake, you can restore your data with the UNDO primary command. UNDO has no operands.

Each time you enter UNDO it undoes one interaction. A single interaction might be a data change and Enter key, a data change and function key, or the invocation of an edit macro. All changes caused by an edit macro are considered to be one interaction. You can continue to undo interactions, one at a time, until you have reversed all changes made back to the beginning of your edit session unless you have done a save or undo recycled. If you have done a save or if undo recycled, you can only undo interactions back to that point. At that point, if you enter UNDO again, a message informs you that there are no more interactions to undo.

UNDO has certain limitations. Edit interactions that the command does not undo are:
  • Changes that are made by an initial edit macro or recovery edit macro.
  • Edit interactions before any data changes are made.
  • Edit interactions in previous edit sessions.
  • Reset of changed flags (==CHG>) by use of RESET or by typing over the command line area.
  • Changes you make to other data sets or members by using the CREATE, REPLACE, or MOVE commands. Because UNDO affects only the member or data set that you are editing, it removes lines from your display if they were inserted there by MOVE. However, it does not put those lines back into the data set or member from which they came.

See UNDO—Reverse Last Edit Interaction for a discussion of UNDO limitations.

UNDO is reset by SAVE. This means that you can UNDO interactions for the current edit session until you save your data. After the save, you can undo only interactions made following the time you saved your data.

UNDO can be run from data kept in storage or from the recovery file (as in previous releases) depending on what you specify in the Edit Profile for the data you are entering. The SETUNDO primary or macro command is used to control the profile setting. To use UNDO, you must have either RECOVERY on or SETUNDO on. You can undo only those changes made after RECOVERY or SETUNDO was turned on.

SETUNDO allows you to specify how changes you make during your edit session are to be recorded and used by UNDO. You can specify SETUNDO STORAGE (or SETUNDO KEEP or SETUNDO ON) or SETUNDO RECOVER. SETUNDO STORAGE (or SETUNDO KEEP or SETUNDO ON) specifies UNDO from storage. SETUNDO RECOVERY specifies UNDO from recovery and turns recovery on if it is off. See SETUNDO—Set the UNDO Mode for more details. Understanding differences in SETUNDO processing explains how the SETUNDO operands differ.

If not enough storage is available to run UNDO from storage but RECOVERY is on, UNDO processing continues to be available by using the recovery file. This makes UNDO available for very large files. It also provides users of machines with less storage with the benefit of UNDO for their larger files.

Note: If you have specified RECOVERY OFF and your installation allows UNDO from storage, the message that UNDO is unavailable does not display when you enter an edit session. If UNDOSIZE = 0, the message appears as before.

The UNDOSIZE specifies the number of kilobytes allowed for saving edit transactions for UNDO and the value is in the configuration table. For more details, refer to z/OS ISPF Planning and Customizing.

If UNDOSIZE is set to zero, all undo documented functions work as in ISPF/PDF Version 3.3 and previous releases. This means that the Profile lines do not show the status of SETUNDO, and that warning messages will be shown informing you that UNDO is unavailable until RECOVERY is turned on.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014