Sidebar

A Close Study of i5/OS Machine Interface (MI) Pointers

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Do you know all the kinds of pointers and understand what they do?

 

In i5/OS, machine interface (MI) pointers are used to represent many things:

  • Objects and the data within objects
  • Run-time primitives, such as program or procedure invocation
  • Suspend point and resume point in an invocation
  • Procedures of a module object
  • Locations within an OPM program or a procedure of an ILE module object that the control flow can be branched to
  • And so on

Like data types defined in a programming language different types of MI pointers are the primitive data types that we use to work with the MI instruction set.

 

For example, when using MI instruction Materialize System Object (MATSOBJ) to retrieve the attributes of an MI object, we should pass a system pointer addressing the MI object as the second operand and pass a space pointer addressing the receiver buffer allocated for the returned MI object attributes.

 

According to IBM's document "Machine Interface Architecture Introduction", the following types of MI pointers exist. This table is a brief overview. Details about each type follow after the table.

 

Types of MI Pointers 

MI Pointer Type

Description

System pointer

Identifies an MI object and always addresses the base segment of an MI object

Space pointer

Addresses bytes in a space object

Invocation pointer

Identifies a specific call stack entry in the call stack of a thread

Procedure pointer (16 byte)

Identifies a specific instance of an ILE procedure within the scope of an MI process

Procedure pointer (8 byte)

An 8-byte area that contains a process-local pointer that identifies an active instance of a procedure (not valid in a template for an OPM program, and valid in an ILE program template only when the program is to be created as teraspace-capable) *

Instruction pointer

Used in OPM programs to identify a specific instruction in the instruction stream of an OPM program by instruction number

Label pointer

Identifies a specific statement in an ILE procedure by statement ID

Suspend pointer

Identifies a suspend point or a resume point

Synchronization pointer

Generated by the system to identify the instance of one of two synchronization primitives: a pointer-based mutex or a POSIX semaphore

Open pointer

A 16-byte area that contains a pointer with an unspecified type (must be on a 16-byte boundary) **

 

*An 8-byte procedure pointer refers to an active procedure through teraspace. Since the teraspace address space is private to an MI process, a teraspace procedure pointer is referred to as a process-local procedure pointer. There are two types of teraspace pointers: 8-byte space pointers and 8-byte procedure pointers. Teraspace pointers are not discussed in this article.

 

**MI pointers are strong-typed; a non-typed pointer exists only from the programming language point of view. You can declare a pointer as non-typed, and once it becomes valid, it always has a definitive pointer type.

 

060210LiFigure1 

Figure 1: This is the common layout of 16-byte MI pointers.

 

There's a common layout of the different types of 16-byte MI pointers:

  • The first byte of the 16-byte MI pointer value, byte 0, stores the type of an MI pointer.
  • Bytes 1-7 store pointer type-specific information.
  • Bytes 8-15 store the virtual address portion of a system pointer, a space pointer, or a data pointer. Note that this address is a single-level storage address in the 64-bit virtual address space of i5/OS. This virtual address remains unchanged during the life of an MI object. An 8-byte virtual address is composed with a 5-byte segment identifier and a 3-byte segment offset for a big segment (a 16MB segment) or is composed with a 6-byte segment identifier and a 2-byte segment offset for a small segment (a 64KB segment).

 

To materialize the attribute of an MI pointer, use the MI instruction Materialize Pointer (MATPTR).

 

System Pointer

 

A system pointer identifies an MI object and always addresses the base segment of an MI object. A system pointer is the only way that an MI object can be referred to. Figure 1 shows the binary layout of a system pointer to program object QSYS/QDBPUT, which is extracted from the dump result of space object QSYS/QINSEPT.

 

Note: Space object QSYS/QINSEPT is also referred to as the System Entry Point Table (SEPT), where resolved system pointers to OPM APIs are stored. Since a space pointer to the SEPT is also available in the Process Communication Object (PCO) of each MI process (i5/OS job), to dump the content of the SEPT, you can use the CL command DMPSYSOBJ in either of following forms:

  • DMPSYSOBJ OBJ(QINSEPT) CONTEXT(QSYS)
  • DMPSYSOBJ OBJ(*PCS) OFFSET(0)

 

060210LiFigure2

Figure 2: This is the layout of SYSPTR to *PGM QSYS/QDBPUT. (Click image to enlarge.)

 

This is the binary format of the system pointer to QSYS/QDBPUT:

 

  • Byte 0—MI pointer type—For a system pointer, it is always hex 00.
  • Byte 1—For a program object, it is set to the value of the 'BRING SIZE' attribute in its program header.
  • Byte 2—Additional pointer authorities to those are set in byte 15.
  • Bytes 3-7—Not used.
  • Bytes 8-12 or 8-13—Segment identifier of an MI object's base segment. (See note below.)
  • Bytes 14—MI object type code. An MI object is addressed by its base segment identifier. The low-order two bytes of a system pointer are not used to store the segment offset value of the virtual address. Byte 14 of a system pointer stores the object type code of an MI object: for example, hex 02 for a program object, hex 0A for a queue object, hex 0E for an index object, etc. For a complete list of all valid MI object type codes, refer to IBM's documentation on MI instruction Resolve System Pointer (RSLVSP).
  • Byte 15—Pointer authorities set into a system pointer by system state programs or SLIC code. Nine types of authorities can be set into a system pointer (object control, object management, authorized pointer, space authority, retrieve, insert, delete, update, execute). Nine bits are needed to hold all the nine pointer authorities. Byte 2 of a system pointer holds pointer authorities together with byte 15.

 

Note: A system pointer always addresses the base segment (the first segment) of an MI object. The MI object header of an MI object is stored at the beginning of an MI object's base segment. The MI object header consists of the following two parts:

  • The segment header of the base segment of an MI object, which contains important attributes of the MI object and base segment itself, such as segment type, size of the base segment, object domain (system domain or user domain), virtual address of the base segment, virtual address of an MI object's associated space.
  • The Encapsulated Program Architecture (EPA) header, which contains attributes of an MI object, such as existence attribute; damage status of an MI object; name, type code, and subtype code of an MI object; attributes of an MI object's associated space (space attributes, space initial value, size of associated space); public authorities for the MI object; owner's authorities for the MI object; virtual address of owner's user profile object; virtual address of the MI object; and virtual address of the context object through which the MI object can be addressed.

 

For example, from the MI object header of data queue object Q1 shown in Figure 3, we can see that the object existence attribute of Q1 is permanent (ATT1 attribute in the EPA header is set to hex 80), object domain of Q1 is system domain (DOMAIN attribute in the segment header is set to hex 8000), the virtual address of the associated space of Q1 is 335F7912E5 000020 (SPACE attribute in the segment header), size of the base segment is 4096 bytes (SIZE attribute of the segment header, in 512 bytes), size of the associated space of Q1 is hex 0FE0 (SPSZ attribute in the EPA header), and so on.

 

060210LiFigure3

Figure 3: MI object headers reveal much information about data queue objects. (Click image to enlarge.)

Using System Pointers to Manipulate MI Objects

 

When an MI object's address is resolved by MI instruction RSLVSP or when an MI object is created successfully, a valid system pointer is returned. The returned system pointer can be used in further manipulation of the MI object addressing by the system pointer. There are primarily five categories of MI instructions that manipulate MI objects:

 

  • Instructions that create a specific type of MI object— Their names always start with "CRT," such as Create Space (CRTS) or Create Independent Index (CRTINX).
  • Instructions that destroy a specific type of MI object— Their names always start with "DES," such as Destroy Space (DESS) or Destroy Independent Index (DESINX).
  • Instructions that retrieve attributes of an MI object—Their names always start with "MAT." For example, Materialize Space Attributes (MATS) retrieves the space-object-specific attributes of a space object, while Materialize System Object (MATSOBJ) retrieves the common attributes of an MI object.
  • Instructions that modify the attributes of particular type of MI object—Their names always start with "MOD." For example, the Modify Space Attributes (MODS) instruction modifies the attributes of a space object.
  • Instructions that operate a particular type of MI object—For example, Enqueue (ENQ) enqueues a queue message to a queue object (with object type code hex 0A). Materialize Queue Messages (MATQMSG) retrieves one or more messages on a queue object. Insert Independent Index Entry (INSINXEN) inserts one or more index entries into an independent index object (with object type code 0E). Activate Program (ACTPG) creates an activation entry in one of the activation groups of an MI process (i5/OS job) for an OPM program and returns a space pointer to the static storage frame of the program if the OPM program uses static storage. (See also Appendix B below, "Example of Using MI Instruction Activate Program (ACTPG)").

 

An MI object can be created as either permanent or temporary. This is referred to as the existence attribute of an MI object. According to IBM's documentation on MI instruction Test Temporary Object (TESTTOBJ), a temporary object does not persist across IPLs and is automatically destroyed at system termination. Additionally, a temporary object is not owned by any user profile, and the addressability of a temporary object is not inserted into a context object when it is created.

 

