IBM S544-5351-03 User Manual

PrintSuite for iSeries
Advanced Print Utility User’s Guide
IBM
S544-5351-03
PrintSuite for iSeries
Advanced Print Utility User’s Guide
IBM
S544-5351-03
Note!
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)
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.
© Copyright International Business Machines Corporation 1996, 2002. All rights reserved.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents

Figures ...............v
Tables ...............vii
Purpose of this Publication ......ix
APU Enhancements ............ix
Organization of the Manual .........ix
Part 1. Understanding and Preparing
toUseAPU.............1
Chapter 1. Introducing Advanced Print
Utility................3
WhatisAPU?..............3
WhatYouCanDowithAPU.........3
WhyUseAPU?.............4
Printing with and without APU ........4
Printing without APU ..........4
Printing with APU ...........5
APU formatting instructions .........6
Steps in Creating an APU Document ......7
Step 1: Analyzing the Existing Application . . . 8
Step 2: Locating Required AFP Resources....9
Step 3: Using APU to Create a Print Definition . . 9
Step 4: Printing with the Print Definition . . . 10
Chapter 2. Preparing to Use the
Advanced Print Utility ........13
APU Prerequisites and Options........13
Required ..............13
Recommended ............13
Optional ..............13
Initial APU Setup ............14
Font Installation Considerations .......16
Review Document Resource Requirements ....16
Using Fonts with APU...........18
Outline Fonts.............20
Custom Fonts ............21
Image Resources.............24
How APU Works with Image Resources ....24
Building Image Resources ........26
Overlay Resources ............26
How APU Works with Overlays ......27
Building Overlay Resources ........29
Bar Code Resources ...........29
Code 3 of 9 Bar Code Example .......30
POSTNET (Postal Bar Code) Bar Code Example 30
How APU Works with Bar Codes ......30
Part 2. Creating Print Definitions
with APU .............33
Chapter 3. Building an APU Print Definition for a Single Page Format . . 35
Example of a Single-Page Format Document . . . 35
Example of the SCS File to be Formatted . . . 35
Example of the Formatted File .......36
Setting up a Basic Print Definition .......36
Identifying Resources ..........36
Working with a Print Definition ......37
Further Defining the Print Definition ......38
Working with Copies ...........40
Selecting a Sample Spooled File ......42
Page Layout Options ..........42
Defining Page Segments .........43
Defining Overlays ...........44
Mapping Field Data ...........45
Mapping a Field as Text .........47
Using the Repeat Function ........48
Mapping a Field at Multiple Locations ....49
Chapter 4. Building an APU Print Definition for Multiple Page Formats . . 51
Example of a Multiple Page Format Document . . 51 Overview of Defining a Multiple Page Format
Document ...............54
Initial Copy for Page Format One ......55
Continuation Page Format ........55
Working with a Print Definition .......55
Identifying Resources ..........55
Starting to Work on a Print Definition ....55
Developing Your Print Definition ......56
Defining Selection Fields .........59
Working with Copies ...........60
Defining the Page Layout.........61
Specifying the Back Overlay ........62
Mapping Fields .............63
Mapping Bar Codes ..........64
Defining Constant Data .........66
Selecting Fonts ............66
Defining Overlays ...........68
Replicating the Contents of Copies ......69
Continuation Page Copies .........71
Part 3. Printing With APU .....77
Chapter 5. Manual and Command Line
Printing with APU ..........79
Methods of Printing with APU ........79
Manually Associating a Print Definition with a
Spooled File ..............79
Panel 1: Apply Print Definition .......80
Panel 2: Apply Print Definition .......81
Panel 3: Apply Print Definition .......82
Using the Apply Print Definition Command . . . 82
© Copyright IBM Corp. 1996, 2002 iii
Chapter 6. Automatic Printing with APU
Monitor ..............83
Introduction to the APU Monitor .......83
Understanding How the APU Monitor Works . . . 83
An Example of APU Monitor Processing ....84
A Customer Environment.........84
Implementing the Customer Requirements on the
APU Monitor.............85
Condition of the Output Queue after Processing 86
Configuring APU Monitor .........87
Specifying the Queues APU is to Monitor . . . 88
Configuring APU Monitor Action ......89
Starting APU Monitor ...........97
Stopping APU Monitor ..........98
Part 4. Appendixes.........99
Appendix A. APU Samples......101
Appendix B. User Exits .......103
Processing Phases ............103
User Exit Before ............103
User Exit Middle ............104
User Exit After .............105
Sample User Exit Program .........106
Appendix C. APU Helpful Hints ....111
APYPRTDEF Command ..........111
APU Defaults .............111
Maximum APU Values ..........111
Print Definition Creation..........111
Mapping Data .............112
Copies and Page Formats .........112
Duplex ...............113
Creating Sample Spool Files ........113
Creating Your Own Copy of INVSCS ....113
Recreating INVPRE and INVSCS ......113
Appendix D. AFP Resource
Commands ............115
Creating Font Resources ..........115
Creating Overlay Resources ........116
Creating Page Segment Resources ......117
Appendix E. Rotation Hints .....121
Methods of Rotating Text Data .......121
General Rules .............121
Appendix F. Font Samples ......123
Times New Roman Medium ........123
Helvetica Roman Bold ..........124
Courier ...............125
Glossary .............127
Notices ..............133
Trademarks ..............133
Index ...............135
APU User’s Guide
iv

