Contents
One of remarkable features of MI Portal is its support for MI pointers. This allows Java programs (running either locally on an IBM i server or on an remote PC) and other client programs to fully capitalize IBM i MI instructions. Currently MI pointers requested by client programs are cached in an internal index object created by MI Portal for each server job started by the Remote Command and Distributed Program Call server. Therefore, client cannot use a cached MI pointer accross different connections to the remote-command server.
For a client of MI Portal, using an MI pointer is quite straightforward (please refer to Enqueue a User Queue (USRQ) from Java using the RSLVSP and ENQ instructions for example). Typical scenarios of clients utilizing MI pointers via MI Portal are the following:
- Providing a 16-byte data item to receive the pointer ID returned by MI Portal for an output pointer operand of the target MI instruction
- Passing a returned 16-byte pointer ID to represent a pointer operand when a pointer operand is needed to invoke an MI instruction
MI instructions related with general operations of all types of MI pointers supported by MI Portal are:
- Compare Pointer Type (CMPPTRT)
MI instructions related with general operations of system pointers supported by MI Portal are:
- RSLVSP2. Locates an MI object by symbolic ID (MI object type/subtype, object name, and optionally required authorty) and returns a system pointer containing the addressibility and authority to it. Unlike RSLVSP4, RSLVSP2 searches for the target MI object by the name resolution list (NRL, aka. library list) of the current MI process instead of a specific context object.
- RSLVSP4. Resolves a system pointer to an MI object in a specific context.
- SETSPFP. Returns a system pointer to the system object addressed by the supplied pointer.
Support for space pointers provided by MI Portal are the following:
- Support space addressing. MI Portal supports space addressing MI instructions including:
- Add Space Pointer (ADDSPP)
- Subtract Space Pointer (SUBSPP)
- Subtract Space Pointers For Offset (SUBSPPFO)
- Store Space Pointer Offset (STSPPO)
- Set Space Pointer Offset (SETSPPO)
- The Set Space Pointer for Pointer (SETSPPFP) MI instruction. The SETSPPFP instruction is useful to retrieve the addressibility of the associated space of the MI object pointed to by a source system pointer. Additionally, it can also be used to dulicate the addressiblity attribute stored in a source space pointer or data pointer.
Please refer to MI Instructions supported by MI Portal and Space Addressing for more details.