B E14ð1;
SAME: CPYBWP USRSPC@, EXC_OBJ@;
CPYBLA ACTION, X'ð1ðð';
E14ð1: CPYBWP INV_PTR2, INV_PTR;
RTNEXCP RTNTMPLT@;
PEND;
MI Common Programming Techniques—Examples
With the completion of the MICRTPG2 program, the following example MI program
demonstrates some additional programming techniques:
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ \/
/\ Program Name: MISC1 \/
/\ \/
/\ Programming Language: MI \/
/\ \/
/\ Description: This program materializes the objects found \/
/\ within the QTEMP library (context). For each \/
/\ object found, a message is sent to the \/
/\ interactive user message queue showing the \/
/\ name of the object and the object's type and \/
/\ subtype. \/
/\ \/
/\ Several new MI instructions are used by this \/
/\ program: \/
/\ \/
/\ 1. Materialize Context (MATCTX) \/
/\ 2. Modify Automatic Storage (MODASA) \/
/\ 3. Divide (DIV) \/
/\ 4. Convert Hex to Character (CVTHC) \/
/\ 5. Override Program Attributes (OVRPGATR) \/
/\ \/
/\ \/
/\ Header Files Included: None \/
/\ \/
/\ \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ Entry point \/
ENTRY \ EXT;
/\ Declare layout of Process Communications Object (PCO) \/
/\ The PCO is a control area that is unique to each job on the \/
/\ system. Within the PCO, there are two data elements that can \/
/\ be used. The first is a space pointer to the system entry \/
/\ point table (SEPT), the second is the address of the QTEMP \/
/\ library. The use of any other data element in the PCO is NOT \/
/\ supported. \/
DCL DD PCO CHAR(8ð) BASPCO;
DCL SPCPTR SEPT@ DEF(PCO) POS( 1);
DCL SYSPTR QTEMP@ DEF(PCO) POS(65);
7-32 System API Programming V4R1