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


A typical cursor-positioning sequence

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



A typical application might use two maps, one to solicit a request from the end user, and a second one, displayed beneath or beside the first, to provide the response. It is assumed that both maps have had static cursor positions defined with ATTRIBUTE CURSOR commands, and have cursor adjuncts on their variable data fields.

The first map might be displayed using an MSDFLD call followed by an ASREAD, without any variable data being added - in other words, without an MSPUT call being executed:


     CALL MSPCRT(1,-1,-1,'MAPGRP1');      /* Create new mapped page. */
     CALL MSDFLD(1,-1,-1,'MAP1');         /* Put first map onto page.*/
     CALL ASREAD(1,TYPE,VALUE);

The cursor would be displayed in the static position defined by MAP1.

The ASREAD would be followed by an MSDFLD call to add the second map to the page. One or two write-type MSPUT calls might then be executed to add variable data to one or both maps:


     CALL MSDFLD(2,-1,-1,'MAP2');          /* Put MAP2 onto the page.*/
     CALL MSPUT(1,1,MAP1_ASLENGTH,MAP1_ADS); /* Write-type operation */
                                             /* for MAP1             */
     CALL MSPUT(2,1,MAP2_ASLENGTH,MAP2_ADS); /* Write-type operation */
                                             /* for MAP2             */
     CALL ASREAD(1,TYPE,VALUE);

Assuming that no cursor adjuncts had been set to 1 characters, the MSDFLD would cause the cursor to be displayed in the static position defined by the second map. A cursor adjunct character of 1 in the ADS for MAP1 would override the static positioning, and one in the ADS for MAP2 would override one in the ADS for MAP1.

If the MSPUT for the first map preceded the MSDFLD for the second, like this:


     CALL MSPUT(1,1,MAP1_ASLENGTH,MAP1_ADS); /* Write-type operation */
                                             /* for MAP1             */
     CALL MSDFLD(2,-1,-1,'MAP2');            /* Put MAP2 onto page   */
     CALL MSPUT(2,1,MAP2_ASLENGTH,MAP2_ADS); /* Write-type operation */
                                             /* for MAP2             */
     CALL ASREAD(1,TYPE,VALUE);

then the cursor would be replaced in the static position defined by the first map, assuming no cursor adjuncts had been set in either ADS.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012