Step 5 - Using an Overlay
|Once an overlay is created, there are a variety of ways to place an overlay in AFP
|document applications. Overlays can be referenced in the AS/400 printer file, in
|DDS output specifications (using the OVERLAY keyword), with the Advanced Print
|Utility, with page and form definitions, with AFP Toolbox for AS/400 APIs, and with
|numerous third party applications. Refer to the

AS/400 Guide to Advanced

|

Function Presentation and Print Services Facility

(S544-5319) for more information
|on application options for AFP documents.
Overriding a Printer File
To use an overlay with a printer file, enter an OVRPRTF command to override the
printer file with the overlay.
See the
CL Reference
book for detail of the OVRPRTF command.
In the following example, the printer file PRINTF is used as an example. You can
use the name of your own printer file instead.

Example Actions:

1. Type OVRPRTF FILE(PRINTF) FRONTOVL(OVLLIB/STATIONE) onthe command line.
2. Press the Enter key.
Using the Printer File
To create a spooled file that contains the overlay, use the printer file. Any program
that uses the printer file will do.
In the following example, a program CRTPRT is used to create a spooled file. You
should use the name of your own program that uses the printer file PRINTF.

Example Actions

1. Type CALL CRTPRT on the command line.
2. Press the Enter key.
If you do not have a program that uses the printer file, you can try using the overlay
with system-supplied programs as follows:
1. Type OVRPRTF FILE(QSYSPRT) FRONTOVL(OVLLIB/STATIONE) onthe command
line.
2. Press the Enter key.
3. Press the Print key.
When you press the Print key, a system program prints a copy of the displayed
panel by using printer file QSYSPRT. Thus, overlay STATIONE is printed on the
hard copy of the display you are seeing.
You can specify overlays in record formats of a DDS source for the printer file if the
printer device type is *AFPDS. See

AS/400 Data Description Specifications

Reference Version 2, SC41-9620

for more information.
Chapter 3. Getting Started with the Overlay Utility 55