This section provides an overview of the following basic operational issues in Direct Mode:

This section provides an overview of basic functionality and concepts that enhance your use of Direct Mode.

Direct Mode includes a line command recall function to display 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.You may delete and reenter characters starting at the end of a recalled line.

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 
/usr/lib/fis-gtm/V5.4-002B_x86/mumps.gld
GTM>set $zgbldir="test.gld"

GTM>set a=10

GTM>set b=a

GTM>recall

1 set b=a
2 set a=10
3 set $zgbldir="test.gld"
4 write $zgbldir

GTM>

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>recall 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>recall write
GTM>write $zgbldir

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.

GT.M permits the use of the GT.M command line editor at the Direct Mode prompt and during M READs from a terminal. The GT.M line editor allows cursor positioning using the <CTRL> key, edit keypad and function keys.

The GT.M Direct Mode line editing keys are as follows:

Backspace: Deletes the character to the left of the cursor

Delete: Deletes the character to the left of the cursor

Up-arrow: Moves to a less recent item in the RECALL list

Down-arrow: Moves to a more recent item in the RECALL list

Left-arrow: Moves the cursor one character to the left

Right-arrow: Moves the cursor one character to the right

<CTRL-A>: Moves the cursor to the beginning of the line

<CTRL-B>: Moves the cursor one character towards the beginning of the line

<CTRL-D>: On an empty line, terminates GT.M and returns control to the shell.

<CTRL-E>: Moves the cursor to the end of the line

<CTRL-F>: Moves the cursor one character towards the end of the line

<CTRL-K>: Deletes all characters from the cursor to the end of the line

<CTRL-U>: Deletes the entire line

[Note]Note

When entering commands at the direct mode prompt, the insert mode can be toggled for that line by using the insert key. When GT.M starts, insert mode is enabled unless the value of the gtm_principal_editing environment variable includes the string NOINSERT. If insert mode is disabled or enabled for the $PRINCIPAL device by an USE statement before returning to direct mode, it will remain disabled or enabled at direct mode. The insert mode can be toggled within a direct mode line using the terminal’s INSERT key.

loading table of contents...