GDDM V3R2 Base Application Programming Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Cursor adjunct

GDDM V3R2 Base Application Programming Reference
SC33-0868-02



The cursor adjunct is used to set the cursor in a field dynamically (thus overriding any static cursor setting specified in the map), and to show whether the cursor was left in a field on input.

Static setting of the cursor is specified in the Field Attribute Definition step of GDDM-IMD; for further information, see the GDDM Interactive Map Definition book.

To set the cursor in a field dynamically, the application program sets the associated cursor adjunct to 1. This causes the cursor to be placed in the field when the field is displayed. By default, the cursor is placed under the first character of the field. To position the cursor elsewhere, use the MSCPOS call to specify the position, just before issuing the MSPUT call. The position is a number between 0 and the length of the field, thus:

0
Means "under the attribute byte"
1
Means "under the first character"
2
Means "under the second character" and so on.

When the position specified is greater than the length of the field, GDDM places the cursor under the last character in the field.

GDDM places the cursor at the last dynamic setting it meets for a page. In the absence of any dynamic settings, GDDM places the cursor at the first static setting.


To determine the position of the cursor on input, the map must have been defined as a cursor-receiver map in the Map Characteristics step of map definition. If the map has been so defined, GDDM sets the cursor adjunct of the field in which the cursor lies to C'1' when the field has a cursor adjunct. The position of the cursor within the field can be found using the MSQPOS call after the MSGET call.

Note: The "cursor-receiver" map characteristic is provided so that applications that use cursor adjuncts only for output cursor control do not have to search for, and turn off, cursor adjuncts after an MSGET call. If the cursor adjuncts were left on, GDDM might misinterpret the application's intention when the application data area is next used in an MSPUT call.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012