z/OS ISPF User's Guide Vol I
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


RETRIEVE command

z/OS ISPF User's Guide Vol I
SC19-3627-00

The RETRIEVE command causes the most recently entered command to be displayed on the command line. If the command recalled by RETRIEVE is longer than the current primary input field, ISPF truncates the command to the size of the primary input field for display purposes. Only the data displayed in the primary input field is processed and stored in the command retrieval stack when you press Enter or a function key. However, the original command retains its full length in the retrieval stack.

If the current panel has no input fields, then the size of the primary input field is zero and the retrieved command is not displayed. Normal stack processing occurs, however, and the internal pointer is incremented to the next saved command. This can result in an unexpected command being recalled when RETRIEVE is issued on a subsequent panel that has input fields.

If you issue the RETRIEVE command when the stack is empty, ISPF presents you with a blank command line with the cursor in the first position. If the stack is not empty, ISPF places the cursor immediately following the retrieved command.

If you are in the process of recalling a string of commands by issuing successive RETRIEVE commands, you can cause ISPF to recycle to the top of the command retrieval stack by pressing Enter when the primary input field (normally the command line) is blank.

When you are operating in split-screen mode, one stack retains commands for all logical screens.

There are five cases for which ISPF does not retain an entered command for retrieval:
  • Commands entered using attention fields, such as light pen-selectable fields or cursor-select fields.
  • Commands entered through the use of function keys. This includes any portion of a compound command that results from pressing a function key. For example, if you key PAGE into the primary input field and then press the function key set to the DOWN command, only the PAGE portion of the DOWN PAGE command is retained as a single element in the retrieval stack. The entire character string entered from the primary input field in conjunction with a function key is always retained, whereas any portion of the command resulting from the function key value is not retained.
  • The RETRIEVE command, if entered as a single command. If RETRIEVE is one of the commands of a chain being processed by ISPF, the entire chain is placed on the retrieval stack. However, processing of the command chain ends when ISPF interprets the RETRIEVE command and displays the next command in the stack. Any commands following RETRIEVE in the chain are not processed.

    RETRIEVE can be part of a stack element as a parameter of another command. For example, you might enter FIND RETRIEVE as a command.

  • Commands entered on the COMMAND option of the DISPLAY service.
  • Jump function (extended return) commands entered from a nondisplay field.

You can issue any retrieved command, as is, while it is being displayed, or you can edit the command line and then issue the modified version.

Command retrieval works on a last-in, first-out basis. For example, assume that the last three commands you have issued are PRINT, DOWN, and RIGHT, in that order. Now suppose that you want to again issue the PRINT command. Assuming that F12 is set to RETRIEVE, the sequence of operations is:

  1. Press F12. RIGHT displays on the command line.
  2. Press F12 again. DOWN displays on the command line.
  3. Press F12 a third time. PRINT displays on the command line.
  4. Press Enter.

You can also use the RETRIEVE command to check and correct errors made in keying commands. For example, suppose that you mistakenly enter PFSHOW TAYLOR. When ISPF advises you that TAYLOR is not a valid parameter, you would:

  1. Press F12. PFSHOW TAYLOR displays on the command line.
  2. Type over the Y with an I.
  3. Press Enter.
Each ISPF session supports only one command retrieval stack, to be shared by all logical screens. The number of commands that ISPF saves for retrieval depends on:
  • The size of the stack area allocated for this purpose by the installation. See z/OS ISPF Planning and Customizing for information on changing the size of the stack area allocated for RETRIEVE command processing.
  • The lengths of the individual command lines that are saved.
As a command is entered, it goes to the top of the stack, pushing all other commands down. If there is not enough room at the bottom of the stack to hold the entire bottom command, it is dropped from the stack.

Duplicate commands are allowed in the stack, except when the command being entered is a duplicate of the command at the top of the stack. All command lines (except the RETRIEVE command) are placed in the stack as entered, regardless of validity. Actually, these commands can be any character string, up to 255 bytes each, entered from the screen's primary input field (not necessarily the ZCMD field).

Jump function commands are stored in the stack unless they are entered from a nondisplay field, regardless of whether the field is the primary input field or not.

If the RETRIEVE command is repeatedly entered until the bottom command in the stack displays, issuing the RETRIEVE command once more causes the command at the top of the stack to be displayed again. To force a return to the top of the stack, clear the command field and press Enter. Then, the next RETRIEVE command causes the command line to be set to the command at the top of the stack.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014