Before using this information and the product it supports, be sure to read the general information in “Notices” on page 133.
Fourth Edition (May 2002)
This edition applies to the licensed program IBM PrintSuite for iSeries: Advanced Print Utility (Program number
5798-AF2), and to all subsequent releases and modifications until otherwise indicated in new editions or technical
newsletters. Be sure to use the correct edition for the level of the product.
Order publications through your IBM representative or the IBM branch office serving your locality. Publications are
not stocked at the address given below.
The IBM Printing Systems Company welcomes your comments. A form for reader’s comments is provided at the
back of this publication. If the form has been removed, you may send your comments to the following address:
INFORMATION DEVELOPMENT
IBM PRINTING SYSTEMS
DEPARTMENT H7FE BUILDING 004M
PO BOX 1900 BOULDER CO 80301-9191
If you prefer to send comments electronically, use one of the following methods:
v Internet: printpub@us.ibm.com
v Fax: 1-800-524-1519 within the U.S. or 1-303-924-6873 outside U.S.
Internet
Visit our home page at http://www.ibm.com/printers
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
This publication helps you to use the IBM PrintSuite for iSeries Advanced Print
Utility (APU). It focuses on the concepts of APU, using a series of application
examples to demonstrate how APU works.
APU has extensive on-line help; we do not duplicate that information here. For
details on the concepts of Advanced Function Presentation (AFP), refer to iSeriesGuide to AFP and PSF, S544-5319.
APU Enhancements
The following features have been made available by the current modification level
of APU:
1. Duplex Printing is now available. Refer to “Page Layout Options” on page 42
for a description of how the capability is used, including restrictions on its use.
2. Fields in the SNA Character String (SCS) file can now be mapped to multiple
locations. Refer to “Mapping a Field at Multiple Locations” on page 49.
3. Outline fonts are now included in the font set. Refer to “Outline Fonts” on
page 20.
4. The APU Monitor has been enhanced to include conditional processing
capabilities. Refer to Chapter 6, “Automatic Printing with APU Monitor” on
page 83.
Organization of the Manual
This manual is organized into three parts, as follows:
v Part 1 - Understanding and Preparing to use APU
The two chapters in this part introduce new APU users to the capabilities and
features of APU:
1. Introducing Advanced Print Utility describes what you can do with APU.
2. Preparing to use the Advanced Print Utility describes tasks you need to
perform before using APU. You are also given an orientation to using the
APU panels.
v Part 2 - Creating Print Definitions with APU
Each of the two chapters in this part provides you with a procedure for creating
a print definition. One chapter provides the procedure for creating a print
definition for a single-page document; the other for a multiple page document.
New APU users will find it useful to create a sample print definition using one
of these procedures before creating a production-level print definition.
v Part 3 - Printing with APU
The material in this part describes the concepts and procedures for printing your
documents once you have created a print definition.
Use this chapter to gain an understanding of what the IBM PrintSuite for iSeries
Advanced Print Utility (APU) can do for you, including:
v “What is APU?”
v “What You Can Do with APU”
v “Why Use APU?” on page 4
v “Printing with and without APU” on page 4
v “APU formatting instructions” on page 6
v “Steps in Creating an APU Document” on page 7
What is APU?
Advanced Print Utility (APU) is part of the Advanced Function Presentation (AFP)
PrintSuite family of document-creation systems that enables you to use SCS files as
input to APU and then to transform that input to “full-page” electronic output,
with pages that include electronic forms, image, bar codes, lines, boxes, and text in
a variety of fonts.
APU provides an interactive design approach that is independent of the
application program.
v The input to APU is the line-mode (SCS) output file that the line-of-business
application creates.
v The output of APU is an AFP spooled file.
What You Can Do with APU
Output specifications for iSeries application programs generate either SNA
Character Stream (SCS) or AFP spooled files. APU works on SCS spooled files. SCS
is a line-oriented datastream that for the most part uses preprinted forms to create
the final document. With APU, you can eliminate the need for preprinted forms.
Instead, you create a completely electronic document. With APU, you can:
v Create multi-copy documents, with each page customized
v Use data that is contained within a page to determine which of multiple output
formats to use
v Remap any field that the input SCS pages contain (change position, font,
orientation, color, and so on)
v Print application data in any of the standard bar code symbologies
v Add document elements such as electronic forms (overlays), images, lines, boxes,
and constant text
v Place a new application into production for automatic processing
v Manage the production of input and output files, including the routing of
different output files to different queues, printers, and output bins
v Implement user-defined programs that can address unique document or
document distribution requirements
APU provides an interactive interface for defining new output applications. For
simpler applications, APU provides a “fast path”. You use the current spooled file
(SCS) interactively to redefine the formatting of application data.
APU assists you in building AFP-compatible electronic output. Effective electronic
output can provide significant benefits to an organization, particularly in the areas
of information systems costs, process reengineering, and better communications,
for example:
v Replacing preprinted multipart forms with electronic forms supplies significant
cost savings.
– You can print a variety of different forms one after the other without
switching forms at the printer.
– You can eliminate carbon forms by printing multiple copies of the same page,
that includes the capability of varying the output on each copy.
– You can eliminate storage space for preprinted forms because the forms are
stored electronically rather than physically occupying office space.
– You can change the form outside of the application program, and you do not
need to scrap or reorder preprinted forms.
v Documents, whether printed, stored, or viewed, are critical to the workflow in
any organization. The capabilities of electronic documents provide a wealth of
opportunities to reengineer organizational processes. In fact, in many industries,
document reengineering such as bar coding is a “must.” Coding an electronic
document with bar code, optical character recognition (OCR), magnetic ink
character recognition (MICR), and images enables you to easily integrate the
document into the workflow.
v Electronic documents are more effective documents. Document elements, such as
images, text, and overlays, allow you to compose a document that does a better
job of communicating or marketing. Electronic flexibility, the ability to change a
document dynamically down to the individual transaction level, provides a wide
variety of application possibilities. Electronic documents project the image of a
strong, professional organization.
For more information about the benefits of AFP, refer to iSeries Guide to AFP andPSF.
Printing with and without APU
This section describes the situation in environments that do and do not use APU.
Printing without APU
APU provides an application-independent, end-user approach to page and
document formatting. Without APU, the application programmer can format pages
using either specifications within the application program or DDS (Data
Description Specifications), which is external to the application program.
Formatting within the program (also called internally or program-described) only
provides for line-oriented pages of output. Formatting with DDS (actually a part of
the printer file) actually provides for comprehensive AFP pages and documents.
There are DDS keywords not only for field positioning but also for every
document element (overlay, image, font, bar code, and so on) found in complex
application output.
Both these methods of formatting pages, however, are integrated with the
application program. This is an advantage when you want to precisely customize
each page based on logic or data within the program. This is a disadvantage when
you would like to separate the processing of the application program from the
complex formatting of each page. This is even a bigger disadvantage if there is no
4APU User’s Guide
access to the application program source code or no programming skills exist
in-house to implement changes to output pages or documents.
Printing with APU
Using APU requires no programming skills, enabling individuals with graphics
and layout ability to design the appearance of the printed page and to easily make
changes to printout appearance.
Note: Exact print results depend on the type of printer you have. Refer to IBM
Printing Systems: Printer Information, S544-5750, for the specific capabilities of
your printer.
Without AFP and APU, the application programmer codes all of the formatting
information in the application program or printer file and runs the program to
generate an output file. The output file is placed on a system spool and directed to
a printer.
Output Queues
Application
Create
Print
Definition
Print
Program
Print
Definition
Spool
Monitor
Print
Engine
Output Queues
Spool
AFP
Resources
PSF/400
AFP
Printer
Figure 1. Flow of Data Through APU and OS/400
Figure 1 illustrates the processing flow of APU. There is a design phase and a
production phase.
The Design Phase
The new output application is defined in the design phase, which is done once (or
when changes are required). You do this interactively. The spooled output file from
the existing application is retrieved and used in the design process. The output of
this design phase is a set of formatting rules that are stored in an APU print
definition.
Chapter 1. Introducing Advanced Print Utility5
The Production Phase
With the new print application designed, it is ready to be placed into production.
You define the desired production characteristics to APU. These characteristics
include how to identify the target spooled file, which print definition to use, what
user-specific programs should be called during processing, and the disposition of
both the input and output spooled files. With this information in place, you start
the APU Monitor.
The APU Monitor automatically monitors iSeries output queues, looking for the
specified spooled file. When that target file is identified, it is retrieved and passed
to the APU print engine. The APU print engine uses the formatting instructions
contained in the APU print definition to create a new AFP output file and place it
in an output queue.
At this point, standard iSeries print management takes over. When the new file is
to be printed, PSF/400 manages the printing process (including the retrieval and
management document resources such as overlays, images, and fonts) to an IPDS
printer. Alternatively, the new print file can be routed through Host Print
Transform to an HP-PCL printer.
APU formatting instructions
APU enables you to build a print definition, which is a set of instructions for
formatting the data that is contained in a spooled print file. A print definition can
contain one or more page formats, enabling you to change formatting instructions
for different pages in the spooled file. Within the page format, you can define one
or more copies of each input page. Figure 2 shows the relationship among these
APU concepts.
6APU User’s Guide
Figure 2. APU Data Structure
You can specify a single page format in a print definition, if all of the pages in
your spooled file are formatted in the same way. An application that might require
only one page format is a one-page form such as an invoice, where all of the fields
on the form are predefined, and a second page is never required.
Even though you define only one page format in the print definition, you can still
use the APU multiple copy function to produce different copies of the same page,
as would be done with hard copy multipart forms. You can, for example, suppress
the price on the packing slip and print some inventory control information on the
packing slip as a bar code.
When you use APU, each copy can be different. The same data can be printed at a
different position, and different attributes can be used with each copy. For
example, the customer address from an invoice can be placed on the right side of
the first (“original”) copy and on the left side and in a different font on the second
copy.
Applications requiring multiple page formats in the print definition might be
Figure 3. APU Concepts
billing statements that could have so many line items that two pages instead of
one are required to list all of the items ordered. In this case, you would want to
define one page format to be used for the first page of each customer bill and
another page format to be used for those customers requiring a second page.
To determine what page format is used for each input data page, you define fields
in the data that can be evaluated by APU. For example, if the input data contains a
field with “PAGEnOFm” in it, you can specify that field to APU and have the
contents of the n and m fields evaluated to determine if a second page format
should be used.
Steps in Creating an APU Document
To create a document that takes advantage of the functions that are provided by
AFP and APU, you need to perform the tasks shown in Figure 4 on page 8.
Chapter 1. Introducing Advanced Print Utility7
Analyze the
SCS job
Create
AFP Resources
with AFP tools
Create the
Print Definition
Run the
Print Definition
Document structure
- Page format
- Page copy
- Data identification
- Resources
identification
- Trigger for conditional
processing
- Font
- Page Segment
- Overlay
Define APU Defaults
- Select unit of
measure
- Select font
- Select paper size
. . .
-
Create print definition
- Define page format
- (cond. processing)
- Create copy
- (Mapping)
. . .
- ( )
Figure 4. Steps to Creating a Document
Step 1: Analyzing the Existing Application
Questions you need to Ask
The first step in creating a document is to examine the contents of the current
application program that is output by asking these questions:
v Is the application currently being printed on preprinted forms? If so, how
complicated is the information on the preprinted forms? If the preprinted form
contains only a few boxes and text strings, you might consider using the APU
functions to include those items in the APU print definition. If the form is
complex, you should probably use another program, such as the Overlay Utility
in the Advanced Function Printing Utilities for iSeries program product, to
create an electronic overlay. For more information, see Chapter 2, “Preparing to
Use the Advanced Print Utility” on page 13.
v Is the application currently being printed on multipart forms? If so, do the forms
all contain the same information, or is some of the data suppressed on some
copies?
v Is the same page format used for all pages in the file? Could you improve the
appearance of the output by using a different format for pages of different types,
such as a different layout for the first output page than for subsequent
continuation pages?
v If you want to use more than one page format in the AFP output, examine the
contents of a spooled file that is produced by the application. What information
is contained in the print data that APU can use to determine which page format
is to be used for each type of output page?
v What fonts will you need to produce effective output?
v Would you like to add any image data to the output?
v Would you like to add any bar code data to the output?
v What type of AFP printer will you use to print the job? Some AFP printers do
not support all of the AFP data stream objects, such as bar codes. Refer to IBM
Printing Systems: Printer Information, S544-5750, for details about printer
capabilities.
Run APU manually
Work with APU monitor
8APU User’s Guide
Example of Sample Spooled File (Source Input Data)
An example of the sample spooled file (source input data) that you would use to
build a print definition is given below:
LOS ARBOLES DEL MUNDOSAME
32483 ARBOL LANE
MESA VERDE
IL 54078-9390
141313411/26/982/26/98
900 EA00001200 ARBOLES DEL SUR45.0040,500.00
951 CT11005011 LASSO RED SEEDS892.2348,510.73
100 EA31321655 SEMILLAS DEL SUS SOMBEROS24.952,495.00
1000 BX56413213 POT POT7.657,650.00
98 PK84512023 OREGON SPRING TOMATO SEED.9795.06
1/26/98N10MICHELE GOODACRE
Thank You .....
Because you have ordered
over $500 of trees this
year, on your next tree
order you will receive
a 10% discount.
$99,991.52
LOS ARBOLES DEL MUNDO
2/26/98$99,991.52
32483 ARBOL LANE
MESA VERDE
IL 540789390
Note: There are some restrictions on the spooled file to be copied. Refer to the
help text for the copy spool file (CPYSPLF) command for details of these
restrictions.
Step 2: Locating Required AFP Resources
If your application analysis in Step 1 identified required overlays, images, or fonts,
those print resources need to be available before you can proceed with the APU
design function. APU does not create these print resources, but other IBM and
vendor programs as available that do. Refer to Chapter 2, “Preparing to Use the
Advanced Print Utility” on page 13.
Step 3: Using APU to Create a Print Definition
After APU is installed, enter “GO QAPU/APU” on a command line to display the
APU main menu, as shown in Figure 5 on page 10.
Page
1
Chapter 1. Introducing Advanced Print Utility9
APUIBM Advanced Print Utility
Select one of the following:
Build and Test APU Print Definitions
1. Work with Print Definitions
2. Work with Spooled Files
Run APU in Batch Mode
3. Work with APU Monitor
4. Start APU Monitor
5. End APU Monitor
Configure APU
6. Set APU Defaults
7. Work with Fonts
8. Configure APU Monitor Action
Selection or command
===> 1
F3=ExitF4=PromptF9=RetrieveF12=CancelF16=System main menu
F23=Set initial menu
Figure 5. APU main menu panel
Initially, you may need to set the APU defaults if they were not previously set. For
more information, see “Initial APU Setup” on page 14.
Creating a print definition includes defining page formats and defining copies. We
describe these tasks in the sections that follow.
Defining Page Formats
When you create a print definition, you must specify whether the print definition
will contain one or more page formats. If your print definition will contain only
one page format, APU uses a fast path to map the spooled file data and define
other document resources such as overlays and images.
However, if your print definition will contain multiple page formats, you must
define the fields in the spooled file that APU can use to determine which page
format to use for each page of input data. See “Example of a Multiple Page Format
Document” on page 51 for a detailed description of the panels in APU that you use
for a print definition with multiple page formats.
After you have set up the conditions you want APU to use to select a page format,
you can then specify the formatting instructions for each output copy.
Defining Copies
A page format needs a minimum of one copy. APU provides the first *ORIGINAL
copy with all related default values. Before you create additional copies, you need
to define or modify all elements common to all copies. All work that is done on
the first copy can be reused by any additional copies.
Step 4: Printing with the Print Definition
To test how your application output will appear with the new print definition
applied, select Work with Spooled Files from the APU Main Menu. On that panel
you can select an existing spooled file to which you can apply your print
definition.
10APU User’s Guide
After you specify which print definition to apply, APU creates another spooled file
and sends it to the output queue that you select. You will probably need to
experiment some to get the data lined up with the electronic form or to refine the
conditional tests that APU performs to select page formats.
When you have completed testing of the print definition, you are ready to put the
application into production. This involves defining how the production process is
to work, then starting the APU Monitor.
Use the Work with APU Monitor option on the APU Main Menu to define how
the target spooled file is identified, which print definition(s) will be applied, any
special user-specific processing that should be done, and the disposition of the
input and output files when production processing completes.
Once these options are defined, the APU Monitor can be started. Use the Start theAPU Monitor option on the APU Main Menu. At this point, the production
process is automatic. When the target spooled file is identified, it is automatically
selected and processed based on your definition. Refer to Chapter 6, “Automatic
Printing with APU Monitor” on page 83 for detailed information.
Chapter 1. Introducing Advanced Print Utility11
12APU User’s Guide
Chapter 2. Preparing to Use the Advanced Print Utility
Before building your first APU print definition, review the following installation
and planning considerations:
v “APU Prerequisites and Options”
v “Initial APU Setup” on page 14
v “Font Installation Considerations” on page 16
v “Review Document Resource Requirements” on page 16
v “Using Fonts with APU” on page 18
v “Image Resources” on page 24
v “Overlay Resources” on page 26
v “Bar Code Resources” on page 29
APU Prerequisites and Options
Required
Print Services Facility for iSeries (PSF for iSeries) is the AFP printing subsystem on
OS/400. PSF for iSeries is used when AFP print files are to be printed on
Intelligent Printer Data Stream (IPDS) printers. Since APU creates AFP output, PSF
for iSeries is required to print APU applications to IPDS printers. AFP output files
can also be printed on HP-PCL printers by using Host Print Transform (a
component of OS/400) services. There are performance differences and print
management differences between IPDS and PCL printing.
Recommended
AFP Font Collection provides comprehensive libraries of AFP fonts for use in APU
applications. Standard document typefaces, such as Helvetica, Times New Roman,
and Courier, are included in over 48 languages. The font libraries are provided in
240 dpi (dots per inch), 300 dpi, and outline formats, corresponding to different
printer resolutions.
A note on Examples
The examples in this publication assume that you have read and write access
to the QAPU library and to the resources it contains. You may need to contact
your system administrator to get this authorization. If the QAPU resources
have been moved, you may also need to obtain the name of the locally
defined library name where these resources are stored.
Optional
AFP Utilities for iSeries consists of three utilities that complement APU
applications:
v Overlay Utility provides the capability to create electronic forms.
v Print Format Utility enables you to create quick, specialized applications, such
as bar coded labels.
v Resource Management Utility assists in managing overlay and image resources.
Client Access for iSeries, in addition to client/server support, integrates the AFP
Workbench into the Windows or OS/2 client. This provides full graphical viewing
of AFP documents, as well as the ability to search, print, and fax what is viewed.
In addition, the full AFP Workbench includes the IBM AFP Printer Driver forWindows. Use this standard Windows driver to create overlays and page segments
from any Windows application.
Non-IBM document product tools, of which many exist, assist you in creating
fonts, images, and overlays.
Initial APU Setup
APU provides for several levels of default print settings:
v At the APU level
v At the print definition level
v At the copy level
At these levels, you can set print attributes and environment attributes, such as
unit of measure, resource libraries, and default font family.
Note: You cannot set all attributes at all levels.
Use option 6 (Set APU Defaults) on the APU main menu to display the Set APU
Defaults panel, which is shown in Figure 6.
Note: Refer to “APU Defaults” on page 111 for some helpful hints on setting APU
The values that are shown above are the values APU will use unless they are
superseded at print definition level or copy level print definition or copy level. The
defaults selected in the example above are:
v Inches for unit of measure
v Helvetica for font family
v APUDATA as the library to store APU print definitions
v T1V10500 as the default code page (this is an international code page)
14APU User’s Guide
v For the Job description, we recommend that you use QYPUJOBD in the QAPU
library.
Two additional resource libraries, IMAGES and OVERLAYS, were also selected as
defaults because APU looks in these libraries for document resources, such as page
segments and overlays.
You can specify defaults when you first begin an APU print definition. This
display is shown in Figure 7.
Set Print Definition Attributes
Print Definition . . :SUPER2
Library ......:QAPU
Type choices, press Enter.
Unit of Measure .... *INCH*INCH, *CM, *ROWCOL, *UNITS
Default line increment*INPUT*INCH*INPUT, Value
Default column inc. . .*INPUT*INCH*INPUT, Value
Page length . . . . . .*INPUT*INCH*INPUT, Value
Page width ...... *INPUT*INCH*INPUT, Value
Top margin (down) . . .0*INCH0, Value
Left margin (across) .0*INCH0, Value
Page orientation . . .0*INPUT, 0, 90, 180, 270
Apply field attributes1=Yes
More...
F3=ExitF12=CancelF22=Set Units
Figure 7. Set Print Definition Attributes panel
Note: When you specify *INPUT for the Page orientation field, APU always
attempts to create the output in Portrait mode by default. APU attempts to
perform text rotation according to the values specified for the Page length
and Page width fields.
The print definition defaults add page layout attributes such as page size, line and
column increments, and margins.
The continuation of the panel is shown in Figure 8 on page 16:
Chapter 2. Preparing to Use the Advanced Print Utility15
Set Print Definition Attributes
Print Definition . . :SUPER2
Library . .....:QAPU
Type choices, press Enter.
Default font family . .*APUDFT*APUDFT, ValueF4 for List
Point size ..... *CALC*CALC, Value
Bold ........1=Yes
Italic . . . . . . .1=Yes
Default Color..... *APUDFT*APUDFT, ValueF4 for List
Addl. resource libs. .Name
F3=ExitF4=PromptF12=Cancel
Figure 8. Set Print Definition Attributes panel (Continued)
When you define a copy, you can specify print attributes at this level as well. You
can override print attributes or default to the attributes specified at the print
definition or APU level.
Font Installation Considerations
Name
Name
Name
Bottom
APU installation loads the APU software on to the iSeries and creates the QAPU
library. During the installation process, APU builds the font database. APU
provides a standard interface to the fonts on the system and must synchronize its
database with the actual fonts that are resident on the system.
If you are adding AFP fonts to your system while you are installing APU, you
should load the fonts prior to installing APU. If you add font libraries after
installing APU, you will need to synchronize the font database again. To do this,
issue the following command to run the synchronization program:
call qapu/qypusync
After APU is installed, you can access the APU Main Menu by entering GO
QAPU/APU.
Review Document Resource Requirements
APU creates complex electronic documents, combining many elements into each
completed page. The building blocks of these electronic pages are electronic
overlays, fonts, bar codes, and images (that are called page segments in AFP). The
example below, output from an invoicing application for the Super Sun Seeds
Company, illustrates those elements:
16APU User’s Guide
Figure 9. Super Sun Seeds Invoice
You will note the many characteristics that make this invoice an effective
document:
v Static sections of the page built into an overlay
v Company logo and accent image
v Use of a variety of fonts
v Use of bar coding — POSTNET for the zip code
The following sections use the Super Sun Seeds example to provide a close look at
the key resources that comprise APU electronic documents: how they are used on
the iSeries, how they are created, and how APU works with them.
Chapter 2. Preparing to Use the Advanced Print Utility17
Using Fonts with APU
The examples in the remainder of this manual use the fonts in the AFP Font
Collection. You should verify that you have these fonts available before going
on. Your results may differ depending on the fonts defined on your system.
APU provides an interface that makes selecting fonts simple. During installation,
APU determines which fonts (character sets) are on your system and loads them
into this interface. APU distinguishes between IBM-supplied fonts and your own
custom fonts.
Most common fonts are selected by font family, typeface (normal, bold, italic, and
combinations), and point size. This is how APU selects fonts for your document.
You can select fonts for constant text or for text from the application. The example
below shows how to map application data to a new font.
To follow the examples provided in the remaining sections of this chapter, you will
need a print definition and a sample spooled file.
v Refer to “Setting up a Basic Print Definition” on page 36 for instructions on how
to create a print definition you will call MYPRTDEF.
v Refer to “Further Defining the Print Definition” on page 38 for instructions on
how to select a sample spooled file called INVPRE.
Select option 12 (Work with...).
Select option 10 (Define) on the Work with Copies panel and then select Definefield mapping on the Define a Copy panel to have the Define Field Mapping
panel appear.
From the Define Field Mapping panel, use F14 to mark the beginning of the
“Improved Printing Corp.” field and F15 to mark the end of the field. Once you
have taken these two steps, the Select Function panel appears.