IBM Version 4 Universal Remote User Manual


 
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));
/ᑍ Start of instruction stream ᑍ/
STPLLEN NUM_PARMS;
CMPNV(B) NUM_PARMS, 2 / EQ(PARM2);
CPYBLAP FILNAM, 'MISRC', ' ';
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 CL6, CL6OL, ᑍ;
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 ᑍ;
PEND;
Updated CL06 Program
Following is the updated CL06 program:
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ ᑍ/
/ᑍ Program Name: CL6 ᑍ/
/ᑍ ᑍ/
/ᑍ Programming Language: CL ᑍ/
/ᑍ ᑍ/
/ᑍ Description: Load a source physical file member into the ᑍ/
/ᑍ ᑍUSRSPC addressed by &BUFFER. ᑍ/
/ᑍ ᑍ/
/ᑍ ᑍ/
/ᑍ Header Files Included: None ᑍ/
/ᑍ ᑍ/
/ᑍ ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
PGM PARM(&BUFFER &OFFSET)
DCLF FILE(MISRC)
DCL VAR(&BUFFER) TYPE(ᑍCHAR) LEN(16)
DCL VAR(&OFFSET) TYPE(ᑍDEC) LEN(15 5)
LOOP: RCVF
7-26 System API Programming V4R1