Printer Files: By: Pankaj Dutta
Printer Files: By: Pankaj Dutta
◦ Printer files contain many parameters that tell the system how the output should be formatted, what font
to use for the printed output, whether to print on both sides of the page, and more.
◦ A printer file defined within an application program is called a program described printer file
◦ The file, record, and field descriptions are defined internally within the data division.
◦ With this method, report specifications are hard-coded into the program and become part of the
program’s compiled object
Externally described printer files
◦ Printer file whose report specifications are defined outside of the program in a separate file is called an
externally described printer file.
◦ The report specifications for a printer file are described separately from any programs and compiled into
a printer file object
◦ An externally described printer file can be directly created by creating a respective DDS with source type
as PRTF using STRSEU or F6 in WRKMBRPDM.
◦ Another way of creating such printer file is using an utility called Report Layout Utility or RLU using
the command STRRLU.
Report Layout Utility (RLU)
◦ Part of Application Development Tool Set of AS/400 used for designing reports.
◦ RLU Source member contain printer file DDS which uses keyword to define the design of the report.
◦ The RLU can be started by using the command STRRLU.
◦ Option 19 can also be used to open a printer file using RLU
RLU (Contd…)
◦ Enter command STRRLU and take F4. Specify source PF, Library and member (Printer file name).
◦ Once in RLU, Insert a line and give DR to define a record format.
◦ Each Row will be defined as a record format.
◦ To add a variable, Take F11. Variable name can be specified here along with its data type and more
params in the additional parameters.
◦ Data types included are
◦ Character
◦ Zoned
◦ Floating Point
◦ Date
◦ Time
◦ Time Stamp
◦ To see the list of constants and variable in a record format, take F4
◦ Other frequently used shortcuts are
◦ F13 – For selecting a field
◦ F14 – To copy a selected field
◦ F15 – For moving a selected field
◦ F16 – For deleting a field.
Taking variables from file
◦ Variables can be directly taken from database files.
◦ Take option F10 and take option one to add field. Specify the File, Library, Record Format and the Fields
which are to be used in the printer file. F4 can also be take to view the list.
◦ Once Database fields are added, they will come at the bottom as seen in below image.
◦ To add the field in the printer file, just enter the corresponding number and press enter. The length will be
automatically taken from the DB file.
◦ Changing the record format name
◦ Record format name can be changed by first putting the cursor on the record and pressing F18 (Work
with Record Keywords) and then Pressing F10 (Rename record)
Thank You!