B PARM1;
PARM2: CPYBLA FILNAM, FIL;
PARM1: CPYBLA MBRNAM,MBR;
CMPBLA(B) READY, '1' / EQ(SKIP);
CPYBWP CONTEXT, QTEMP@;
CRTS USRSPC@, CRTSTMPLT@;
SETSPPFP USRSPC,USRSPC@;
CPYBLA READY, '1';
SKIP: CPYNV RECNUM, 1;
MORE: CALLX QCMDEXC, QCMDOVROL, ᑍ;
CPYNV OFFSET,1;
CALLX CL6, CL6OL, ᑍ;
SUBN(S) OFFSET, 1;
ADDN(S) BINOFFSET, OFFSET;
SETSPPO USRSPC, BINOFFSET;
ADDN(S) RECNUM, 2;
CALLX QCMDEXC, QCMDDLTOL, ᑍ;
CMPNV(B) OFFSET, 16 /EQ(MORE);
CPYBLA PGMNAM, MBR;
SETSPPO USRSPC, ;
CALLX QPRCRTPG, QPRCRTPGOL, ᑍ;
RTX ᑍ;
/ᑍ Entry point for internal exception handler ᑍ/
ENTRY M141 INT;
/ᑍ Exception description template for RETEXCPD ᑍ/
DCL DD EXCPDBUF CHAR(2) BDRY(16);
DCL DD BYTPRV BIN(4) DEF(EXCPDBUF) POS(1) INIT(2);
DCL DD BYTAVL BIN(4) DEF(EXCPDBUF) POS(5);
DCL DD EXCPID CHAR(2) DEF(EXCPDBUF) POS(9);
DCL DD CMPLEN BIN(2) DEF(EXCPDBUF) POS(11);
DCL DD CMPDTA CHAR(32) DEF(EXCPDBUF) POS(13);
DCL DD MSGKEY CHAR(4) DEF(EXCPDBUF) POS(45);
DCL DD EXCDTA CHAR(5) DEF(EXCPDBUF) POS(49);
DCL SYSPTR EXC_OBJ@ DEF(EXCDTA) POS(1);
DCL DD EXC_OBJ CHAR(32) DEF(EXCDTA) POS(17);
DCL PTR INV_PTR DEF(EXCPDBUF) POS(97);
DCL DD ᑍ CHAR(87) DCF(EXCPDBUF) POS(113);
DCL SPCPTR EXCPDBUF@ INIT(EXCPDBUF);
/ᑍ Template for RTNEXCP ᑍ/
DCL DD RTNTMPLT CHAR(19) BDRY(16);
DCL PTR INV_PTR2 DEF(RTNTMPLT) POS(1);
DCL DD ᑍ CHAR(1) DEF(RTNTMPLT) POS(17) INIT(X'');
DCL DD ACTION CHAR(2) DEF(RTNTMPLT) POS(18);
DCL SPCPTR RTNTMPLT@ INIT(RTNTMPLT);
/ᑍ Start of internal handler ᑍ/
RETEXCPD EXCPDBUF@, X'1';
CMPBLA(B) EXC_OBJ, OBJID / EQ(SAME);
MODEXCPD DUPERROR, X'2', X'1';
CPYBLA ACTION, X'';
Chapter 7. Machine Interface Programming 7-31