Lessons
Short, practical IBM i programming lessons.
Focused examples for RPG, SQLRPGLE, Db2 for i, APIs, DevOps, security, monitoring, and modern IBM i development.
RPG ASSERT-T and ASSERT-F: Defensive Programming on IBM i
Learn how to use RPG ASSERT-T and ASSERT-F to document and check assumptions in your code with short, practical examples.
RPG %LOOKUPNE: Find the First Value That Does Not Match
Learn how to use RPG %LOOKUPNE to find the first array element that is not equal to a search value, with short practical examples.
RPG LIKE(*EXT): Define a Variable Like an External File Field
Learn how RPG LIKE(*EXT) can define a variable from one field in an external file without declaring the whole file or external data structure.
RPG ON-EXCP with Generic Message IDs
Learn how RPG ON-EXCP can monitor for generic message IDs, with short practical examples for MONITOR groups.
RPG PSDS Job Type and Subtype
Learn how RPG can use the PSDS job type and subtype fields to understand how a program is running, with short practical examples.
Initialize an RPG Array with INZ(*LIST)
Put the initial values beside an RPG array declaration. A small order-status example introduces INZ(*LIST), with downloadable source and expected output.
Let RPG Count Your Array Elements with DIM(*INZ)
Use DIM(*INZ) to size an RPG array from its initial values. Add a fourth order status without maintaining a separate element count.