A permanent MI object can be addressed through either a context object or the machine context. The following MI object types can be addressed only through the machine context:

 

  • User profile (with object type code hex 08)
  • Logical unit description (with object type code hex 10)
  • Network description (with object type code hex 11)
  • Controller description (with object type code hex 12)
  • Class of service description (with object type code hex 14)
  • Mode description (with object type code hex 15)
  • Network interface description (with object type code hex 16)
  • Connection list (with object type code hex 17)
  • Auxiliary server (with object type code hex 1D)

 

When a permanent MI object is created (addressed through a context object), the addressability of the object is inserted in the context object. When a permanent MI object is destroyed, its addressability is removed from the context object. The context attribute in an MI object's EPA header indicates the current context object through which the MI object can be addressed.

 

The creation or deletion of a permanent MI object also affects the user profile of the owner of the MI object. Each time an MI object's ownership is assigned to or revoked from a user profile, the Change Date/Time attribute of the user profile object changes correspondingly. MI instruction Materialize User Profile (MATUP) can be used to retrieve the number of MI objects owned by a specific user profile. A permanent MI object cannot be destroyed automatically and must be explicitly destroyed using an appropriate destroy instruction according to the object type of the MI object.

 

The materialize instructions are the only interface through which a user program above the MI layer can access the attributes of an existing MI object. For a particular type of MI objects, a materialize instruction is defined to retrieve attributes of that type of MI object. For example, Materialize Independent Index Attributes (MATINXAT) retrieves the attributes of an index object. Additionally, Materialize System Object (MATSOBJ) retrieves common attributes of an MI object, such as object state attributes (suspended status, damage status, existence attribute, and so on), object name, object size, creation/modification time, attributes of an MI object's associated space, etc.

 

The modify instructions are the only interface through which a user program above the MI layer can modify the attributes of an MI object. For a particular type of MI objects, a modify instruction is defined to modify attributes of that type of MI object. For example, Modify Independent Index (MODINX) modifies the attributes of an index object. Modify Space Attributes (MODS) modifies the attributes of a space object or the associated space of an MI object.

 

Example ILE RPG program T057 (below) manipulates an independent index object (object type code of an index object is hex 0E). Examples of the above-mentioned five categories of instructions that manipulate MI objects are covered in this program. They are:

 

  • Create Independent Index (CRTINX)
  • Destroy Independent Index (DESINX)
  • Find Independent Index Entry (FNDINXEN)
  • Insert Independent Index Entry (INSINXEN)
  • Materialize Independent Index Attributes (MATINXAT)
  • Modify Independent Index (MODINX)
  • Remove Independent Index Entry (RMVINXEN)

 

For ILE RPG prototypes of these MI instructions, please refer to Appendix A below, "ILE RPG Prototype of Independent Index Management Instructions."

 

Note: According to IBM's document on user index objects (with external object type *USRIDX) Using User Index APIs, a user index is an object that allows search functions for data in the index and automatically sorts data based on the value of the data. User indexes are permanent objects in the user domain or in the system domain. They have an object type of *USRIDX and a maximum size of 1 terabyte (1,099,511,627,776 bytes). They help streamline table searching, cross-referencing, and ordering of data. In general, if your table is longer than 1000 entries, an index performs faster than a user-sorted table. You can use user indexes to:

  • Provide search functions
  • Do faster insert operations than in a database file
  • Do faster retrieve operations than in a database file
  • Create an index by name, such as a telephone directory
  • Use order entry programs
  • Look up abbreviations in an index
  • Sort data automatically based on the hexadecimal value of a key

User index entries cannot contain a pointer. You can save and restore all the data in an index. You can also save and restore user indexes to another system.

 

Features mentioned in the IBM document are really those of all independent index objects. A user index is nothing but an index object that was created indirectly by the Create User Index (QUSCRTUI) API as a permanent index object with object type/subtype code hex 0E0A. The only interface to create an independent index at the MI level is instruction Create Independent Index (CRTINX). Additionally, when creating an index object with CRTINX, one important attribute bit in the index attribute byte of the creation template operand is the entry format attribute bit, which determines whether the created index object can contain only scalar data or both pointers and scalar data. When the entry format attribute bit is set to 1, entries of the created index object can contain pointers, such as system pointers or space pointers. This is an important feature of index objects when fast search functions for MI objects are needed. For example, the index object QSYS/QWCBT_JOB_INDEX (with object type/subtype code hex 0EA4) stores a snapshot of current jobs in the system. Each entry of QSYS/QWCBT_JOB_INDEX contains a job identifier and a space pointer containing the offset of the specific entry of that job in the Work Control Block Table (WCBT) space object QSYS/QWCBT01. (A WCBT entry in the WCBT space object contains the system pointers to the Process Control Space (PCS) object of a job, a job's job message queue object (QJOBMSGQ), a job's spool control block (QSPSCB), and so on.) Index object QSYS/QWCBT_JOB_INDEX is keyed by the job identifier field; therefore, the system can efficiently locate a specific job in the system by searching the QWCBT_JOB_INDEX index for the space pointer to a job's WCBT entry by job identifier.

 

The following ILE RPG code is extracted from t057.rpgle, which is provided by the open-source project i5/OS Programmer's Toolkit.

 

      /if defined(*crtbndrpg)

     h  dftactgrp(*no)

      /endif

      /copy mih52

     d tmpl            ds                  likeds(crtinx_tmpl_t)

     d                                     based(tmpl_ptr)

     d tmpl_ptr        s               *

     d tmpl_len        s             10i 0

     d inx             s               *

     d optlist         ds                  likeds(inx_option_list_t)

     d                                     based(opt_ptr)

     d len_off         ds                  likeds(

     d                                       inx_entry_length_offset_t)

     d                                     based(pos_ptr)

     d opt_ptr         s               *

     d pos_ptr         s               *

     d entry           s             32a

     d inx_attr        ds                  likeds(matinxat_tmpl_t)

     d                                     based(inx_attr_ptr)

     d inx_attr_ptr    s               *

     d mod_opt         ds                  likeds(modinx_tmpl_t)

      /free

           // allocate and initialize index description template (1)

           tmpl_len = %size(crtinx_tmpl_t);

           tmpl_ptr = %alloc(tmpl_len);

           propb(tmpl_ptr : x'00' : tmpl_len);

           tmpl.bytes_in = tmpl_len;

           tmpl.obj_type = x'0E01';     // object type/subtype

           tmpl.obj_name = 'NIHAO';     // index name

           tmpl.crt_opt  = x'00000000'; // creation option

               // bit 0 = 0, existence attribute = temporary

               // bit 1 = 0, space attribute = fixed-length

           tmpl.spc_size = x'000000';   // do NOT have associated space

           tmpl.init_spc_val = x'00';

           tmpl.perf_cls = x'01000000';

           tmpl.ext_offset = 0;

           tmpl.inx_attr = x'70';       // index attribute

               // bit 0 = 0, entry length attribute = fixed-length

               // bit 1 = 1, immediate update = yes

               // bit 2 = 1, key insertion = yes

               // bit 3 = 1, entry format = index entries can

               //     contains both pointers and scalar data

           tmpl.arg_len  = 32;          // entry length = 32

           tmpl.key_len  = 8;           // key length = 8

           // create index NIHAO

           crtinx(inx : tmpl_ptr);

           // insert a couple of entries into NIHAO (2)

           entry = 'OBJD0200'

                   + '00010002'

                   + 'abcdABCD'

                   + 'ooooPPPP';        // key = 'OBJD0200'

           opt_ptr = %alloc(10);

           optlist.rule_opt   = x'0002'; // insert with replacement

           optlist.arg_len    = 32;

           optlist.arg_offset = 0;

           optlist.occ_cnt    = 1;

           insinxen(inx : %addr(entry) : opt_ptr);

             // on successful insersion, OPTLIST.RTN_CNT is set to 1

           entry = 'OBJD0400'

                   + '00080002'

                   + 'xxxxYYYY'

                   + 'zzzzQQQQ';        // key = 'OBJD0400'

           insinxen(inx : %addr(entry) : opt_ptr);

           // try to find out the entry with key value 'OBJD0200' (3)

           opt_ptr = %realloc(opt_ptr : 14);

           optlist.rule_opt   = x'0001'; // look for an equal entry

           optlist.arg_len    = 8;

           optlist.arg_offset = 0;

           optlist.occ_cnt    = 1;

           entry = 'OBJD0200';     // specify key value

           fndinxen( %addr(entry)

                   : inx

                   : opt_ptr

                   : %addr(entry) );

           if optlist.rtn_cnt > 0;

               dsply 'index entry found' '' entry;

           endif;

           // remove entry '0BJD0200...' from index NIHAO (4)

           rmvinxen( %addr(entry)

                   : inx

                   : opt_ptr

                   : %addr(entry) );

           dealloc opt_ptr;

           // retrieve index attributes (5)

           tmpl_len = %size(matinxat_tmpl_t);

           inx_attr_ptr = %alloc(tmpl_len);

           inx_attr.bytes_in = tmpl_len;

           matinxat(inx_attr_ptr : inx);

             // INX_ATTR.ENTRIES_INSERTED = 2

             // INX_ATTR.ENTRIES_REMOVED = 1

             // INX_ATTR.FIND_OPERATIONS = 1

           // modify index NIHAO (6)

           mod_opt.mod_sel  = x'40'; // modify immediate update attribute

           mod_opt.new_attr = x'00'; // do not immediate update

           mod_opt.reserved = x'0000';

           modinx(inx : %addr(mod_opt));

           dealloc inx_attr_ptr;

           // destroy index NIHAO (7)

           desinx(inx);

           dealloc tmpl_ptr;

           *inlr = *on;

      /end-free

 

