Accessing Terminals
Developing TACL Programs
2–24
107365 Tandem Computers Incorporated
Accessing Terminals
You can use TACL to read and write from a terminal. Sample operations include:
Defining function keys
Sending escape sequences to a terminal
Changing the TACL prompt
Implementing menus
In addition, you can write programs that execute one or more commands that you use
frequently. The Guardian User's Guide describes how to create command definitions;
these definitions are typically alias or macro variables.
Defining Function Keys
TACL recognizes 16 function keys. In the unshifted position they are named F1
through F15 (TACL predefines F16 as its help key). In the shifted position the function
keys are named SF1 through SF16. You can define each function key to perform a
sequence of operations that are useful in your environment. For example, you could
specify F1 as TIME and F2 as FILES.
To define function keys, create an edit-format file that contains definitions for each
function key you want to define. You then load the file (or refer to it from your
TACLCSTM file so that it is loaded when you log on).
Function key definitions are typically ALIAS variables (if you are providing an alias
for a single command or built-in function) or MACRO variables (for more complex
operations). For example, you can redefine #LOGOFF with an alias, but for
#LOGOFF/SEGRELEASE/ you must use a macro variable. The following code
defines two alias variables:
?SECTION f1 ALIAS
TIME
?SECTION f2 ALIAS
FILES
You can, additionally, define characters or sequences of characters that perform a
sequence of operations. For example, the following macro performs a FILENAMES
operation on the specified subvolume (or on the current subvolume, if the user does
not specify a subvolume):
?SECTION fn MACRO
FILENAMES %*%
To perform the FILENAMES operation, type FN.
The following macro prints a file to $S.#LP:
?SECTION pr MACRO
FUP COPY %*%, $S.#LP
To print a file, type PR
filename
.
For more information about defining function keys, see the Guardian User's Guide.