Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : ENTERKEY

ENTERKEY
Returns the name of last key used when the specified screen appeared. (F)
Invocation
key_name = ENTERKEY(screen)
 
On return, contains the name of the key used. Its syntax is V (variable-length character string) with length 7.
A character string specifying the screen name. Its syntax is C (fixed-length character string) with length 16.
Usage Notes
The value returned is one of the following:
In some environments, the CLEAR key and the PA keys may be reserved by the external system and would therefore not be detected by TIBCO Object Service Broker or returned by ENTERKEY.

Exceptions
 
Example
The following rule fills the example screen with data from the example table, displays it, determines the key used to end the rule, and prints its name to the message log:

 
ENTERKEY_1;
_ LOCAL KEY_NAME;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ FORALL EMPLOYEE: | 1
_ EMPLOYEE_DATA.* = EMPLOYEE.*; |
_ INSERT EMPLOYEE_DATA('EMPLOYEE_SCR'); |
_ END; |
_ DISPLAY EMPLOYEE_SCR; | 2
_ KEY_NAME = ENTERKEY('EMPLOYEE_SCR'); | 3
_ CALL MSGLOG('THE NAME OF THE LAST KEY PRESSED IS: ' || | 4
_ KEY_NAME); |
_ ------------------------------------------------------------------------

 
Resulting Output
Executing this rule displays the following output:

 
Employee Name Employee#
------------- ---------
SMYTHE 80000
ROTERDAM 80002
CHANG 80003
GARZA 80004
TOWNSEND 80014
PASTARINA 80019
CHESSEL 80020
TOWENSEND 80021
NAPIER 80024
CANON 80033
NELSON 81000
CAREY 81001
CHIU 81003
LYNGBAEK 81014
KINGSON 81019

 
Press Enter to end the rule. Pressing PF2 after the rule ends displays the following output:

 
------------------------ INFORMATIONAL MESSAGE LOG -----------------------
COMMAND ===> SCROLL ===> P
THE NAME OF THE LAST KEY PRESSED IS: ENTER

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved