z/OS ISPF User's Guide Vol I
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the light pen and cursor-select key

z/OS ISPF User's Guide Vol I
SC19-3627-00

ISPF permits fields on a panel to be detected with a light pen or the cursor-select key. The cursor-select key is a hardware feature on 3179, 3179G, 3180, 3278, 3279, and 3290 terminals. Only the attention mode of light pen selection is used.

Panel fields that are detectable by light pen or cursor selection can simulate a command entry, or give you an alternate means of selecting options from a menu. Each field must be defined as an attention field. Use an attribute character that has been defined with the ATTN(ON) keyword. The panel designer must provide the number of blank characters that are required by the terminal hardware before and after the attention attribute character.

Processing of light pen or cursor-selected fields is handled in much the same way as function key processing. The entire contents of the selected field are treated as a command and processed as though they had been typed into the command field. If the command is found in the tables, it is performed immediately. If the command is not found in the tables, it is inserted into the command field, and the entire command field is passed to the dialog. But unlike function keys, information in the command field is not concatenated with the contents of the attention field. They should not be used on data entry panels, because any information that is typed in an input field, including command fields, is lost when the attention occurs.

Attention fields can be used on a menu to simulate option selection. The panel designer must truncate any unwanted characters resulting from an attention entry into the command field. Here is an example:

Figure 1. Use of Light Pen Attribute
)ATTR
  $ TYPE(TEXT) ATTN(ON)
)BODY
%------------------------------- SOME MENU -------------------------------
%SELECT OPTION ===>_ZCMD                                                 + 
%
$   1 - BROWSE   +DISPLAY SOURCE DATA OR LISTINGS
$   2 - QUERY    +FIND OUT INFORMATION ABOUT SOMETHING

⋮

)PROC
 &ZCMD = TRUNC (&ZCMD, ' ')
 &ZSEL = TRANS (TRUNC (&ZCMD, '.')
                 1, 'PGM(ISPBRO)'
                 2, 'PANEL(XYZ)'

                 ⋮

In the example, a light pen or cursor-selection of the first option would place the character string 1 - BROWSE in the ZCMD field and simulate the Enter key. In the )PROC section, the contents of the ZCMD field are truncated at the first blank before the ZSEL variable is set, based on a translation of the ZCMD field.

Panels that are included with the ISPF product do not contain the ATTN(ON) keyword in the attribute section. If light pen or cursor selection is used, it is the user's responsibility to add the ATTN(ON) keyword to the attribute section of the desired panel. See the z/OS ISPF Dialog Developer's Guide and Reference for complete descriptions of the various panel sections.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014