Code Notes:

(1) Allocate and initialize index description template and then create the target index object with the initialized index description template using instruction CRTINX. In this example, a temporary index object named NIHAO is to be created with object type/subtype code hex 0E01, without an associated space, with fixed index entries. Length of index entries is 32 bytes, including the 8-byte key value portion.

(2) Insert a couple of entries into index object NIHAO using instruction INSINXEN with key values 'OBJD0200' and 'OBJD0400', respectively.

(3) Search index object NIHAO using instruction FNDINXEN for an entry whose key value is equal to 'OBJD0200'.

(4) Remove index entry whose key value is equal to 'OBJD0200' from index object NIHAO using instruction RMVINXEN.

(5) Materialize index attributes of NIHAO using instruction MATINXAT. Note that after the above operations on index object NIHAO, the materialized operation statistics attributes should be Entries inserted = 2, Entries removed = 1, and Number of find operations = 1.

(6) Modify index object NIHAO's "immediate update" attribute to "No immediate update".

(7) Destroy index object NIHAO using instruction DESINX.

 

Space Pointers

 

A space pointer addresses bytes within a space object. It is the pointer type used in both MI and high-level languages (HLL) to address program storage, such as stack, static, and heap storage. There are two types of space pointers:

  • Space pointers, aka space pointer data objects—Space pointer data objects are used heavily to represent data objects in HLLs, such as void * or char * in C, or * in ILE RPG.
  • Machine space pointers (MSPPTR), aka space pointer machine objects—There's no way for ILE HLL programs to utilize a MSPPTR. In MI programs, a MSPPTR can be used in most cases where a space pointer data object is allowed, with the following limits:
  • a MSPPTR cannot be passed as a parameter, be part of a structure (SPC), be based on a pointer, or be duplicated by MI instructions such as Copy Bytes with Pointers (CPYBWP). Also, a MSPPTR is logically only automatic (AUTO) in storage scope.

 

Different HLLs provide different space addressing support via space pointers. Space addressing support via space pointers in ILE RPG is discussed in the article "Use the MI to Work with Pointers in ILE RPG."

 

By using MI instruction Set Space Pointer from Pointer (SETSPPFP), you can address the associated space of an MI object. This instruction is especially useful when utilizing storage provided by space objects. The following example program T059 translates EBCDIC characters into ASCII characters by using the EBCDIC-to-ASCII translation table stored in space object ASCII. Space object ASCII contains the same content as table object QSYS/QASCII. A table object, with external object type *TBL, is a space object whose object type/subtype code is hex 1906. Table objects can be used to translate data or to specify an alternate collating sequence. The following is the source code of ILE RPG program T059, t059.rpgle. ILE RPG prototypes of MI instruction Resolve System Pointer (RSLVSP), Set Space Pointer from Pointer (SETSPPFP), and Translate Bytes (XLATEB) can be found in mih52.rpgleinc.

 

     h dftactgrp(*no) bnddir('QC2LE')

      /copy mih52

     d cvthc           pr                  extproc('cvthc')

     d     receiver                    *   value

     d     source                      *   value

     d     length                    10i 0 value

     d str             s              3a   inz('abc')

     d hexstr          s             16a

     /* system pointer to space object ASCII */

     d                 ds

     d   ascii_tbl                     *

     d   funny_ptr                     *   overlay(ascii_tbl:1)

     d                                     procptr

     d table_ptr       s               *

      /free

           // resolve table object (hex 1906) ASCII (1)

           rslvsp_tmpl.obj_type = x'1906';

           rslvsp_tmpl.obj_name = 'ASCII';

           rslvsp2(ascii_tbl : rslvsp_tmpl);

           // access data content stored in ASCII (2)

           table_ptr = setsppfp(funny_ptr);

           // before translation

           cvthc(%addr(hexstr) : %addr(str) : 6);

           dsply 'EBCDIC' '' hexstr;

           xlateb(%addr(str) : table_ptr : 3); // (3)

           // after translation

           cvthc(%addr(hexstr) : %addr(str) : 6);

           dsply 'ASCII' '' hexstr;

           *inlr = *on;

      /end-free

 

Code Notes:

(1) Resolve space object ASCII.

(2) Address the associated space of space object ASCII by using instruction SETSPPFP. The ILE RPG prototype of instruction SETSPPFP can be found in mih52.rpgleinc.

(3) Translate EBCDIC characters to ASCII characters according to the translation table stored in ASCII.

 

Call program T059, and you will get the following result:

 

DSPLY  EBCDIC    818283

*N                    

DSPLY  ASCII    616263

 

Data Pointers

 

Data pointers are a special form of space pointer. In addition to storing the virtual address of a data object, a DTAPTR also stores data attributes (scalar data type and length) in its reserved bytes of its high-order 8 bytes. The following figure is the binary layout of the high-order 8-byte value of a data pointer representing a packed decimal (6, 2) scalar data object.

 

060210LiFigure4

Figure 4: DTAPTR stores data attributes.

 

This is the binary layout of a data pointer:

 

Bits 0-3 of byte 0 are always set to hex C for a data pointer.

 

Bits 4-7 of byte 0 are scalar type represented by a data pointer:

  • Hex 00, signed binary
  • Hex 01, floating point
  • Hex 02, zoned decimal
  • Hex 03, packed decimal
  • Hex 04, character
  • Hex 06, ONLYNS
  • Hex 07, ONLYS
  • Hex 08, EITHER
  • Hex 09, OPEN
  • Hex 0A, unsigned binary

 

Bytes 4-5 are scalar length:

  • If zoned decimal or packed decimal, byte 4 stores the number of fractional digits; byte 5 stores total number of digits.
  • If binary, bytes 4-5 store a 2-byte binary of value 2, 4, or 8.
  • If float, bytes 4-5 store a 2-byte binary of value 4 or 8.
  • If character, bytes 4-5 store a 2-byte binary-length value in bytes.
  • If ONLYNS, bytes 4-5 store a 2-byte binary-length value in number of double-byte characters.
  • If ONLYS, bytes 4-5 store an even 2-byte binary-length value in bytes, including any SO and SI.
  • If EITHER or OPEN, bytes 4-5 store a 2-byte binary-length value in bytes, including any SO and SI.

Note: Four data types are supported for data pointer definition of extended (double-byte) character fields: ONLYNS, ONLYS, EITHER, and OPEN. Except for ONLYNS, the double-byte character data must be surrounded by a shift out control character (SO = hex 0E) and a shift in control character (SI = hex 0F). The ONLYNS field only contains double-byte data, with no SO or SI delimiters surrounding it. The ONLYS field only contains double-byte character data within an SO/SI pair. The EITHER field can consist of double-byte character or single-byte character data but only one type at a time. If double-byte character data is present, it must be surrounded by an SO/SI pair. The OPEN field can consist of a mixture of double-byte character and single-byte character data. If double-byte character data is present, it must be surrounded by an SO/SI pair.

 

One cannot change the offset in a data pointer directly. To change the offset of a data pointer, you must first convert it into a SPCPTR by MI instruction SETSPPFP. To set the modified virtual address back to a data pointer, you should use Set Data Pointer Addressability (SETDPADR).

 

Data pointers can be used to manipulate indeterminate scalar data objects in OPM programs. For example, Copy Bytes Left-Adjusted (CPYBLA) accepts either data pointer operands or scalar operands. By modifying the attribute of a data pointer operand using Set Data Pointer Attributes (SETDPAT), you might determine the number of bytes really copied by instruction CPYBLA at run time. In contrast, in OPM programs, data pointers are far less often used in ILE HLL programs. Below is an example of using data pointers as operands to instruction Copy Extended Characters Left-Adjusted with Pad (CPYECLAP). This instruction copies data between extended (double-byte) character fields with padding or truncation. CPYECLAP accepts two data pointer operands as the receiver and source operand, respectively, and a padding operand that indicates the single-byte padding character and the double-byte padding character. The following is the prototype of instruction CPYECLAP extracted from mih52.rpgleinc.

 

     d cpyeclap_pad_t  ds                  qualified

     d     single_byte_pad_value...

     d                                1a

     d     double_byte_pad_value...

     d                                2a

     /* CPYECLAP, copy extended characters left-adjusted with pad */

     d cpyeclap        pr                  extproc('_CPYECLAP')

     d     receiver                    *

     d     source                      *

     d     pad                             likeds(cpyeclap_pad_t)

 

