Examples of key definitions

Use the examples in this section to see how to enter a complete function key definition for each type of QMF panel. The examples show how to update a full-screen panel, a window panel, and a help panel.

The examples shown use panel IDs from the tables in Identifying the panel that you want to customize. Use these tables to get the proper values for the PANEL column of the function key table.

Important
Ensure that each customized secondary panel has a key set to the CANCEL command to enable the user to exit the panel.

Entering a definition for a key on a full-screen panel

Use the SQL queries shown in Figure 150 to change F2 on the Home panel from EDIT TABLE to IMPORT. Identify the Home panel with the panel ID HOME, and indicate with the number 2 (in the first query shown) that you want to customize the command executed when a user presses F2.

Figure 150. Changing a function key for a QMF command on the Home panel
INSERT INTO MY__PFKEYS (PANEL,ENTRY__TYPE,NUMBER,PF__SETTING)
  VALUES('HOME', 'K', 2, 'IMPORT')
 
INSERT INTO MY__PFKEYS (PANEL,ENTRY__TYPE,NUMBER,PF__SETTING)
  VALUES('HOME','L',1,'1=Help     2=Import     3=End     4=Show     5=Chart     6=Query')

The QMF Home panel now displays Import for F2:

Type command on command line or use PF keys. For help, press PF1 or type HELP.
______________________________________________________________________________
1=Help        2=Import      3=End        4=Show        5=Chart       6=Query
7=Retrieve    8=Edit Table  9=Form       10=Proc      11=Profile     12=Report
OK, cursor positioned.
COMMAND ===>

In the PF__SETTING column of the second query, be sure to type exactly what appears in the top row of keys on the Home panel, even if you have not customized each key. For example, if you specify only the word Import in the PF__SETTING column for the second query, the Home panel looks like this:

Type command on command line or use PF keys. For help, press PF1 or type HELP.
______________________________________________________________________________
Import
7=Retrieve    8=Edit Table  9=Form       10=Proc      11=Profile     12=Report
OK, cursor positioned.
COMMAND ===>

Entering a definition for a key on a window panel

The SQL queries in Figure 151 add a F3 key to the Tables panel in Prompted Query. The function key executes the CANCEL command, and is labeled CancelMe.

Figure 151. Changing a function key on the Specify panel of Prompted Query
INSERT INTO MY__PFKEYS (PANEL,ENTRY__TYPE,NUMBER,PF__SETTING)
  VALUES('QPTABL', 'K', 3, 'CANCEL')
INSERT INTO MY__PFKEYS (PANEL,ENTRY__TYPE,NUMBER,PF__SETTING)
  VALUES('QPTABL', 'L', 3, 'CancelMe')

Entering a key definition for a Help or prompt panel

The SQL queries in Figure 152 add a F13 key to all help panels. The function key executes the CANCEL command, and is labeled CancelMe.

Figure 152. Changing a function key on a help panel or prompt panel
INSERT INTO MY__PFKEYS (PANEL,ENTRY__TYPE,NUMBER,PF__SETTING)
  VALUES('HEXXXX', 'K', 13, 'CANCEL')
INSERT INTO MY__PFKEYS (PANEL,ENTRY__TYPE,NUMBER,PF__SETTING)
  VALUES('HEXXXX', 'L', 13, 'CancelMe')

All help and prompt panels are customized using a single class ID. Because any changes you make to one panel in the class appear on all panels that are defined with that class ID, ensure changes you make to one help or prompt panel are appropriate for all the help and prompt panels in that class.

[ Previous Page | Next Page | Contents | Index ]