Figures

1. Flow of Data Through APU and OS/400 . . . 5
2. APU Data Structure ..........6
3. APU Concepts ............7
4. Steps to Creating a Document.......8
5. APU main menu panel.........10
6. Set APU Defaults panel ........14
7. Set Print Definition Attributes panel ....15
8. Set Print Definition Attributes panel
(Continued) ............16
9. Super Sun Seeds Invoice ........17
10. Select Field for Mapping panel ......18
11. Map Text panel ...........19
12. Select a Font panel ..........19
13. Map Text panel ...........20
14. Work with Fonts panel.........21
15. Work with Fonts panel.........22
16. Display Font Details on Work with Fonts panel 22
17. Request Addition of the Special Font ....23
18. Add the Special Font to APU ......23
19. Super Sun Seeds Logo .........24
20. Select a Page Segment panel .......25
21. Define Page Segments panel .......25
22. Super Sun Seeds Invoice ........27
23. Select an Overlay panel ........28
24. Define Overlay Positionings panel .....28
25. Page Layout Options - Copy Level .....29
26. Code 3 of 9 Bar Code Example ......30
27. POSTNET Bar Code Example ......30
28. Map Bar Code panel .........31
29. Select a Bar Code Type panel ......31
30. Additional Bar Code Attributes ......32
31. Super Sun Seeds Invoice ........36
32. APU Main Menu panel ........37
33. Work with Print Definitions panel .....37
34. Create a Print Definition panel ......38
35. Define a Print Definition panel ......39
36. Select a Sample Spooled File panel .....39
37. Set Print Definition Attributes panel 1....40
38. Set Print Definition Attributes panel 2....40
39. Work with Copies panel ........41
40. Define a Copy panel .........41
41. Set Page Layout Options panel ......42
42. Define Page Segment panel .......43
43. Create Page Segment Positioning panel 44
44. Define Overlay Positioning panel .....44
45. Create an Overlay Positioning panel ....45
46. Define Field Mapping panel .......45
47. Select Function display.........46
48. Map Text panel ...........47
49. Define Field Mapping Completed panel 47
50. Edit Text Mapping panel ........48
51. Repeat Function of Text Mapping panel 49
52. Repeat Function of Text Mapping panel 50
53. Mapping a Second Position panel .....50
54. Super Sun Seeds Invoice - Page 1 .....52
55. Super Sun Seeds Invoice - Page 2 .....53
56. Super Sun Seeds Invoice - Page 3 .....54
57. APU Main Menu Panel ........56
58. Create a Print Definition Panel ......56
59. Work with Multiple Page Formats panel 57
60. Further Define your Print Definition panel 57
61. Select a Sample Spooled File panel .....58
62. Set Print Definition Attributes (Screen 1) panel 58
63. Set Print Definition Attributes (panel 2) panel 59
64. Define Selection Fields panel.......59
65. Define Selection Field panel .......60
66. Define Selection Fields panel.......60
67. Work with Copies panel ........61
68. Define a Copy panel .........61
69. Set Page Layout Options panel ......62
70. Back Overlay (Terms and Conditions) -
INVBAC.............63
71. Define Field Mapping panel .......64
72. Map Bar Code panel .........65
73. Define Constants panel.........66
74. Create Constant Text panel .......66
75. Select a Font panel ..........67
76. Define Constants panel.........67
77. Define Overlays panel .........68
78. Sample INVALL Overlay ........68
79. Work with Copies panel ........69
80. Suppression panel ..........70
81. Repeating a Suppression panel ......70
82. Sample Packing List Showing Suppression 71
83. Work with Page Formats panel ......72
84. Work with Page Formats panel ......72
85. Create with Copies panel ........73
86. Define Selection Rules panel .......73
87. Define a Rule panel ..........74
88. Define a Rule panel ..........74
89. Define Selection Rules panel .......75
90. Select Spooled File ..........79
91. Apply Print Definition panel .......80
92. Apply Print Definition panel .......81
93. Apply Print Definition panel .......82
94. APU Monitor Processing Sequence.....84
95. APU Monitor before Processing ......85
96. APU Monitor - Action Example ......86
97. APU Monitor Example After Processing 86
98.APUMainMenu...........87
99. Work with APU Monitor ........88
100. Add a New Output Queue .......88
101. Configure APU Monitor Action panel ....89
102. Configure APU Monitor Action panel ....90
103. Define Selection for Input Spooled File panel 91
104. Define Action for Input Spooled File panel 92
105. Action Example for Two Locations .....93
106. Spooled File Location after Processing . . . 94
107. Define Action for Output Spooled File panel 95
108. Define Action for Output Spooled File panel 96
109. APU Main Menu panel ........97
110. Start APU Monitor panel ........97
© Copyright IBM Corp. 1996, 2002 v
111. Stop APU Monitor panel ........98
112. Create Temporary Resource File .....115
113. Copy From PC Document (CPYFRMPCD)
panel ..............115
114. Create Font Resource (CRTFNTRSC) panel 116
115. Create Temporary Resource File panel 116
116. Copying Overlay File from Folder ....117
117. Create Overlay (CRTOVL) panel .....117
118. Create Temporary Resource File .....118
119. Copy Page Segment to Temporary File 118
120. Create Page Segment (CRTPAGSEG) panel 118
121. Rotation Hints ...........121
122. Times New Roman Medium ......123
123. Helvetica Roman Bold ........124
124. Courier Font Samples .........125
vi APU User’s Guide