The following ILE RPG example program t060.rpgle demonstrates the difference between copying an OPEN character field with truncation using ILE RPG operation code EVAL and using instruction CPYECLAP.

 

      /if defined(*crtbndrpg)

     h dftactgrp(*no)

      /endif

      /copy mih52

     d pad             ds                  likeds(cpyeclap_pad_t)

     d reply           ds

     d   answer                       4a

     d   next_fld                     8a   inz('(yes/no)')

     d rcv_ptr         s               *

     /* DBCS string: 'OK' (yes/no) */

     d yes             s              6a   inz(x'0E574C59E10F')

     d src_ptr         s               *

      * scalar type: Open; length: 4 (1)

     d rcv_attr        s              7a   inz(x'09000400000000')

      * scalar type: Open; length: 6 (2)

     d src_attr        s              7a   inz(x'09000600000000')

      /free

           // set var ANSWER with op code eval (3)

           answer = yes;

           dsply 'EVAL' '' reply;

             // answer = x'0E574C59'

           // set scalar attributes into data pointers(4)

           rcv_ptr = setdp(%addr(answer) : rcv_attr);

           src_ptr = setdp(%addr(yes) : src_attr);

           pad = x'404040';

           // copy YES to ANSWER with truncation using CPYECLAP (5)

           cpyeclap( rcv_ptr : src_ptr : pad);

             // answer = x'0E574C0F'

           dsply 'answer' '' reply;

           *inlr = *on;

      /end-free

 

Code Notes:

(1) Scalar attributes of the receiver field are represented by data pointer rcv_ptr. Scalar attributes of the source field are represented by data pointer src_ptr.

(2) Copy OPEN field yes to OPEN field answer using ILE RPG operation code EVAL directly. Since the copy operation is unaware of the character attribute of the receiver field, the SI character is truncated by EVAL, and the resulting data content in field answer becomes invalid.

(3) Set scalar attributes into data pointers using Set Data Pointer (SETDP).

(4) Copy OPEN field yes to OPEN field answer with truncation using CPYECLAP. The last double-byte character (OK) is truncated and an SI character is appended properly to indicate the end of the double-bytes string in field answer.

 

Run ILE RPG program T060, and you'll get this result.

 

DSPLY  EVAL      OK

*N                          

DSPLY  CPYECLAP  OK (yes/no)

 

 

Invocation Pointers

 

An invocation pointer identifies a specific call stack entry in the call stack of a thread. Invocation pointers are primarily used in exception management MI instructions, such as Return from Exception (RTNEXCP), and message-handling APIs, such as the Promote Message (QMHPRMM) API. An example of using invocation pointers and label pointers to perform a non-local goto is available in section "Label Pointers."

 

Procedure Pointers

 

A procedure pointer identifies a specific instance of an ILE procedure within the scope of an MI process. Attributes of a procedure pointer include the following:

  • Containing program—A system pointer to the ILE program object (of type either *PGM or *SRVPGM) that contains the procedure
  • Containing process—A system pointer to the process control space object that contains the procedure's activation group
  • An activation group mark of the activation group that contains the activated procedureAn activation mark of the activation of the ILE program that contains the activated procedure
  • Module number—Index in the module list of the ILE program for the module whose activation the pointer addresses
  • Procedure number—Index in the procedure list of the module for the procedure addressed by the pointer

 

After a procedure pointer is returned by an HLL operation loading the address of a procedure (such as invoking BIF %paddr and passing a prototype name in ILE RPG) or returned by MI instruction Materialize Activation Export (MATACTEX), procedure pointer calls can be made via the returned procedure pointer.

 

Here is an example of making procedure pointer calls via procedure pointers materialized by MATACTEX from a service program object. The following is the source code of ILE RPG program t061.rpgle. ILE RPG prototypes of instruction RSLVSP, ACTBPGM, and MATACTEX can be found in mih52.rpgleinc.

 

     h dftactgrp(*no)

      /copy mih52

     d dfn             ds                  likeds(actbpgm_dfn_t)

     d mar14a          s               *

     d haha_ptr        s               *   procptr

     /* procedure exported by *srvpgm MAR14A (1) */

     d haha            pr                  extproc(haha_ptr)

     d   msg                          8a

     d rtn             s             10u 0

     d msg             s              8a   inz('Huh')

      /free

           // resolve *srvpgm mar14a (2)

           rslvsp_tmpl.obj_type = x'0203';

           rslvsp_tmpl.obj_name = 'MAR14A';

           rslvsp2(mar14a : rslvsp_tmpl);

           // activate *srvpgm (3)

           actbpgm(dfn : mar14a);

           // materialize procedure haha exported by *srvpgm mar14a (4)

           matactex( dfn.act_mark   // activation mark

                   : 1              // by export ID

                   : 1              // export ID

                   : *null          // name operand, not used

                   : haha_ptr       // returned procedure pointer

                   : rtn );

           if rtn = 1;

               // invoke procedure haha (5)

               haha(msg);

           endif;

           *inlr = *on;

      /end-free

 

Code Notes:

(1) The prototype of procedure haha is exported by service program MAR14A. Here, procedure haha is declared based on procedure haha_ptr.

(2) Resolve the system pointer mar14a to service program MAR14A.

(3) Activate MAR14A by using MI instruction Activate Bound Program (ACTBPGM).

(4) Materialize procedure pointer to procedure haha using MI instruction MATACTEX.

(5) Call procedure haha via the returned procedure pointer.

 

Instruction Pointers

 

An instruction pointer identifies a specific instruction in the instruction stream of an OPM program by instruction number. An instruction pointer is one of the possible branch targets of OPM MI instruction Branch (B). The other valid branch targets of instruction B are an instruction number, a relative instruction number, a branch point (a label), or an element of an instruction definition list (an IDL is an array of labels).

 

The benefit of an instruction pointer is that, among all the possible branch targets, an instruction pointer is the only variable one. You can use Set Instruction Pointer (SETIP) to set or change the value of an instruction pointer at run time.

 

Also, an instruction pointer is used as the return-target operand of the OPM MI instruction Call Internal (CALLI). The CALLI instruction sets the instruction pointer operand to point to the instruction immediately following the CALLI instruction. Later, a Branch (B) instruction can be issued on this instruction pointer in the called sub-invocation to cause the control to be passed back to the instruction immediately following the CALLI instruction.

 

Label Pointers

 

A label pointer is somewhat the counterpart of an instruction pointer in ILE programs. A label pointer identifies a specific statement in an ILE procedure by statement ID. (A statement ID is a compiler-provided 4-byte unsigned binary value.) A label pointer has the following attributes:

 

  • Containing program—System pointer to the program object that contains the label pointer
  • Module number—Index in the module list of the bound program for the module containing the label pointer
  • Procedure number—Index in the procedure list of the module for the procedure containing the label pointer
  • Internal identifier—A machine-dependent value that identifies the label relative to the internal structure of the program (for use by service personnel)
  • Statement ID—Each statement ID is a compiler-supplied unsigned bin(4) number that allows the compiler to identify the source statement associated with a particular sequence of instructions

 

To generate a label pointer to the current statement in an ILE procedure, you might use system built-in __setjmp or __setjmp2. __setjmp2 generates a label pointer to the current statement in an ILE procedure, while __setjmp additionally generates an invocation pointer to the current ILE procedure. The invocation pointer and label pointer saved by __setjmp can be used later by invoking ILE C function longjmp in another procedure to restore the saved stack environment and return control to the point identified by the saved invocation pointer and label pointer. The values of all variables (except register variables) available to the procedure receiving control contain the values they had when the longjmp function was called. Prototypes of system built-in __setjmp and __setjmp2 are extracted from mih52.rpgleinc.

 

     d jmp_buf_t       ds                  qualified

     d     inv_ptr                     *            

     d     lbl_ptr                     *            

     d     num                       10i 0          

     /* __setjmp */

     d setjmp          pr            10i 0 extproc('__setjmp')

     d     jmpbuf                          likeds(jmp_buf_t)

     /* __setjmp2 */

     d setjmp2         pr                  extproc('__setjmp2')

     d     lbl_ptr                     *

 

The following is an example ILE RPG program, t063.rpgle, that demonstrates the usage of system built-in __setjmp and ILE C function longjmp.

 

     h dftactgrp(*no) bnddir('QC2LE')

      /copy mih52

     d pos             ds                  likeds(jmp_buf_t)

     d rtn             s             10i 0

     /* prototype of ILE C procedure longjmp */

     d longjmp         pr                  extproc('longjmp')

     d   jmp_buf                           likeds(jmp_buf_t)

     d   val                         10i 0 value

     d err_ind         s               n   inz(*off)

     d i_always_fail   pr

      /free

           // save current stack environment (1)

           if setjmp(pos) <> 0;

               // longjmp() has been invoked

               // to resume from error condition

               err_ind = *on;

           else;

               // invoke procedure i_always_fail()

               i_always_fail();

           endif;

           if err_ind;

               // error occurs

           endif;

           *inlr = *on;

      /end-free

     /* procedure i_always_fail */

     p i_always_fail   b

     d                 pi

      /free

           // assume that unrecoverable error occurs here

           // call longjmp to recover stack environment before

           // procedure i_always_fail was invoked. (2)

           longjmp(pos : -1);

      /end-free

     p i_always_fail   e

 

Code Notes:

