The RETRIEVE command displays your most recent command line entry. Using RETRIEVE repeatedly displays command line input in reverse order.

TSO with ISPF TSO without ISPF CICS®

RETRIEVE a previous command line entry

Read syntax diagramSkip visual syntax diagramRETrieve?


Use the RETRIEVE command or a ? character on the QMF command line to display the most recently entered command. You can enter multiple ? characters at once to go as far back in the command history as necessary. For example, entering ??? displays the third previous command line entry. The confirmation message that you receive after issuing the RETRIEVE command indicates how far back the retrieved input was entered relative to the input that was most recently entered. When the oldest entry is retrieved, and the RETRIEVE command or ? is entered again, the most recent entry is again displayed.

Usage notes

  • When a function key was used to execute a command, only the text that was entered on the command line at that time is redisplayed. The function key must be pressed again to execute the command.
  • After the command is retrieved, you can press Enter to reissue the command. If the command is not complete, be sure to modify it before pressing Enter, or press a function key that is compatible with the text on the command line. Characters in retrieved text are converted (or not converted) into uppercase according to the CASE parameter specified in your profile.
  • When you type the RETRIEVE command or ? character over existing text on the command line:
    • No space is necessary between the last ? that you type and the existing text. For example, if the command DISPLAY QUERY is already on the command line, ??SPLAY QUERY retrieves the second previous command line entry.
    • RET can be entered, but there must be at least one blank space between RET and the rest of the text. For example, the following is accepted:

      The following is not accepted: