DCL VAR(&PRTFNAM) TYPE(ᑍCHAR) LEN(2) +
VALUE('QSYSPRT ᑍLIBL ')
DCL VAR(&PRTSTRPAG) TYPE(ᑍCHAR) LEN(4) +
VALUE(X'1')
DCL VAR(&PGMPUBAUT) TYPE(ᑍCHAR) LEN(1) +
VALUE('ᑍALL ')
DCL VAR(&PGMOPTS) TYPE(ᑍCHAR) LEN(22) +
VALUE('ᑍLIST ᑍREPLACE ')
DCL VAR(&NUMOPTS) TYPE(ᑍCHAR) LEN(4) +
VALUE(X'2')
CHGVAR VAR(%SST(&PGMNAM 1 1)) VALUE(&SRCMBR)
CALL PGM(QSYS/QPRCRTPG) PARM(&MIPGMSRC +
&MIPGMSRCSZ &PGMNAM &PGMTXT &PGMSRCF +
&PGMSRCM &PGMSRCCHG &PRTFNAM &PRTSTRPAG +
&PGMPUBAUT &PGMOPTS &NUMOPTS)
ENDPGM
Source for the MICRTPG Program
The source for MICRTPG follows:
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ ᑍ/
/ᑍ Program Name: MICRTPG ᑍ/
/ᑍ ᑍ/
/ᑍ Programming Language: MI ᑍ/
/ᑍ ᑍ/
/ᑍ Description: Initial version of MI program to create ᑍ/
/ᑍ additional MI programs using the QPRCRTPG API. ᑍ/
/ᑍ ᑍ/
/ᑍ ᑍ/
/ᑍ Header Files Included: None ᑍ/
/ᑍ ᑍ/
/ᑍ ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
ENTRY ᑍ (PARM_LIST) EXT;
DCL SPCPTR MBR@ PARM;
DCL SPCPTR BINOFFSET@ PARM;
DCL OL PARM_LIST (MBR@, BINOFFSET@) PARM EXT;
DCL DD MBR CHAR(1) BAS(MBR@);
DCL DD BINOFFSET BIN(4) BAS(BINOFFSET@);
DCL DD RSLVOBJ CHAR(34);
DCL DD RSLVTYPE CHAR(1) DEF(RSLVOBJ) POS(1) INIT(X'19');
DCL DD RSLVSUBTYPE CHAR(1) DEF(RSLVOBJ) POS(2) INIT(X'34');
DCL DD RSLVNAME CHAR(3) DEF(RSLVOBJ) POS(3);
DCL DD RSLVAUTH CHAR(2) DEF(RSLVOBJ) POS(33) INIT(X'');
DCL SYSPTR USRSPCOBJ;
DCL SPCPTR USRSPC;
DCL SYSPTR CL5 INIT("CL5", TYPE(PGM));
DCL OL CL5OL (MBR@, USRSPC, BINOFFSET@) ARG;
CPYBLAP RSLVNAME, MBR, ' ';
RSLVSP USRSPCOBJ, RSLVOBJ, ᑍ, ᑍ;
SETSPPFP USRSPC, USRSPCOBJ;
CALLX CL5, CL5OL, ᑍ;
RTX ᑍ;
PEND;
Chapter 7. Machine Interface Programming 7-15