(1) Save the current invocation entry and statement ID into the invocation pointer and label pointer in structure pos of type jump_buf_t. __setjmp returns 0 after saving the invocation pointer and label pointer. If __setjmp returns as a result of a call to longjmp(), it returns the second argument to longjmp() or 1 if the second argument passed to longjmp() is 0.

(2) Call longjmp() to restore the stack environment.

 

Note that some MI instructions, but not all, can be invoked from ILE HLL programs. In IBM's documentation of HLLs, these MI instructions are referred to as "system built-ins." To distinguish between these MI instructions and those of common HLL procedures, ILE HLLs add an underscore (_) before their MI instruction names, conventionally. For example, the system built-in name of MI instruction FNVINXEN is "_FNDINXEN". Some system built-ins can be used only in ILE HLL programs. For example, __setjmp and __setjmp2.

 

Suspend Pointers

 

A suspend pointer identifies a suspend point or a resume point. It is a location within an invocation's routine where execution was suspended due to a call, an interrupt, or a machine operation. A resume pointer is a location within an invocation's routine where execution will resume if execution is allowed to resume in the invocation. A suspend pointer has the following attributes:

 

  • Containing program—A system pointer to the program object that contains the suspend point or resume point
  • Module number—Index in the module list of the bound program for the module containing the suspend point or resume point
  • Procedure number—Index in the procedure list of the module for the procedure containing the suspend point or resume point
  • Number of statement IDs—Number of entries in the statement ID list (multiple statement IDs may be associated with a single location in the created program due to optimizations that combine similar code sequences)
  • Statement ID—A compiler-supplied, 4-byte unsigned binary number that allows the compiler to identify the source statement associated with a particular sequence of MI instructions
  • Internal identifier—A machine-dependent value that locates the suspend point or resume point relative to the internal structure of the program (for use by service personnel)

 

MI instruction Materialize Invocation Attributes (MATINVAT) can be used to materialize the suspend point and resume point of a particular invocation.

 

Synchronization Pointers

 

A synchronization pointer is utilized by pointer-based mutexes that can be manipulated through mutex management MI instructions and POSIX semaphores implemented by i5/OS. When a named or unnamed pointer-based mutex or a POSIX semaphore is created, a synchronization pointer is generated by the system to identify the instance of one of the two synchronization primitives. For example, when a pointer-based mutex is created by using Create Pointer-Based Mutex (CRTMTX), a synchronization pointer is created based on CRTMTX's first space pointer operand. By using MI instruction MATPTR, you can tell which type of synchronization primitive is represented by a synchronization pointer: a pointer-based mutex or a POSIX semaphore.

Summary

As an OS-level virtual machine interface, the design of the MI layer originated from S/38, the direct ancestor of i5/OS. It is a creative and alive design that not only decouples application programs and hardware architectures, but also hides the implementation details of system objects behind a set of relatively stable interfaces. There's no doubt that it is a design ahead of the times. If you decided to learn more about this charming design, understanding the MI pointers may be a good start point.

Appendixes

 

Appendix A: ILE RPG Prototype of Independent Index Management Instructions

 

The following ILE RPG prototypes of independent index management instructions are extracted from mih52.rpgleinc; ILE RPG header for MI instructions (system built-ins) are provided by the open source project i5/OS Programmer's Toolkit.

 

     /* template of CRTINX */

     d crtinx_tmpl_t   ds                  qualified

     d                                     based(dummy_ptr)

     d     bytes_in                  10i 0

     d     bytes_out                 10i 0

     d     obj_type                   2a

     d     obj_name                  30a

      * creation option

     d     crt_opt                    4a

      * recovery option

     d     rcvy_opt                   4a

     d     spc_size                  10i 0

     d     init_spc_val...

     d                                1a

      * performance class

     d     perf_cls                   4a

     d                                3a

      * extension offset

     d     ext_offset                10i 0

     d     ctx                         *

     d     acc_grp                     *

     d     inx_attr                   1a

      * argument length

     d     arg_len                    5i 0

      * key length

     d     key_len                    5i 0

      * longer template

     d                               12a

      * template version, must be hex 00

     d     tmpl_ver                   1a

      * index format,

      *   0=maximum object size of 4G bytes

      *   1=maximum object size of 1T bytes

     d     inx_fmt                    1a

     d                               61a

      * template extension of CRTINX

     d crtinx_tmpl_ext_t...

     d                 ds                  qualified

     d                                     based(dummy_ptr)

     d     usrprf                      *

     d                                4a

      * domain assigned to created object

      *   hex 0000=the domain will be choosed by the machine

      *   hex 0001=user domain

     d     obj_domain                 2a

     d                               42a

     /* template of MATINXAT */

     d matinxat_tmpl_t...

     d                 ds                  qualified

     d                                     based(dummy_ptr)

     d     bytes_in                  10i 0

     d     bytes_out                 10i 0

     d     obj_type                   2a

     d     obj_name                  30a

      * creation option

     d     crt_opt                    4a

      * recovery option

     d     rcvy_opt                   4a

     d     spc_size                  10i 0

     d     init_spc_val...

     d                                1a

      * performance class

     d     perf_cls                   4a

     d                                3a

      * extension offset

     d     ext_offset                10i 0

     d     ctx                         *

     d     acc_grp                     *

     d     inx_attr                   1a

      * argument length

     d     arg_len                    5i 0

      * key length

     d     key_len                    5i 0

      * index statistics

     d     entries_inserted...

     d                               10u 0

     d     entries_removed...

     d                               10u 0

     d     find_operations...

     d                               10u 0

     /* CRTINX, create independent index */

     d crtinx          pr                  extproc('_CRTINX')

     d     index                       *

     d     tmpl                        *   value

     d

     /* DESINX, destroy independent index */

     d desinx          pr                  extproc('_DESINX')

     d     index                       *

     /* MATINXAT, materialize independent index attributes */

     d matinxat        pr                  extproc('_MATINXAT')

     d     attr                        *   value

     d     index                       *

     /* option list structure used by INSINXEN and FNDINXEN */

     d inx_option_list_t...

     d                 ds                  qualified

     d                                     based(dummy_ptr)

     d     rule_opt                   2a

     d     arg_len                    5u 0

     d     arg_offset                 5i 0

     d     occ_cnt                    5i 0

     d     rtn_cnt                    5i 0

      * offset 10

      * returned index entries: entry length 5u0, offset 5i0

     d inx_entry_length_offset_t...

     d                 ds                  qualified

     d                                     based(dummy_ptr)

     d     length                     5u 0

     d     offset                     5i 0

     /* INSINXEN, insert independent index entry */

     d insinxen        pr                  extproc('_INSINXEN')

     d     index                       *

     d     argument                    *   value

     d     opt_list                    *   value

     /* FNDINXEN, find independent index entry */

     d fndinxen        pr                  extproc('_FNDINXEN')

     d     receiver                    *   value

     d     index                       *

     d     opt_list                    *   value

     d     argument                    *   value

     /* RMVINXEN, remove independent index entry */

     d rmvinxen        pr                  extproc('_RMVINXEN1')

     d     receiver                    *   value

     d     index                       *

     d     opt_list                    *   value

     d     argument                    *   value

     /* template of MODINX */

     d modinx_tmpl_t   ds                  qualified

      * bit 1, immediate update

      *   0=do not modify

      *   1=modify

      * bit 2, index coherency tracking

      *   0=do not modify

      *   1=modify

     d     mod_sel                    1a

      * bit 1, immediate update

      *   0=no immediate update

      *   1=immediate update

      * bit 2, index coherency tracking

      *   0=do not track index coherency

      *   1=track index coherency

     d     new_attr                   1a

     d     reserved                   2a

     /* MODINX, modify independent index */

     d modinx          pr                  extproc('_MODINX')

     d     index                       *

     d     opt                         *   value

 

 

Appendix B: Example of Using MI Instruction Activate Program (ACTPG)

 

Activate Program (ACTPG) creates an activation entry for the OPM program that is identified by a resolved system pointer, if it uses static storage. If the program specified is of any other type, an invalid operation for program (hex 2C15) exception is signaled. No operation is performed for a program that does not require static storage.

 

The following is the ILE RPG prototype extracted from mih52.rpgleinc.

 

     /* ACTPG, activate non-bound program */

     d actpg           pr                  extproc('_ACTPG')

     d     ssf                         *

     d     pgm                         *

 

If an activation entry is created or an activation entry already exists for the program within the target activation group, a space pointer to the static storage frame is returned. The static storage frame is allocated and initialized according to specifications within the program. The static storage frame is 16-byte aligned and begins with a 64-byte header. The header is not initialized and is not used by the machine. The header is provided for compatibility with prior machine implementations. If the program does not use static storage (hence, no activation entry is created), a copy of the program pointer in operand 2 is returned.

 

In the following examples, ILE RPG program T054 activates OPM program SPR1_A, which contains a static variable hello of type char(32) and with initial value "hello, hello, hello how are you?" Here's the code of the little MI program, SPR1_A.

 

DCL DD HELLO CHAR(32) INIT(

  "hello, hello, hello how are you?"

);

PEDN;

 

