DCL DD CLDLTCMD CHAR(12) INIT("DLTOVR MISRC");
12. Establish space pointers to the CL command parameters, and, because the
QCMDEXC API is being used, define the CL command string lengths as
parameters:
DCL SPCPTR CLOVRCMD@ INIT(CLOVRCMD);
DCL SPCPTR CLDLTCMD@ INIT(CLDLTCMD);
DCL DD CLOVRLNG PKD(15,5) INIT(P'65'); /\ Length of OVRDBF CL cmd \/
DCL SPCPTR CLOVRLNG@ INIT(CLOVRLNG);
DCL DD CLDLTLNG PKD(15,5) INIT(P'12'); /\ Length of DLTOVR CL cmd \/
DCL SPCPTR CLDLTLNG@ INIT(CLDLTLNG);
13. Define the operand list (OL) definitions for calling the QCMDEXC API under the
two different conditions:
DCL OL QCMDOVROL (CLOVRCMD@, CLOVRLNG@) ARG;
DCL OL QCMDDLTOL (CLDLTCMD@, CLDLTLNG@) ARG;
14. Because CALLX CL06 is called to load the space, declare its system pointer,
parameters, and OL:
DCL SYSPTR CLð6 INIT("CLð6", TYPE(PGM));
DCL DD OFFSET PKD(15,5);
DCL SPCPTR OFFSET@ INIT(OFFSET);
DCL OL CLð6OL (USRSPC, OFFSET@) ARG;
15. Declare the system pointer, parameters, and OL for the QPRCRTPG API:
DCL DD PGM CHAR(2ð);
DCL DD PGMNAM CHAR(1ð) DEF(PGM) POS(1);
DCL DD PGMLIBNAM CHAR(1ð) DEF(PGM) POS(11) INIT("\CURLIB ");
DCL SPCPTR PGM@ INIT(PGM);
DCL DD PGMTXT CHAR(5ð) INIT(" ");
DCL SPCPTR PGMTXT@ INIT(PGMTXT);
DCL DD PGMSRCF CHAR(2ð) INIT("\NONE");
DCL SPCPTR PGMSRCF@ INIT(PGMSRCF);
DCL DD PGMSRCM CHAR(1ð) INIT(" ");
DCL SPCPTR PGMSRCM@ INIT(PGMSRCM);
DCL DD PGMSRCCHG CHAR(13) INIT(" ");
DCL SPCPTR PGMSRCCHG@ INIT(PGMSRCCHG);
DCL DD PRTFNAM CHAR(2ð) INIT("QSYSPRT \LIBL ");
DCL SPCPTR PRTFNAM@ INIT(PRTFNAM);
DCL DD PRTSTRPAG BIN(4) INIT(1);
DCL SPCPTR PRTSTRPAG@ INIT(PRTSTRPAG);
DCL DD PGMPUBAUT CHAR(1ð) INIT("\ALL ");
DCL SPCPTR PGMPUBAUT@ INIT(PGMPUBAUT);
DCL DD PGMOPTS(16) CHAR(11) INIT((1)"\LIST", \(2)(1)"\REPLACE");
DCL SPCPTR PGMOPTS@ INIT(PGMOPTS);
DCL DD NUMOPTS BIN(4) INIT(2);
DCL SPCPTR NUMOPTS@ INIT(NUMOPTS);
DCL OL QPRCRTPGOL (USRSPC, BINOFFSET@, PGM@, PGMTXT@, PGMSRCF@,
PGMSRCM@, PGMSRCCHG@, PRTFNAM@, PRTSTRPAG@,
PGMPUBAUT@, PGMOPTS@, NUMOPTS@) ARG;
DCL SYSPTR QPRCRTPG INIT("QPRCRTPG", CTX("QSYS"), TYPE(PGM));
Chapter 7. Machine Interface Programming 7-21