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


Simple example using cursor adjuncts on output

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



For this example, CUSTNUM and INVOICE are both input fields. Cursor adjuncts have been defined for both. If an error is found in one of them, its cursor adjunct is set to 1 and that of the other is set to blank. A reject-type MSPUT call is then executed.



     DCL 1 CUSTNO,

10 MESSAGE_FIELD CHAR(78), 10 CUSTNUM_CURSOR CHAR(1), 10 CUSTNUM CHAR(5), 10 INVOICE_CURSOR CHAR(1), 10 INVOICE CHAR(4), CUSTNO_ASLENGTH FIXED BIN(31,0) STATIC INIT(89);

/* . */ /* . */

IF CUST_INVALID THEN DO; MESSAGE_FIELD = 'ERROR IN CUSTOMER NUMBER FIELD'; CUSTNUM_CURSOR = '1'; INVOICE_CURSOR = ' '; END;

IF INV_INVALID THEN DO; MESSAGE_FIELD = 'ERROR IN INVOICE NUMBER FIELD'; CUSTNUM_CURSOR = ' '; INVOICE_CURSOR = '1'; END;

CALL MSPUT(1,2,CUSTNO_ASLENGTH,CUSTNO);

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012