To compile the little MI program, you can either use MI compilers such as mic provided by the open-source project i5/OS Programmer's Toolkit or call the Create Program (QPRCRTPG) API directly. For example, to avoid storing the source lines to a source physical file member or a stream file, you might invoke mic from QShell and input the source code directly from the standard input.

 

> export OUTPUTDIR=SOMELIB # select a target library other than *CURLIB

  $

> mic -o spr1_a -q*replace  << eof

> dcl dd hello char(32) init(

>   "hello, hello, hello how are you?"

> );

> pend;

> eof

  mic:  -- program SPR1_A     is placed in library SOMELIB

  $

 

Or you can call the QPRCRTPG API to compile OPM program SPR1_A directly.

 

CALL QPRCRTPG PARM(

  'DCL DD HELLO CHAR(32) INIT("hello, hello, hello how are you?");PEND;'

  x'00000034'

  'SPR1_A    SOMELIB   '

  'Program text -------------------------------------'

  'QADBCCST  QSYS      '

  'NOSUCHMBR '

  '1100505010101'

  'QSYSPRT   QSYS      '

  x'00000001'

  '*CHANGE   '

  '*REPLACE   '

  x'00000001'

)

 

Here's the source code of ILE RPG program T054. Please refer to t054.rpgle for the latest version.

 

      /if defined(*crtbndrpg)

     h  dftactgrp(*no)

      /endif

      /copy mih54

     /* layout of an OPM program's static storage frame (SSF) */

     d ssf_t           ds                  qualified

     d   header                      64a

     d   data                        32a

     d pgm             s               *

     d ssf             ds                  likeds(ssf_t)

     d                                     based(ssf_ptr)

     d ssf_ptr         s               *

     d argv            s               *   dim(1)

      /free

           // resolve OPM program SPR1_A (2)

           rslvsp_tmpl.obj_type = x'0201';

           rslvsp_tmpl.obj_name = 'SPR1_A';

           rslvsp2 (pgm : rslvsp_tmpl);

           // activate OPM program SPR1_A (3)

           actpg (ssf_ptr : pgm);

           dsply 'Static variable' '' ssf.data;

           // deactivate OPM program SPR1_A

           deactpg (pgm);

             // pgm SPR1_A is deactivated;

             // see activation entries of AG x'00000002'

           *inlr = *on;

      /end-free

 

Code Notes:

(1) This is the layout of an OPM program's static storage frame (SSF) described by data structure ssf_t.

(2) Resolve system pointer pgm to OPM program SPR1_A.

(3) Activate OPM program SPR1_A using ACTPG, and then access storage in SSF of SPR1_A.

 

When you invoke ILE RPG program T054, you will receive this greeting from OPM program SPR1_A:

 

DSPLY  Static variable    hello, hello, hello how are you?

 

 

 

Junlei Li

Junlei Li is a programmer from Tianjin, China, with 10 years of experience in software design and programming. Junlei Li began programming under i5/OS (formerly known as AS/400, iSeries) in late 2005. He is familiar with most programming languages available on i5/OS—from special-purpose languages such as OPM/ILE RPG to CL to general-purpose languages such as C, C++, Java; from strong-typed languages to script languages such as QShell and REXX. One of his favorite programming languages on i5/OS is machine interface (MI) instructions, through which one can discover some of the internal behaviors of i5/OS and some of the highlights of i5/OS in terms of operating system design.

 

