ept54.rpgleinc declares index number for each entry in the System Entry Point Table (SEPT) of a V5R4M0 machine. The purpose of the ept54.rpgleinc to help ILE RPG programmers to improve their efficiency when invoking i5/OS APIs. Most APIs in form of program object have an particular entry in the SEPT (a system pointer to the program object). Calling such an API by name means one must first resolve a system pointer to it by name. Resolving a system pointer to an MI object residing in a crowded library such as QSYS is time-consuming comparing to using a resolved one. That's why the SEPT was designed. When an SEPT of a particurlar machine is initialized at the installation stage, system pointers to program objects in library QSYS in it remains unchanged even across IPLs. User programs or compiler generated programs take advantage of the SEPT to make faster API invocations.
ILE C/C++ programmers can utilize the SEPT conviniently by including ILE C header file <qliept.h>. An ILE C/C++ programmer can utilize a resolved system pointer stored in the SEPT when invoking an i5/OS API like the following:
# include <qliept.h> // ... // call the Clear Data Queue (QCLRDTAQ) API to clear a *DTAQ QCLRDTAQ("SOME_DTAQ ", "SOME_LIB ");
# include <qliept.h> // ... // save the system pointer obtained from the SEPT QCLRDTAQ_T *clrdtaq = QCLRDTAQ; // call the Clear Data Queue (QCLRDTAQ) API to clear one *DTAQ clrdtaq("SOME_DTAQ ", "SOME_LIB "); // call QCLRDTAQ to clear another *DTAQ clrdtaq("ANOTHER_Q ", "SOME_LIB ");
The introduction of ept54.rpgleinc enables ILE RPG programmers to utilize the SEPT to invoke an i5/OS API in combination with system built-in _CALLPGMV. For example, in the following test programs of ept54.rpgleinc, t065.rpgle one of the operational assistant APIs, QEZSNDMG is invoked via the resolved system pointer to it in the SEPT.
h dftactgrp(*no) /copy mih54 /copy ept54 d ept_ptr s * d septs s * dim(7001) d based(ept_ptr) d argv s * dim(1) /free // address the SEPT ept_ptr = sysept(); /if defined(*v5r4m0) // call Operational Assistant API Send Message (QEZSNDMG) callpgmv( septs(EPT_QEZSNDMG) : argv : 0); /endif *inlr = *on; /end-free
You can also download the lasted version of it by the following link and upload it to your system by FTP: http://i5toolkit.svn.sourceforge.net/viewvc/i5toolkit/rpg/ept54.rpgleinc . Or check it out from the svn repository like the following:
svn export https://i5toolkit.svn.sourceforge.net/svnroot/i5toolkit/rpg/ept54.rpgleinc