Tables

1. Field Mapping Values .........48
2. Samples in the QAPU Library ......101
3. APU Print Engine Processing Phases 103
4. Parameters Passed to the Before Initialization
User Exit .............103
5. Parameters Passed to the Middle User Exit 104
6. Parameters Passed to the User Exit After the AFPDS Spooled File has been Created . . . 105
© Copyright IBM Corp. 1996, 2002 vii
viii APU User’s Guide

Purpose of this Publication

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 iSeries Guide 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.
© Copyright IBM Corp. 1996, 2002 ix
x APU User’s Guide

Part 1. Understanding and Preparing to Use APU

Chapter 1. Introducing Advanced Print Utility ..3
WhatisAPU?..............3
WhatYouCanDowithAPU.........3
WhyUseAPU?.............4
Printing with and without APU ........4
Printing without APU ..........4
Printing with APU ...........5
The Design Phase...........5
The Production Phase .........6
APU formatting instructions .........6
Steps in Creating an APU Document ......7
Step 1: Analyzing the Existing Application . . . 8
Questions you need to Ask .......8
Example of Sample Spooled File (Source Input
Data) ...............8
Step 2: Locating Required AFP Resources....9
Step 3: Using APU to Create a Print Definition . . 9
Defining Page Formats ........10
Defining Copies ...........10
Step 4: Printing with the Print Definition . . . 10
Chapter 2. Preparing to Use the Advanced Print
Utility ................13
APU Prerequisites and Options........13
Required ..............13
Recommended ............13
Optional ..............13
Initial APU Setup ............14
Font Installation Considerations .......16
Review Document Resource Requirements ....16
Using Fonts with APU...........18
Outline Fonts.............20
Custom Fonts ............21
Image Resources.............24
How APU Works with Image Resources ....24
Building Image Resources ........26
Overlay Resources ............26
How APU Works with Overlays ......27
Building Overlay Resources ........29
Bar Code Resources ...........29
Code 3 of 9 Bar Code Example .......30
POSTNET (Postal Bar Code) Bar Code Example 30
How APU Works with Bar Codes ......30
© Copyright IBM Corp. 1996, 2002 1
2 APU User’s Guide

