✨ ARCANUM RUNE DIFFICULTY: Apprentice Behavioral

ISPF Table Iterator

Sequentially access rows in an ISPF table.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Iterator
ARCANUM SCHOOL: Divination // Scanning
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
/* ooRexx Iterator */
::class ISPFIterator
::attribute table
::attribute index
::method init
  use arg table
  self~table = table
  self~index = 1
::method hasNext
  return self~index <= self~table~items
::method next
  val = self~table[self~index]
  self~index = self~index + 1
  return val

Scanning through the monolithic structures of ISPF tables is elegantly achieved by an Iterator, shielding the mage from raw memory traversal.

Runic Tags: #iterator #ispf #rexx