In The Spotlight
In addition to named constants and standalone variables, you can define data structures, which are simply a means of organizing multiple variables within a single section of contiguous portions of memory. Miss the previous excerpts regarding using declarations? Read each here: Part 1 & Part 2 & Part 3
By Brian Meyers and Jim Buck
Editor's Note: This article is excerpted from chapter 4 of Programming in ILE RPG, Fifth Edition.
Data structures can provide flexibility in your handling of data by letting you group variables into a logical structure, subdivide variables into subfields, and redefine variables with different data types or names. An RPG program can process the entire data structure as a unit or its subfields individually.