Chapter 1. Introducing Advanced Print Utility

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.
© Copyright IBM Corp. 1996, 2002 3

Why Use APU?

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 and PSF.

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
4 APU 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 Utility 5
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.
6 APU 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 Utility 7
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
8 APU 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 MUNDO SAME 32483 ARBOL LANE MESA VERDE IL 54078-9390
141 31341 1/26/98 2/26/98
900 EA 00001200 ARBOLES DEL SUR 45.00 40,500.00 951 CT 11005011 LASSO RED SEEDS 892.23 48,510.73
46 DZ 11005014 SCARLET NANTES SEEDS 5.90 271.40 45 BZ 11005015 CHANTENAY SEEDS 2.19 98.55
951 PK 11005018 EARLY BANTAM SEEDS .38 361.38
4 BX 11057893 AFRICAN DAISY, SEEDS 2.35 9.40
100 EA 31321655 SEMILLAS DEL SUS SOMBEROS 24.95 2,495.00
1000 BX 56413213 POT POT 7.65 7,650.00
98 PK 84512023 OREGON SPRING TOMATO SEED .97 95.06
1/26/98 N10 MICHELE 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 Utility 9
APU IBM 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=Exit F4=Prompt F9=Retrieve F12=Cancel F16=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.
10 APU 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 the APU 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 Utility 11
12 APU 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
© Copyright IBM Corp. 1996, 2002 13
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 for Windows. 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
defaults.
Set APU Defaults
Type choices, press Enter.
Unitofmeasure.... *INCH *INCH, *CM, *ROWCOL, *UNITS
Decimal point character . . or ,
Font family...... HELVETICA Value F4 for List
Color......... *DEFAULT *DEFAULT, Value F4 for List
Definition library . . QAPU Name
Code Page . ...... T1V10500 Name F4 for List
Addl. resource libs. . IMAGES Name
Job description . . . . QYPUJOBD Name
Library....... *LIBL Name, *LIBL
F3=Exit F4=Prompt F12=Cancel
Figure 6. Set APU Defaults panel
OVERLAYS Name
Name Name
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)
14 APU 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 *INCH 0, Value Left margin (across) . 0 *INCH 0, Value Page orientation . . . 0 *INPUT, 0, 90, 180, 270 Apply field attributes 1=Yes
More...
F3=Exit F12=Cancel F22=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 Utility 15
Set Print Definition Attributes
Print Definition . . : SUPER2
Library . .....: QAPU
Type choices, press Enter.
Default font family . . *APUDFT *APUDFT, Value F4 for List
Point size ..... *CALC *CALC, Value
Bold ........ 1=Yes
Italic . . . . . . . 1=Yes
Default Color..... *APUDFT *APUDFT, Value F4 for List
Addl. resource libs. . Name
F3=Exit F4=Prompt F12=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:
16 APU 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 Utility 17

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 Define field 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.
Define Field Mapping
Spooled file ....: INVPRE Page/Line......: 1/1
Control........ Columns . . . . . . . : 1 - 78
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
IMPROVED PRINTING CORP : Opt Function : PERFORMANCE BOULEVARD : : PRINTERSVILLE : 1 Map as Text : CO 45789-2637 : Map as Bar Code :
F3=Exit F11=Hide mapping : F12=Cancel : F15=End field F16=Delete range : :
Mark end of field, press F15 or press F :....................................:
......................................
: Select Function : :: : From Row / Column : 12 / 12 :
: Length......: 22 :
:: : Type option, press Enter. : : 1=Select : ::
: Suppress : ::
18 APU User’s Guide
Figure 10. Select Field for Mapping panel
Loading...
+ 124 hidden pages