You can assign your own values to function keys so that they invoke an NCL procedure or act as the Enter key. If a function key is being used as the Enter key, you can redefine the Enter key to perform an OCS function.
To redefine function keys, use the PF command. You can specify the new function key value as one of the following:
The value of the function key appears in the command line so that it can be edited before being issued.
The function key performs an immediate function such as Enter.
The function key value is placed at the end of an entry in the command line.
The function key value is placed at the beginning of an entry in the command line.
Example: Assign a Conversational Function Key
To assign the SHOW NCL command as a conversational function key to the F4 key, enter the following command:
PF4 CONV,SHOW NCL=
When you press F4 from now on, SHOW NCL= is displayed at the command prompt so that you can add to it before executing it.
Example: Define Multiple Commands
You can use a semicolon as a command separator in the function key value to define multiple commands. When entering the PF command, specify two semicolons.
To define F20 to clear the screen and display users, enter the following:
PF20 CLEAR;;SHOW USERS
The PF command can set a function key to act as the Enter key. The Enter key is defined as an immediate function key with no associated value.
Example: Define Enter Key
To define PF12 as the Enter key, enter the following:
PF12 IMM
PF12 acts as the Enter key because there is no entry after IMM. When you press F12, text is executed from the command line as if the Enter key is pressed.
You can use the ENTER command to redefine the action of the Enter key.
Important! You must define at least one function key to act as Enter before you redefine the Enter key.
Example: Redefine Enter Key to Act as CLEAR Command
To redefine the value of the Enter key to act as the CLEAR command, type the following:
ENTER CLEAR
The Enter key no longer acts in its standard manner.
Example: Reset Enter Key
To reset the Enter key, type the following text and then press the function key that is defined as Enter:
ENTER IMM
You can also assign values to a function key from an NCL procedure. By setting the appropriate function keys in an NCL procedure and setting your initial command to execute the NCL procedure on entry to OCS, you can set the function keys for your OCS window.
| Copyright © 2010 CA. All rights reserved. |
|