The hardest thing about writing an article on the AFP Workbench Viewer is trying to define AFP (Advanced Function Presentation) itself. In IBM’s online Encyclopedia (http://as400.rochester. ibm.com/ENCYCL/afpprint.htm), AFP is described as “a document architecture, a printer dialog and datastream, and a process for fully system managing printing.” That definition is akin to describing chocolate ice cream as “a semi- solid frozen dairy product.” The lackluster description is technically correct, but it really doesn’t tell you very much. We’re left with the question: What exactly is AFP?
AFP is a process for taking the line-oriented printing produced by the AS/400 and converting it to the page-oriented printing that is the standard of most modern printers. In short, AFP spruces up AS/400 printing by allowing the use of special fonts and graphics.
This task is accomplished through the use of AFP resources, which are AS/400 print objects that are merged with an AS/400 spool file when it is printed. Although AFP resources are not actually contained in the spool file, the spool file contains references to these objects.
There are several different resources that can be used in AFP printing:
• Page Segments—Objects that contain graphic images, signature images, or special
• Overlays—Electronic forms that contain drawing elements such as lines, boxes, shading, and graphics (in the form of page segments)
• Fonts—Special characters that allow different type styles and sizes
• Forms Definitions—An AFP resource that specifies how the physical sheets of paper are processed by the printer
• Page Definitions—An AFP resource that specifies how the data should be positioned on the page
Creating AFP Documents
AFP documents can be created on your AS/400 through AS/400 DDS files. Keywords within the DDS files pull together the different AFP resources to produce the final document.
IBM has also packaged a collection of AFP tools under the name of AFP Utilities/400. AFP Utilities/400 is part of the AFP PrintSuite for AS/400, which is a
text
product for designing your own complex print applications. AFP PrintSuite for AS/400 can be purchased from the IBM Direct Web site (www.direct.ibm.com). Search under AFP.
AFP Utilities/400 contains all of the tools necessary to create AFP resources and documents from AS/400 spool data. Through AFP Utilities/400, spooled output can be rearranged and formatted without affecting the original application that produced the print job.
A description of both of these methods of generating AFP documents is contained in the IBM Redbook, IBM AS/400 Printing V (SG24-2160-00), which is available at www.redbooks.ibm.com. This manual also contains several DDS examples for AFP printing. Additional DDS samples can be downloaded from the IBM Printing Systems home page at www.printers.ibm.com.
The Client Access/400 AFP Workbench Viewer
The Client Access/400 AFP Workbench for Windows Viewer is included with Client Access for Windows 95/NT and the new AS/400 Client Access Express for Windows (Express client). In the past, a crippled version of the AFP Workbench Viewer that allowed a limited number of uses was shipped with Client Access. But with Client Access for Windows 95/NT V3R2 and above, IBM has modified its licensing to include a full-featured version of the AFP Workbench Viewer with each install.
The AFP Workbench Viewer is a fairly versatile tool. Straight out of the install, it allows you to view AFP, SNA Character Stream (SCS), and ASCII AS/400 spool files. It also provides the ability to view and create page segments and overlays. You can even view and send faxes and view graphics files in TIFF, PCX, DCX, DIB, and GIF formats. While I don’t have the space to cover all these options here, I’ll discuss a few of the more significant ones and how they can help you to print more efficiently on your AS/400 network.
Viewing Spool Files
While the paperless office is not yet a reality, we have made significant progress in the past decade to drastically cut down on the amount of paper we generate.
Electronic distribution of AS/400 reports is a good way to reduce paper clutter. The AFP Workbench Viewer is a useful tool in viewing and navigating through spooled reports.
If you want to view a spooled file using the AFP Workbench Viewer, you would do the following:
1. Select AS/400 Operations Navigator (OpsNav) from the IBM AS/400 Client Access Express menu. (This technique also works with Client Access for Windows 95/NT. The only difference is that OpsNav is found in the Accessories folder of the IBM AS/400 Client Access menu in the Windows 95/NT client.) In OpsNav, click the plus sign (+) to the left of the system name you want to work with to expand the OpsNav tree for that AS/400.
2. Click on the Basic Operations icon and select the Printer Output icon to display a list of all your AS/400 printer files that are available for viewing. Double-click on the spooled file you want to view and the AFP Workbench Viewer will launch, automatically displaying the viewer output.
Prior to version V3R7 of the OS/400 operating system, AFP resources had to be manually downloaded to the workstation in order to view an AFP document. Newer versions of OS/400 and Client Access automatically retrieve the necessary resources for you.
Viewing and Creating Overlays
Unless you have AFP Utilities/400, the easiest way to create overlays or page segments is with the AFP Workbench Viewer using the AFP Printer Drivers. The AFP Printer Drivers come with Client Access or you can download the drivers from IBM by going to the Printing Systems home page (www.printers.ibm.com). Click on the Tech Support button and select the Printer Driver link.
The following are the steps for creating and using an overlay in your AS/400 AFP document:
1. Using the AFP Workbench Viewer, open a graphic file that you would like to use as an overlay (e.g., a logo or digitized signature).
2. Click on File/Create Overlay. The Create Overlay dialog box will be displayed. You may click on Setup to change the attributes of the overlay. Name the overlay and save it to a local drive. (I’ll call it OVL.OLY.)
3. Transfer the overlay file you just created to a shared folder on the AS/400. (I will use the folder called MYFLR.)
4. Create a physical file on the AS/400 to receive the overlay resource. Use the Create Physical File command as follows:
CRTPF FILE(MYLIB/MYFILE) + RCDLEN(32766) LVLCHK(*NO)
5. Copy the overlay file from the AS/400 folder to the file you just created using the Copy From PC Document (CPYFRMPCD) command:
CPYFRMPCD FROMFLR(MYFLR) + TOFILE(MYLIB/MYFILE) +
FROMDOC(OVL.OLY) TRNTBL(*NONE)
6. Now, create the overlay resource MYOVL with the Create Overlay command:
CRTOVL OVL(MYLIB/MYOVL) + FILE(MYLIB/MYFILE) MBR(MYFILE) TEXT(‘My First
Overlay’)
If you create a lot of overlays, you can save time by creating your own custom command to include all of the above AS/400 commands.
Overlays can be merged with AS/400 output by using the Override with Printer File (OVRPRTF) command. (See Figure 1.) Place the Overlay (MYOVL) name and Library (MYLIB) in the Front side overlay (FRONTOVL) or Back side overlay (BACKOVL) parameters, depending on whether your overlay appears on the front or back of your printed page. These parameters are followed by offset parameters for positioning the overlay on your page.
Fax Support
If your AS/400 is equipped with an integrated fax adapter and fax software, like IBM’s Facsimile Support/400, faxes may be viewed or sent through the AFP Workbench Viewer. You can also fax a document from the AFP Workbench Viewer if your PC is equipped with a fax driver. Click on File/Printer Setup and choose your fax driver from the list of available printers, then click on File/Print to fax the document.
AFP Workbench Viewer via Internet
A free Internet viewer plug-in is available for downloading from IBM by going to the IBM home page (www.ibm.com). Search using AFP in the downloads area. This plug- in allows you to view and navigate through AFP documents using your Netscape Navigator or Microsoft Internet Explorer browsers.
The IBM AFP Workbench Viewer is a versatile tool, allowing a wide range of functions in your AS/400 printing environment. You can view, navigate, and fax documents, spooled files, and graphics. The AFP Workbench Viewer allows you to save money by creating your own electronic forms utilizing AFP resources that you created. You may even find uses for the AFP Workbench Viewer in your work environment that I didn’t cover here. The best thing about the AFP Workbench Viewer is that it’s free, so feel free to try it out. What have you got to lose?
Related Reading
IBM AS/400 Printing V, Redbook (SG24-2160-00)
Related URLs
IBM’s Redbooks page: www.redbooks. ibm.com IBM’s Printing Systems home page: www.printers.ibm.com IBM Home page: www.ibm.com
Figure 1: You can merge overlays with your AS/400 output by using the Front and Back side overlay parameters on the Override with Printer File (OVRPRTF) command.
LATEST COMMENTS
MC Press Online