PCA Command
Command keyword for the commands DEFINE/COMMAND and DEFINE/KEY.
DEFINE/COMMAND establishes command abbreviations, and DEFINE/KEY
establishes keypad definitions.
Format
DEFINE/COMMAND parameters
DEFINE/KEY parameters
1 – Parameters
parameter
Depends on the qualifier specified.
2 /COMMAND
PCA Command
Defines a command synonym by associating a symbol name with a
list of one or more PCA commands.
Format
DEFINE/COMMAND symbol-name = "command-string"
2.1 – Parameters
symbol-name
Specifies the symbol name that you want associated with a list
of PCA commands. The symbol name can be up to 255 characters long
and may include letters, digits, underscores, and dollar signs.
It cannot start with a digit. If symbol-name is already defined,
the new definition replaces the old definition.
command-string
Specifies the string of PCA commands to associate with the symbol
name. The command string must be enclosed in quotation marks and
consist of the first part of a PCA command, a whole command, or a
list of commands separated by semicolons
2.2 – Description
The DEFINE/COMMAND command associates a symbol name with a PCA
command string. The command string consists of one or more PCA
commands separated by semicolons, and must end with a partial or
full PCA command. When the symbol name appears at the start of a
subsequent PCA command, it is replaced by the command string. The
resulting string is parsed and executed by PCA. DEFINE/COMMAND
thus gives you the same command abbreviation capability as the
symbol assignment statement (symbol-name := command-string) in
DCL. The command string may contain previously defined commands,
when those symbols translate directly into PCA commands. (PCA
supports one level of symbol translation.)
To display the current symbol definitions created by
DEFINE/COMMAND, use the SHOW SYMBOL/DEFINED command.
2.3 – Examples
PCAC> DEFINE/COMMAND SA = "SHOW ALL"
PCAC> SA
This command associates the symbol SA with the PCA command
SHOW ALL. When the SA command is used, SA is expanded to the
equivalent command string, which PCA then executes.
3 /KEY
PCA Command
Associates a PCA command string and a set of attributes with a
key on the terminal keyboard.
Format
DEFINE/KEY key-name "command-string"
3.1 – Parameters
key-name
Specifies the key you want to define.
command-string
Specifies the command string to be processed when you press the
defined key. Enclose the command string in quotation marks if it
contains a space.
3.2 – Description
The DEFINE/KEY command assigns PCA command strings to keypad
keys. When you press the appropriate keypad key, PCA enters the
associated command string into your command line.
The key definition remains in effect until you redefine the
key (by issuing another DEFINE/KEY command for the same KEY),
issue the DELETE/KEY command for that key, or exit. You can
include key definitions in a command procedure, such as your
PCA initialization file.
3.3 – Qualifiers
3.3.1 /ECHO
/ECHO
/NOECHO
Determines whether the equivalence string is displayed on your
terminal after you press the defined key. The default is /ECHO.
You cannot use the /NOECHO qualifier with the /NOTERMINATE
qualifier.
3.3.2 /IF_STATE
/IF_STATE=(state-name[,...])
/NOIF_STATE
Specifies one or more states, one of which must be in effect for
the key definition to be processed. If you omit the /IF_STATE
qualifier or if you use /NOIF_STATE, the current state is used.
The state-name is an alphanumeric string. States are established
with the /SET_STATE qualifier or the SET KEY command.
3.3.3 /LOCK_STATE
/LOCK_STATE
/NOLOCK_STATE
Specifies that the state set by the /SET_STATE qualifier remains
in effect until explicitly changed. If you use the /NOLOCK_STATE
qualifier, the state set by /SET_STATE is in effect only for the
next definable key you press or for the next read-terminating
character you type.
The default is /NOLOCK_STATE unless you specify the /TERMINATE
qualifier.
3.3.4 /LOG
/LOG
/NOLOG
Controls whether the system displays a log message indicating
that a key definition has been successfully created. The default
is /LOG.
3.3.5 /SET_STATE
/SET_STATE=state-name
/NOSET_STATE
Causes the specified state-name to be set when the key is
pressed. The state-name can be any alphanumeric string.
If you omit the /SET_STATE qualifier or if you use /NOSET_STATE,
the current state that was locked remains in effect after you
press the defined key. If you have not included this qualifier
with a key definition, you can use the SET KEY command to change
the current state.
3.3.6 /TERMINATE
/TERMINATE
/NOTERMINATE
Determines whether the current equivalence string is to be
terminated (that is, processed as command input) when you press
the defined key. The default is /NOTERMINATE, which allows
you to enter additional input before the equivalence string is
processed. Pressing the RETURN key after pressing the defined key
has the same effect as using /TERMINATE in the key definition.
3.4 – Examples
PCAC> DEFINE/KEY/TERMINATE KP7 "SHOW ALL/FULL"
This command associates the keypad key KP7 (the 7 key on the
numeric keypad) with the SHOW ALL/FULL command. Because the
/TERMINATE qualifier is used, you do not need to press the
RETURN key after pressing the KP7 key to execute the command.