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


Example of an error exit routine, without using FSEXIT

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



Instead of declaring the error routine to be an external entry, you may choose to execute an FSQERR call to obtain the error record:


     CALL FSEXIT(EERROR,8);             /* Specify error exit.       */

/* . */ /* . */ /* . */ /* */ EERROR: PROC(DUMMY); /* Trap GDDM error. */ DCL DUMMY CHAR(*); /* Not used for internal routine*/ DCL DCODE FIXED BIN (31) EXTERNAL; /* Communicate with program. */ DCL 1 ERROR_RECORD, /* GDDM error record. */ 2 SEVERITY FIXED BIN (31), /* Severity (range 0-16). */

/* . */ /* . */ /* . */

2 CI2 CHAR(20); /* Character message insert 2*/

CALL FSQERR(160,ERROR_RECORD); /* Get error record structure*/ IF FUNCTION = 'DSOPEN' THEN /* DSOPEN for plotter has */ DCODE = 4; /* failed. */ ELSE IF FUNCTION = 'GSLOAD' THEN /* GSLOAD has failed. */ DCODE = 8; END EERROR;

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012