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"
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.
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 – Qualifiers
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.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 /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.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.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.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.
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.