HP RPG/XL Programmer's Guide (30318-90001)

5- 10
describe different record formats within a file. Or you can use data
structures to redefine numeric fields in order to process them
differently.
Figure 5-6 and Figure 5-7 show how to describe three different input
records in the same file. The example in Figure 5-6 does not use data
structures and the example in Figure 5-7 does. In Figure 5-6, the second
and third records redescribe the first, using different field names and
definitions. This method of defining data more than one way keeps field
definitions near the fields being redefined which improves readability
and maintainability.
Figure 5-6. Defining Different Record Formats Without Using Data Structures
Comments
1 This line defines the first record, SREC, in the file. SREC is