Command Recall

Direct Mode includes a line command recall function similar to the DCL recall function, which displays previously entered command lines. Use <CTRL-B> or the Up Arrow key at the GTM> prompt to scroll back through command lines. Use the Down Arrow key to scroll forward through the command lines. GT.M displays one command line at a time.Once you have recalled a command, you can edit it if you wish and then reissue it.

The RECALL command is another way to access previously entered Direct Mode command lines. RECALL is only valid in Direct Mode and causes an error if it appears in other M code.

The format of the RECALL command is:

            REC[ALL] [intlit|strlit]
          

If the Direct Mode session has just started, you may not have entered 99 lines for GT.M to save and therefore you will not have 99 lines to look at. The most recently entered GT.M command line has the number one (1), older lines have higher numbers. GT.M does not include the RECALL command in the listing. If the RECALL command is issued from a location other than the Direct Mode prompt, GT.M issues a run-time error.

Example:

        GTM>WRITE $ZGBLDIR
        M.GLD
        GTM>SET $ZGBLDIR TEST.GLD
        GTM>SET A=10
        GTM>SET B=A
        GTM>REC
        1 SET B=A
        2 SET A=10
        3 SET $ZGBLDIR TEST.GLD
        4 WRITE $ZGBLDIR
          

This REC[ALL] command displays the previously entered commands.

You can also display a selected command by entering RECALL and the line number of the command you want to retrieve.

Example:

        GTM>REC 2
        GTM>SET A=10
          

This RECALLs the line number two (2).

If the RE[CALL] command includes a text parameter, GT.M displays the most recent command matching the text after the RE[CALL] command.

Example:

        GTM>REC WRITE
        GTM>WRITE $ZGBLDIR
        MUMPS.GLD
          

This RECALLs "WRITE", the command most recently beginning with this text. Note that the RECALL command text is case sensitive. The RECALL command with a text argument treats WRITE and write differently, that is, it treats them case sensitively. If you first type the WRITE command in lower-case and then type WRITE in upper-case to recall it, the RECALL command does not find a match.