There are 3 ways that reports get printed using RPG.
The oldest and obsolete method uses the RPG cycle and
is not covered in this tutorial.
The next and most widely used is covered in this topic. The report
is formatted using Output Specs. These are identified with the letter O.
Be sure to use F4 when entering O specs because they have many options.
An O spec is written by using the EXCEPT operation. This comes from the
history of RPG. When using the RPG cycle, the O Specs are automatically
written. When you don't use the RPG cycle, the O Specs are written as
an EXCEPTion to the cycle.
The F spec for the printer file QPRINT identifies an indicator which the
AS/400 turns *ON when the page is full.
The third way of printing will be covered in the next topic. It uses
a printer file defined using DDS specs.
To view the print report and programming code in RPG, click here.
To view the print report and programming code in RPG-ILE, click here.