ILERPG.com β€” IBM i Β· ILE RPG Β· AS400 Mastery

This lesson is locked

A short preview is available. Purchase once for lifetime access.

Beginner Β· 11:00

Arrays: Declaration, Loading, and Lookup

ERP programs are full of small fixed-shape lists: region codes, carrier codes, pricing-tier thresholds. This lesson covers declaring arrays with DIM and bounding code with %ELEM; compile-time arrays with CTDATA, PERRCD, and a named **CTDATA section; loading runtime arrays safely; exact-match…

What you'll be able to do

  1. 1Declare a runtime array using DIM and use %ELEM to determine, and safely bound code against, its element count.
  2. 2Declare and populate a compile-time array using CTDATA, PERRCD, and a named **CTDATA section, and identify when a compile-time array is β€” and is not β€” the right choice.
  3. 3Load a runtime array through direct assignment and a bounded loop, including the parallel-array pattern.
  4. 4Use %LOOKUP to perform an exact-match search and interpret its result correctly, including the no-match case.
  5. 5Use the ranged lookup functions together with SORTA and the ASCEND/DESCEND keyword to perform a ranged search against a sorted array.

Create your account

Takes a few seconds β€” you'll be right back here after.

Sign in

Welcome back β€” you'll be right back here after.

Forgot your password?