Safeguard User's Guide (G06.24+, H06.03+)

Working With SAFECOM
Safeguard User’s Guide422089-009
7-7
Displaying and Editing Previous Commands
Displaying and Editing Previous Commands
SAFECOM provides four commands that allow you to display, change, and execute
commands that you previously entered during the current session. These commands
and their functions are:
The examples that follow highlight the main features of these commands. For complete
details, refer to the command descriptions in the Safeguard Reference Manual.
Displaying Previous Commands
Because SAFECOM retains the commands you enter during an interactive session,
you can use the HISTORY command to retrieve a specified number of the most recent
commands. If you enter the HISTORY command without specifying the number of
commands, the last 10 commands appear.
For example, the following command displays the last five commands entered during
your current session. The example assumes that the HISTORY command is the
seventh command you executed in this session.
=HISTORY 5
3=VOLUME $DATA.REPORT3
4=INFO / OUT MYFILES / DISKFILE *, DETAIL
5=HELP
6=HELP ASSUME
7=HISTORY 5
The HISTORY command adds line numbers to the commands even if your normal
SAFECOM prompt does not include them. However, the ?, !, and FC commands do not
display these line numbers unless your normal SAFECOM prompt includes a line
number.
The HISTORY command also allows you to delete all commands in the SAFECOM
history buffer and to reset line numbering to line 1:
=HISTORY RESET ALL
HISTORY Displays a designated number of the most recent commands entered during
the current session; also can clear the last command or all commands from
the history buffer.
? Displays a single previously entered command that you specify by line
number, relative line number, or text string.
! Functions like the ? command except that it also executes the displayed
command.
FC Functions like the ? command except that it also provides a command-line
template on which you can edit the displayed command