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


Input from multiple copies of a map

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



To get input data from a display having more than one copy of a map, you can reuse the map's ADS any number of times. For instance, if the operator were allowed to alter the data displayed by the program in Figure 87 in topic 15.5.3, the following code would reuse the ADS for FLOATER once per changed map:


     CALL ASREAD(ATTYPE,ATVAL,COUNT);

DECLARE ID(1) FIXED BINARY(31); DECLARE LENGTH(1) FIXED BINARY(31);

DO I=1 TO COUNT; CALL MSQMOD(1,ID,LENGTH);/*Get id & length of next changed map*/

CALL MSGET(ID(1),0,LENGTH(1),FLOATER);/*Retrieve amended order*/

/* . */ /* . */ /* Process amended order data in ADS */ /* . */

END;

Another way is to declare an array of ADSs, and read all the input data into the array before processing any of it:


     CALL ASREAD(ATTYPE,ATVAL,COUNT);

DECLARE 1 FLOATER_INPUT(2:41) /* Max. no. copies on screen */ %INCLUDE FLOATER; /* Assumed to be 40. */

DO MID=2 TO FMAPNUM+1; CALL MSGET(MID,0,FLOATER_ASLENGTH,FLOATER_INPUT(MID)); END;

The subscript of each ADS in the array FLOATER_INPUT is the same as the identifier of the floating map from which its data came.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012