Junlei Li's Web site is http://i5toolkit.sourceforge.net/, where his open-source project i5/OS Programmer's Toolkit (https://sourceforge.net/projects/i5toolkit/) is documented.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

RESOURCE CENTER

  • WHITE PAPERS

  • WEBCAST

  • TRIAL SOFTWARE

  • Mobile Computing and the IBM i

    SB ASNA PPL 5450Mobile computing is rapidly maturing into a solid platform for delivering enterprise applications. Many IBM i shops today are realizing that integrating their IBM i with mobile applications is the fast path to improved business workflows, better customer relations, and more responsive business reporting.

    This ASNA whitepaper takes a look at mobile computing for the IBM i. It discusses the different ways mobile applications may be used within the enterprise and how ASNA products solve the challenges mobile presents. It also presents the case that you already have the mobile programming team your projects need: that team is your existing RPG development team!

    Get your copy today!

  • Automate IBM i Operations using Wireless Devices

    DDL SystemsDownload the technical whitepaper on MANAGING YOUR IBM i WIRELESSLY and (optionally) register to download an absolutely FREE software trail. This whitepaper provides an in-depth review of the native IBM i technology and ACO MONITOR's advanced two-way messaging features to remotely manage your IBM i while in or away from the office. Notify on-duty personnel of system events and remotely respond to complex problems (via your Smartphone) before they become critical-24/7. Problem solved!

    Order your copy here.

  • DR Strategy Guide from Maxava: Brand New Edition - now fully updated to include Cloud!

    SB Maxava PPL 5476PRACTICAL TOOLS TO IMPLEMENT DISASTER RECOVERY IN YOUR IBM i ENVIRONMENT

    CLOUD VS. ON-PREMISE?
    - COMPREHENSIVE CHECKLISTS
    - RISK COST CALCULATIONS
    - BUSINESS CASE FRAMEWORK
    - DR SOLUTIONS OVERVIEW
    - RFP BUILDER
    Download your free copy of DR Strategy Guide for IBM i from Maxava today.

     

  • White Paper: Node.js for Enterprise IBM i Modernization

    SB Profound WP 5539

    If your business is thinking about modernizing your legacy IBM i (also known as AS/400 or iSeries) applications, you will want to read this white paper first!

    Download this paper and learn how Node.js can ensure that you:
    - Modernize on-time and budget - no more lengthy, costly, disruptive app rewrites!
    - Retain your IBM i systems of record
    - Find and hire new development talent
    - Integrate new Node.js applications with your existing RPG, Java, .Net, and PHP apps
    - Extend your IBM i capabilties to include Watson API, Cloud, and Internet of Things


    Read Node.js for Enterprise IBM i Modernization Now!

     

  • 2020 IBM i Marketplace Survey Results

    HelpSystems

    This year marks the sixth edition of the popular IBM i Marketplace Survey Results. Each year, HelpSystems sets out to gather data about how businesses use the IBM i platform and the IT initiatives it supports. Year over year, the survey has begun to reveal long-term trends that give insight into the future of this trusted technology.

    More than 500 IBM i users from around the globe participated in this year’s survey, and we’re so happy to share the results with you. We hope you’ll find the information interesting and useful as you evaluate your own IT projects.

  • AIX Security Basics eCourse

    Core Security

    With so many organizations depending on AIX day to day, ensuring proper security and configuration is critical to ensure the safety of your environment. Don’t let common threats put your critical AIX servers at risk. Avoid simple mistakes and start to build a long-term plan with this AIX Security eCourse. Enroll today to get easy to follow instructions on topics like:

    • Removing extraneous files
    • Patching systems efficiently
    • Setting and validating permissions
    • Managing service considerations
    • Getting overall visibility into your networks

     

  • Developer Kit: Making a Business Case for Modernization and Beyond

    Profound Logic Software, Inc.

    Having trouble getting management approval for modernization projects? The problem may be you're not speaking enough "business" to them.

    This Developer Kit provides you study-backed data and a ready-to-use business case template to help get your very next development project approved!

  • What to Do When Your AS/400 Talent Retires

    HelpSystemsIT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators is small.

    This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:

    • Why IBM i skills depletion is a top concern
    • How leading organizations are coping
    • Where automation will make the biggest impact

     

  • IBM i Resources Retiring?

    SB HelpSystems WC GenericLet’s face it: IBM i experts and RPG programmers are retiring from the workforce. Are you prepared to handle their departure?
    Our panel of IBM i experts—Chuck Losinski, Robin Tatam, Richard Schoen, and Tom Huntington—will outline strategies that allow your company to cope with IBM i skills depletion by adopting these strategies that allow you to get the job done without deep expertise on the OS:
    - Automate IBM i processes
    - Use managed services to help fill the gaps
    - Secure the system against data loss and viruses
    The strategies you discover in this webinar will help you ensure that your system of record—your IBM i—continues to deliver a powerful business advantage, even as staff retires.

     

  • Backup and Recovery Considerations for Security Data and Encrypted Backups

    SB PowerTech WC GenericSecurity expert Carol Woodbury is joined by Debbie Saugen. Debbie is an expert on IBM i backup and recovery, disaster recovery, and high availability, helping IBM i shops build and implement effective business continuity plans.
    In today’s business climate, business continuity is more important than ever. But 83 percent of organizations are not totally confident in their backup strategy.
    During this webinar, Carol and Debbie discuss the importance of a good backup plan, how to ensure you’re backing up your security information, and your options for encrypted back-ups.

  • Profound.js: The Agile Approach to Legacy Modernization

    SB Profound WC GenericIn this presentation, Alex Roytman and Liam Allan will unveil a completely new and unique way to modernize your legacy applications. Learn how Agile Modernization:
    - Uses the power of Node.js in place of costly system re-writes and migrations
    - Enables you to modernize legacy systems in an iterative, low-risk manner
    - Makes it easier to hire developers for your modernization efforts
    - Integrates with Profound UI (GUI modernization) for a seamless, end-to-end legacy modernization solution

     

  • Data Breaches: Is IBM i Really at Risk?

    SB PowerTech WC GenericIBM i is known for its security, but this OS could be more vulnerable than you think.
    Although Power Servers often live inside the safety of the perimeter firewall, the risk of suffering a data leak or data corruption remains high.
    Watch noted IBM i security expert Robin Tatam as he discusses common ways that this supposedly “secure” operating system may actually be vulnerable and who the culprits might be.

    Watch the webinar today!

     

  • Easy Mobile Development

    SB Profound WC GenericWatch this on-demand webinar and learn how to rapidly and easily deploy mobile apps to your organization – even when working with legacy RPG code! IBM Champion Scott Klement will demonstrate how to:
    - Develop RPG applications without mobile development experience
    - Deploy secure applications for any mobile device
    - Build one application for all platforms, including Apple and Android
    - Extend the life and reach of your IBM i (aka iSeries, AS400) platform
    You’ll see examples from customers who have used our products and services to deliver the mobile applications of their dreams, faster and easier than they ever thought possible!

     

  • Profound UI: Unlock True Modernization from your IBM i Enterprise

    SB Profound PPL 5491Modern, web-based applications can make your Enterprise more efficient, connected and engaged. This session will demonstrate how the Profound UI framework is the best and most native way to convert your existing RPG applications and develop new modern applications for your business. Additionally, you will learn how you can address modernization across your Enterprise, including databases and legacy source code, with Profound Logic.

  • Node Webinar Series Pt. 1: The World of Node.js on IBM i

    Profound Logic Software, Inc.Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

    Part 1 will teach you what Node.js is, why it's a great option for IBM i shops, and how to take advantage of the ecosystem surrounding Node.

    In addition to background information, our Director of Product Development Scott Klement will demonstrate applications that take advantage of the Node Package Manager (npm).

  • 5 New and Unique Ways to Use the IBM i Audit Journal

    SB HelpSystems ROBOT GenericYou must be asking yourself: am I doing everything I can to protect my organization’s data? Tune in as our panel of IBM i high availability experts discuss:


    - Why companies don’t test role swaps when they know they should
    - Whether high availability in the cloud makes sense for IBM i users
    - Why some organizations don’t have high availability yet
    - How to get high availability up and running at your organization
    - High availability considerations for today’s security concerns

  • Profound.js 2.0: Extend the Power of Node to your IBM i Applications

    SB Profound WC 5541In this Webinar, we'll demonstrate how Profound.js 2.0 enables you to easily adopt Node.js in your business, and to take advantage of the many benefits of Node, including access to a much larger pool of developers for IBM i and access to countless reusable open source code packages on npm (Node Package Manager).
    You will see how Profound.js 2.0 allows you to:

    • Provide RPG-like capabilities for server-side JavaScript.
    • Easily create web and mobile application interfaces for Node on IBM i.
    • Let existing RPG programs call Node.js modules directly, and vice versa.
    • Automatically generate code for Node.js.
    • Automatically converts existing RPGLE code into clean, simplified Node.js code.

    Download and watch today!

     

  • Make Modern Apps You'll Love with Profound UI & Profound.js

    SB Profound WC 5541Whether you have green screens or a drab GUI, your outdated apps can benefit from modern source code, modern GUIs, and modern tools.
    Profound Logic's Alex Roytman and Liam Allan are here to show you how Free-format RPG and Node.js make it possible to deliver applications your whole business will love:

    • Transform legacy RPG code to modern free-format RPG and Node.js
    • Deliver truly modern application interfaces with Profound UI
    • Extend your RPG applications to include Web Services and NPM packages with Node.js

     

  • Accelerating Programmer Productivity with Sequel

    SB_HelpSystems_WC_Generic

    Most business intelligence tools are just that: tools, a means to an end but not an accelerator. Yours could even be slowing you down. But what if your BI tool didn't just give you a platform for query-writing but also improved programmer productivity?
    Watch the recorded webinar to see how Sequel:

    • Makes creating complex results simple
    • Eliminates barriers to data sources
    • Increases flexibility with data usage and distribution

    Accelerated productivity makes everyone happy, from programmer to business user.

  • Business Intelligence is Changing: Make Your Game Plan

    SB_HelpSystems_WC_GenericIt’s time to develop a strategy that will help you meet your informational challenges head-on. Watch the webinar to learn how to set your IT department up for business intelligence success. You’ll learn how the right data access tool will help you:

    • Access IBM i data faster
    • Deliver useful information to executives and business users
    • Empower users with secure data access

    Ready to make your game plan and finally keep up with your data access requests?

     

  • Controlling Insider Threats on IBM i

    SB_HelpSystems_WC_GenericLet’s face facts: servers don’t hack other servers. Despite the avalanche of regulations, news headlines remain chock full of stories about data breaches, all initiated by insiders or intruders masquerading as insiders.
    User profiles are often duplicated or restored and are rarely reviewed for the appropriateness of their current configuration. This increases the risk of the profile being able to access data without the intended authority or having privileges that should be reserved for administrators.
    Watch security expert Robin Tatam as he discusses a new approach for onboarding new users on IBM i and best-practices techniques for managing and monitoring activities after they sign on.

  • Don't Just Settle for Query/400...

    SB_HelpSystems_WC_GenericWhile introducing Sequel Data Access, we’ll address common frustrations with Query/400, discuss major data access, distribution trends, and more advanced query tools. Plus, you’ll learn how a tool like Sequel lightens IT’s load by:

    - Accessing real-time data, so you can make real-time decisions
    - Providing run-time prompts, so users can help themselves
    - Delivering instant results in Microsoft Excel and PDF, without the wait
    - Automating the query process with on-demand data, dashboards, and scheduled jobs

  • How to Manage Documents the Easy Way

    SB_HelpSystems_WC_GenericWhat happens when your company depends on an outdated document management strategy?
    Everything is harder.
    You don’t need to stick with status quo anymore.
    Watch the webinar to learn how to put effective document management into practice and:

    • Capture documents faster, instead of wasting everyone’s time
    • Manage documents easily, so you can always find them
    • Distribute documents automatically, and move on to the next task

     

  • Lessons Learned from the AS/400 Breach

    SB_PowerTech_WC_GenericGet actionable info to avoid becoming the next cyberattack victim.
    In “Data breach digest—Scenarios from the field,” Verizon documented an AS/400 security breach. Whether you call it AS/400, iSeries, or IBM i, you now have proof that the system has been breached.
    Watch IBM i security expert Robin Tatam give an insightful discussion of the issues surrounding this specific scenario.
    Robin will also draw on his extensive cybersecurity experience to discuss policies, processes, and configuration details that you can implement to help reduce the risk of your system being the next victim of an attack.

  • Overwhelmed by Operating Systems?

    SB_HelpSystems_WC_GenericIn this 30-minute recorded webinar, our experts demonstrate how you can:

    • Manage multiple platforms from a central location
    • View monitoring results in a single pane of glass on your desktop or mobile device
    • Take advantage of best practice, plug-and-play monitoring templates
    • Create rules to automate daily checks across your entire infrastructure
    • Receive notification if something is wrong or about to go wrong

    This presentation includes a live demo of Network Server Suite.

     

  • Real-Time Disk Monitoring with Robot Monitor

    SB_HelpSystems_WC_GenericYou need to know when IBM i disk space starts to disappear and where it has gone before system performance and productivity start to suffer. Our experts will show you how Robot Monitor can help you pinpoint exactly when your auxiliary storage starts to disappear and why, so you can start taking a proactive approach to disk monitoring and analysis. You’ll also get insight into:

    • The main sources of disk consumption
    • How to monitor temporary storage and QTEMP objects in real time
    • How to monitor objects and libraries in real time and near-real time
    • How to track long-term disk trends

     

     

  • Stop Re-keying Data Between IBM I and Other Applications

    SB_HelpSystems_WC_GenericMany business still depend on RPG for their daily business processes and report generation.Wouldn’t it be nice if you could stop re-keying data between IBM i and other applications? Or if you could stop replicating data and start processing orders faster? Or what if you could automatically extract data from existing reports instead of re-keying? It’s all possible. Watch this webinar to learn about:

    • The data dilemma
    • 3 ways to stop re-keying data
    • Data automation in practice

    Plus, see how HelpSystems data automation software will help you stop re-keying data.

     

  • The Top Five RPG Open Access Myths....BUSTED!

    SB_Profound_WC_GenericWhen it comes to IBM Rational Open Access: RPG Edition, there are still many misconceptions - especially where application modernization is concerned!

    In this Webinar, we'll address some of the biggest myths about RPG Open Access, including:

    • Modernizing with RPG OA requires significant changes to the source code
    • The RPG language is outdated and impractical for modernizing applications
    • Modernizing with RPG OA is the equivalent to "screen scraping"

     

  • Time to Remove the Paper from Your Desk and Become More Efficient

    SB_HelpSystems_WC_GenericToo much paper is wasted. Attempts to locate documents in endless filing cabinets.And distributing documents is expensive and takes up far too much time.
    These are just three common reasons why it might be time for your company to implement a paperless document management system.
    Watch the webinar to learn more and discover how easy it can be to:

    • Capture
    • Manage
    • And distribute documents digitally

     

  • IBM i: It’s Not Just AS/400

    SB_HelpSystems_WC_Generic

    IBM’s Steve Will talks AS/400, POWER9, cognitive systems, and everything in between

    Are there still companies that use AS400? Of course!

    IBM i was built on the same foundation.
    Watch this recorded webinar with IBM i Chief Architect Steve Will and IBM Power Champion Tom Huntington to gain a unique perspective on the direction of this platform, including:

    • IBM i development strategies in progress at IBM
    • Ways that Watson will shake hands with IBM i
    • Key takeaways from the AS/400 days

     

  • Ask the RDi Experts

    SB_HelpSystems_WC_GenericWatch this recording where Jim Buck, Susan Gantner, and Charlie Guarino answered your questions, including:

    • What are the “hidden gems” in RDi that can make me more productive?
    • What makes RDi Debug better than the STRDBG green screen debugger?
    • How can RDi help me find out if I’ve tested all lines of a program?
    • What’s the best way to transition from PDM to RDi?
    • How do I convince my long-term developers to use RDi?

    This is a unique, online opportunity to hear how you can get more out of RDi.

     

  • Node.js on IBM i Webinar Series Pt. 2: Setting Up Your Development Tools

    Profound Logic Software, Inc.Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. In Part 2, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Attend this webinar to learn:

    • Different tools to develop Node.js applications on IBM i
    • Debugging Node.js
    • The basics of Git and tools to help those new to it
    • Using NodeRun.com as a pre-built development environment

     

     

  • Inside the Integrated File System (IFS)

    SB_HelpSystems_WC_GenericDuring this webinar, you’ll learn basic tips, helpful tools, and integrated file system commands—including WRKLNK—for managing your IFS directories and Access Client Solutions (ACS). We’ll answer your most pressing IFS questions, including:

    • What is stored inside my IFS directories?
    • How do I monitor the IFS?
    • How do I replicate the IFS or back it up?
    • How do I secure the IFS?

    Understanding what the integrated file system is and how to work with it must be a critical part of your systems management plans for IBM i.

     

  • Expert Tips for IBM i Security: Beyond the Basics

    SB PowerTech WC GenericIn this session, IBM i security expert Robin Tatam provides a quick recap of IBM i security basics and guides you through some advanced cybersecurity techniques that can help you take data protection to the next level. Robin will cover:

    • Reducing the risk posed by special authorities
    • Establishing object-level security
    • Overseeing user actions and data access

    Don't miss this chance to take your knowledge of IBM i security beyond the basics.

     

     

  • 5 IBM i Security Quick Wins

    SB PowerTech WC GenericIn today’s threat landscape, upper management is laser-focused on cybersecurity. You need to make progress in securing your systems—and make it fast.
    There’s no shortage of actions you could take, but what tactics will actually deliver the results you need? And how can you find a security strategy that fits your budget and time constraints?
    Join top IBM i security expert Robin Tatam as he outlines the five fastest and most impactful changes you can make to strengthen IBM i security this year.
    Your system didn’t become unsecure overnight and you won’t be able to turn it around overnight either. But quick wins are possible with IBM i security, and Robin Tatam will show you how to achieve them.

  • How to Meet the Newest Encryption Requirements on IBM i

    SB PowerTech WC GenericA growing number of compliance mandates require sensitive data to be encrypted. But what kind of encryption solution will satisfy an auditor and how can you implement encryption on IBM i? Watch this on-demand webinar to find out how to meet today’s most common encryption requirements on IBM i. You’ll also learn:

    • Why disk encryption isn’t enough
    • What sets strong encryption apart from other solutions
    • Important considerations before implementing encryption

     

     

  • Security Bulletin: Malware Infection Discovered on IBM i Server!

    SB PowerTech WC GenericMalicious programs can bring entire businesses to their knees—and IBM i shops are not immune. It’s critical to grasp the true impact malware can have on IBM i and the network that connects to it. Attend this webinar to gain a thorough understanding of the relationships between:

    • Viruses, native objects, and the integrated file system (IFS)
    • Power Systems and Windows-based viruses and malware
    • PC-based anti-virus scanning versus native IBM i scanning

    There are a number of ways you can minimize your exposure to viruses. IBM i security expert Sandi Moore explains the facts, including how to ensure you're fully protected and compliant with regulations such as PCI.

     

     

  • Fight Cyber Threats with IBM i Encryption

    SB PowerTech WC GenericCyber attacks often target mission-critical servers, and those attack strategies are constantly changing. To stay on top of these threats, your cybersecurity strategies must evolve, too. In this session, IBM i security expert Robin Tatam provides a quick recap of IBM i security basics and guides you through some advanced cybersecurity techniques that can help you take data protection to the next level. Robin will cover:

    • Reducing the risk posed by special authorities
    • Establishing object-level security
    • Overseeing user actions and data access

     

     

     

  • 10 Practical IBM i Security Tips for Surviving Covid-19 and Working From Home

    SB PowerTech WC GenericNow that many organizations have moved to a work from home model, security concerns have risen.

    During this session Carol Woodbury will discuss the issues that the world is currently seeing such as increased malware attacks and then provide practical actions you can take to both monitor and protect your IBM i during this challenging time.

     

  • How to Transfer IBM i Data to Microsoft Excel

    SB_HelpSystems_WC_Generic3 easy ways to get IBM i data into Excel every time
    There’s an easy, more reliable way to import your IBM i data to Excel? It’s called Sequel. During this webinar, our data access experts demonstrate how you can simplify the process of getting data from multiple sources—including Db2 for i—into Excel. Watch to learn how to:

    • Download your IBM i data to Excel in a single step
    • Deliver data to business users in Excel via email or a scheduled job
    • Access IBM i data directly using the Excel add-in in Sequel

    Make 2020 the year you finally see your data clearly, quickly, and securely. Start by giving business users the ability to access crucial business data from IBM i the way they want it—in Microsoft Excel.

     

     

  • HA Alternatives: MIMIX Is Not Your Only Option on IBM i

    SB_HelpSystems_WC_GenericIn this recorded webinar, our experts introduce you to the new HA transition technology available with our Robot HA software. You’ll learn how to:

    • Transition your rules from MIMIX (if you’re happy with them)
    • Simplify your day-to-day activities around high availability
    • Gain back time in your work week
    • Make your CEO happy about reducing IT costs

    Don’t stick with a legacy high availability solution that makes you uncomfortable when transitioning to something better can be simple, safe, and cost-effective.

     

     

  • Comply in 5! Well, actually UNDER 5 minutes!!

    SB CYBRA PPL 5382

    TRY the one package that solves all your document design and printing challenges on all your platforms.

    Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product.

    Request your trial now!

  • Backup and Recovery on IBM i: Your Strategy for the Unexpected

    SB HelpSystems SC 5413Robot automates the routine tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:
    - Simplified backup procedures
    - Easy data encryption
    - Save media management
    - Guided restoration
    - Seamless product integration
    Make sure your data survives when catastrophe hits. Try the Robot Backup and Recovery Solution FREE for 30 days.

  • Manage IBM i Messages by Exception with Robot

    SB HelpSystems SC 5413Managing messages on your IBM i can be more than a full-time job if you have to do it manually. How can you be sure you won’t miss important system events?
    Automate your message center with the Robot Message Management Solution. Key features include:
    - Automated message management
    - Tailored notifications and automatic escalation
    - System-wide control of your IBM i partitions
    - Two-way system notifications from your mobile device
    - Seamless product integration
    Try the Robot Message Management Solution FREE for 30 days.

  • Easiest Way to Save Money? Stop Printing IBM i Reports

    SB HelpSystems SC 5413Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing.
    Manage your reports with the Robot Report Management Solution. Key features include:

    - Automated report distribution
    - View online without delay
    - Browser interface to make notes
    - Custom retention capabilities
    - Seamless product integration
    Rerun another report? Never again. Try the Robot Report Management Solution FREE for 30 days.

  • Hassle-Free IBM i Operations around the Clock

    SB HelpSystems SC 5413For over 30 years, Robot has been a leader in systems management for IBM i.
    Manage your job schedule with the Robot Job Scheduling Solution. Key features include:
    - Automated batch, interactive, and cross-platform scheduling
    - Event-driven dependency processing
    - Centralized monitoring and reporting
    - Audit log and ready-to-use reports
    - Seamless product integration
    Scale your software, not your staff. Try the Robot Job Scheduling Solution FREE for 30 days.

  • ACO MONITOR Manages your IBM i 24/7 and Notifies You When Your IBM i Needs Assistance!

    SB DDL Systems 5429More than a paging system - ACO MONITOR is a complete systems management solution for your Power Systems running IBM i. ACO MONITOR manages your Power System 24/7, uses advanced technology (like two-way messaging) to notify on-duty support personnel, and responds to complex problems before they reach critical status.

    ACO MONITOR is proven technology and is capable of processing thousands of mission-critical events daily. The software is pre-configured, easy to install, scalable, and greatly improves data center efficiency.