Richard D. Huelbig Senior Advanced Technology Specialist Network Solution Center Ricoh Corporation 2
3
Contents
Section Page Number
Printing Basics 5 Overview 5 How An AS/400 Handles A Print Job 7 What Are SCS Printing, AFP Printing, And IPDS Printing 8 Printing Methodologies 10 The Host Transform Setting 11 Using An Output Queue Or A Printer Device 11
Configuring And Printing From An Output Queue 12
Configuring And Printing From A Printer Device 20
Testing The Printing Configuration 33
Messages And Responses 38
Output Queue And Printer Device Quick Setup Guide 40
Ricoh Port Numbers, The DIPRINT Command, 41 And Device Queues
Resource Material 43
Trademarks 44 4
5
1. Printing Basics
a. Overview
This paper is designed to provide an introduction to some of the concepts related to printing in an AS/400 environment. Since many volumes have been written, explaining in detail, all aspects of AS/400 printing, it is the intent of this paper only to synopsize some of those key areas. For more in depth research it is recommended that the reader refer to the list of supporting materials at the end of this paper.
An understanding of AS/400 printing requires knowledge of many new terms, definitions, and concepts. Some of these concepts and terms may be familiar to personal computer users; for example, someone familiar with how PCs use print spools and queues will find a bit of similarity with those terms when used in the context of an AS/400. However, terms such as AFP, IPDS, SCS, and others, will be unfamiliar to most people, and really should be understood to get a full feel for the capabilities of an AS/400.
To start with, let's look at some definitions. The following definitions are those used by IBM in the OS/400 Printer Device Programming V4R5 manual.
Spooled File A file that holds output data waiting to be printed. A spooled file is usually the result of a system program or application program being run, or the PRINT key being pressed.
Output Queue An output queue is an OS/400 object that contains a list of spooled files to be printed. Output queues can receive spooled files from more than one application program and more than one user.
6
Printer Writer A function of the operating system that writes (sends) the spooled file from the output queue to a printer. In most cases the application program sends the spooled file to an output queue first. Then the printer writer sends it to a printer.
Remote Writer A function of the operating system that writes (sends) the spooled file from an output queue to another system. The other system is usually connected through a communications line.
Print Devices The physical printers that can be attached to the AS/400 system. Print devices (printers) should not be confused with the printer writer program or printer files.
Printer Files Printer files are files that describe how the system is to operate on data as it passes between a program and a printer. A printer file has many parameters. The spooling parameter (SPOOL) determines if the output goes to an output queue or directly to a printer. The device (DEV) parameter is the name of the printer the output is printed on. The output queue (OUTQ) parameter is the name of the output queue that spooled files are sent to.
J ob Description A system object that defines how a job is to be processed. A job description has many parameters. Printer device (PRTDEV) and output queue (OUTQ) are the two parameters that help determine where output will go.
User Profile An object with a unique name that contains the user's password, the list of special authorities assigned to a user, and the objects the user owns. A user profile has many parameters. Printer device (PRTDEV) and output queue 7
(OUTQ) help determine where output will go.
System Values Values that control information for operating certain parts of the system. Administrators can change system values to redefine a working environment. The system value most important to printing is the default system printer.
Messages Responses from the system to a user of the system.
b. How An AS/400 Handles A Print Job
A representation of how the various OS/400 components function together to print a job can be found in the following diagram.
Clearly, the way that a job gets printed is that is starts by being created by the system, by an application program, or by the user pressing the PRINT key on the console key board. After the job is initiated, it is "compared" to information residing in the printer file where any special processing or routing requirements will be applied. Next, the job is placed in the output queue as a spooled file; many other spooled jobs may also reside in the output queue waiting for a specific printer. Note that the use of spooled files is an important concept, also found in many network and PC printing architectures. Spooling allows a file to be stored as spooled data within an output queue so that it can be processed either immediately or at a later time. In addition, spooling a file "frees up" a user's workstation, it permits a user to send a print job even though a physical printer is not immediately available, and it facilitates the use of special forms. Now comes the part of the writer. As jobs are printed, the writer retrieves new jobs from the output queue and sends them to the printer--in general, this process is a FIFO (first- in- first-out) process. And finally, as the writer is pulling jobs from the output queue and sending them to the printer, the device description plays a role in defining the characteristics of the destination printer.
For those familiar with Novell's NetWare, think of this process as similar to the way that Novell printer, print server, and print queue objects function. In NetWare, the print server object may be thought of as analogous to the OS/400 writer, the print queue object functions like the OS/400's output queue, and the Novell printer provides device and connection information comparable to the OS/400's device description.
c. What Are SCS Printing, AFP Printing, and IPDS Printing
The AS/400 has evolved over the years to support many different types of printers and the various accompanying printer data streams. Some of the common data streams include SCS (SNA Character String), AFP (Advanced Function Printing), and IPDS (Intelligent Printer Data Stream). The different types of data, and the different types of equipment that support the data types, each have their own characteristics. For example, the SCS data stream has a limited number of 9
commands and therefore a limited number of formatting capabilities, whereas IPDS supports a complex set of commands. And so, it follows, that SCS printers can only provide a small set of printing features, while IPDS printers can produce richly formatted, and complicated output.
The relatively simple SCS data stream is primarily used by line printers and it supports features such as underscores, overstrikes, partial line spacing, margins, super- and sub-script text, and some symbols. On the other hand, the AFP print data stream, which is a "companion" data stream to IPDS, includes both data and text to support objects such as forms, overlays, page segments, and fonts. The AFP data stream offers the advantage of being device independent and portable across various computing environments. And, in general, printers that support the IPDS data stream also support AFP data.
An example of a printed sheet using IPDS/AFP printing is shown in the following illustration.
10
Like AFP, the IPDS data stream provides support for both data and text, and allows the use of fonts, page overlays, and forms. Additionally, the IPDS data stream supports bi-directional communication between the print writer (the OS/400 object) and the printer hardware. Information that can be passed between the AS/400 and the printer includes: page development, job status, printer information, error reporting, error recovery data, and resource (i.e. font, image, and overlay) management.
d. Printing Methodologies
While one can always purchase printers that support the IPDS/AFP data streams, this may not always be the most cost-effective or feasible solution to obtaining high-quality output. Frequently, corporations use many different computing platforms and network operating systems, and it is not always possible to invest in new equipment every time a new NOS or computer comes along. Often companies must use existing equipment for multiple purposes, and across many computing environments.
AFP printing features are ordered and licensed separately from the base OS/400 operating system; the product that provides these components is called Print Services Facility/400. In other words, whenever AFP print layout features are required, PSF/400 must be installed. And of course, the printer that will be used with the AS/400 must be IPDS/AFP capable. (Note that if the printer is an AFP- capable printer, the AFP parameter in the OS/400 printing objects must be set to "*YES".) If the printer is not AFP-capable the IPDS data stream will be used without full implementation of AFP features.
Since implementation of AFP and IPDS can be expensive, alternate methods of printing are available, where output similar to that provided by IPDS/AFP, can be obtained with existing, non-IPDS/AFP printers. One way to connect a non-IPDS printer to an AS/400, and use the IPDS data stream, is to use an external IPDS controller. Or, to provide the formatting capabilities found with AFP, third-party OMS (Output Management Software) can be run on the AS/400. In either case, 11
standard ASCII printers can be used with the AS/400 to attain quality output
e. The Host Transform Setting
For users who do not need all of the advanced features of AFP and/or IPDS printing, it is possible to print AS/400 data on a standard ASCII printer; this can be done without any additional hardware or software. In the AS/400, ASCII printing is accomplished by converting AFP or SCS data streams to their ASCII equivalents. And, the ASCII printers may be connected to the AS/400 in any of number of ways. For example, ASCII printers may be connected to an AS/400 through workstation Twinaxial connections, through LAN attachments, or through attachments on displays or personal computers. One can easily see, that since the two most common implementations of ASCII printing are through the use of PostScript and PCL page description languages, most printers found in today's office environments can be used as AS/400 output devices.
f. Using An Output Queue Or A Printer Device
Perhaps the most daunting features of the AS/400's operating system are the many screens and data fields that an administrator must be familiar with; however, configuring an AS/400 to print to an ASCII printer is a relatively easy task.
AS/400 printing can be accomplished through the use of the CRTOUTQ command (creates an output queue) or the CRTDEVPRT command (creates a printer device description). The end result of either command is that the AS/400 will be ready to send output to a printer. The difference between the two methods is that the CRTOUTQ command creates and configures an output queue whereby a device using TCP/IP can be printed to using the device's IP address and the device's internal queue name; and the CRTDEVPRT creates and configures a printer device description that permits printing to a TCP/IP address and a port number.
Both procedures create print writer objects and output queues. The CRTDEVPRT 12
function also creates a printer device description, and it is within the device description that the printer port and TCP/IP address are specified. When using the CRTOUTQ method, the output queue is the object that contains the printer's IP address and queue name (not to be confused with the OS/400's output queue).
The use of CRTDEVPRT is the preferred way of configuring an AS/400.
2. Configuring And Printing From An Output Queue
The OS/400 CRTOUTQ command creates an output queue with a user-defined name. In addition, a print writer object will be created that has the same name as the output queue. What will not be created in this process is a printer device description; all of the print path information will instead be contained in the description of the output queue.
To start the output queue creation, simply enter the command CRTOUTQ on the command line and then press the ENTER key. The screen that follows is the first of several that allow the entry of the output queue characteristics. Note, as with other screens, the title of the screen includes 13
the command name in parentheses. In this case, the title of the screen "Create Output Queue", is followed by the associated command name.
Several items are of interest on the "Create Output Queue" screen. First is the statement at the bottom of the screen that states "Parameter OUTQ required".
This notice advises the operator that in order to complete the output queue creation, the OUTQ parameter (the output queue name) must be entered into the appropriate input field. This field, to the right of is highlighted by the operating system.
Enter the name of the queue to be created in the data field. In addition, the library in which the queue is to be created can also be specified. The default entry for the library is "*CURLIB"--the queue will be created in the current library. 14
In addition to the queue name and library entries, the other field of importance on this screen is the remote system name, which by default is set to "*NONE". This field needs to be changed to indicate that the remote system is addressed through a network. Enter "*INTNETADR" into this field and then press the ENTER key. Additional lines, and one new input field, will appear at the bottom of the screen. The new input area "Remote printer queue", must be supplied with the printer's queue name. Do not confuse this queue name with an OS/400 queue object name (i.e. an output queue name or a message queue name). Nor should this be mistaken for a Windows printer queue name or a Novell print queue name. The 15
remote printer queue name requested here is the queue that is "internal" to the printing device. Printing device queue names are specific to the device. For example, Ricoh printer queue names are different than queue names of other manufacturers' devices. Ricoh's printers and multifunction machines use queue names of "lp" or "PORT1" depending on the model. Some printers use the queue name "lpr"; and others use names such as "print", "hold", "direct", "pass", and so on. To find out which queue name is used by a particular device, it is best to refer to the operator's guide, or contact the manufacturer's technical support department.
In this example, the Aficio 1045's queue name is "lp". Enter this on the appropriate line, enclosing the "lp" in single quotations marks ('). Note that the use of single quotation marks is found in several areas of the OS/400; one of these areas is the designation of an IP address. For example, when the PING command is entered at the command line, the IP address must be enclosed in single quotes (i.e. PING '10.10.20.39'). Since the word "More" is displayed in the lower right- hand corner of the display, press the PAGE DOWN key to view the lower portion of the display that is "below" the viewing area. In other words, use the PAGE DOWN key to scroll to 16
the next page. Notice that "More" has changed to "Bottom"; this means that, with the set of parameters now in the displayed input areas, there is nothing "below" the area now displayed. If, however, some data is entered into one of the input fields, and that data requires additional information be provided to the system, new fields may be displayed, and the "Bottom" indicator may once again change to "More".
To continue the configuration of the Aficio 1045 output queue, enter the following information:
Writers To AutoStart Change to "1" Connection Type Change to "*IP" Destination Type Change to "*OTHER"
The other fields, "Queue for writer messages" and "Library" may remain as the defaults, unless of course, the administrator would like messages related to the writer to be placed in a different message queue within a different library. When the data has been entered, press the ENTER key. Note that something interesting happens. A new parameter, the "Host print 17
transform" parameter must be specified. Enter "*YES" for this field. Remember, the host print transform function allows the OS/400 to convert AFP or SCS data streams into ASCII data streams that can be printed by an ASCII printer. After entering "*YES" into the field, press the ENTER key.
Now, with the parameters specified above, the system "knows" that it needs more information in order to create the output queue. New fields are displayed, and the word "Bottom" has changed to "More". The important fields on this screen are "Manufacturer type and model", "Internet address", and "Print separator page". Keep in mind that the F4 key will provide a list of suggestions for most data fields in which the cursor is placed. For example, place the cursor in the first important field, the field to the right of "Manufacturer type and model". Now press the F4 key. A list of possible printer types and models will be displayed. One of these printers may be selected for this entry area. To create the Aficio 1045 queue, select "*HP5SI". Since not every printer is listed by the OS, the system operator will have to select the closest match, or the printer that most closely emulates the actual model. While this suits most needs, items such as one-to-one tray mapping and product-specific features and functions may not be fully supported.
Enter the appropriate IP address into the "Internet address" field, and enter "*NO" 18
for the "Print separator page" (if a separator page is needed between jobs, select "*YES"). Now use the PAGE DOWN key to view the additional parameters below those presently displayed.
The only item left to enter is the description of the output queue. Enter whatever name is desired into the "Text 'description'" field. Press the ENTER key when complete. The next screen that will appear is the "AS/400 Main Menu". The item to note on this screen is the message just above the status line. "Object AF1045 type *OUTQ created in library QGPL" tells the user that the output queue has been successfully created. It also advises of the location of the queue, the library named QGPL.
19
Now that the output queue has been created, to configure the system to send jobs to that output queue, and in turn to the specified printer, enter the command CHGOUTQ (stands for "Change Output Queue") on the command line. The "AS/400 Main Menu", and its command line, are displayed here, but a command line on any screen can be used. Press the ENTER key after the command is typed. A new screen appears that lets the user select the output queue and the name of the library in which the output queue resides. Since it is possible to have queues with the same name in several different libraries, the system provides the library entry area where the actual location of an output queue can be specified. Simply type in the name of the output queue and, if appropriate, the name of the library. Press the ENTER key when complete.
Some new lines will be displayed. The only input area among these new lines is the "Order of files on queue" area. Here, one can specify the order in which files are placed in the output queue. Generally, this parameter is left at the default, "*FIFO", which is a common abbreviation for "First-In-First-Out". This means that the first file placed in the output queue will be the first printed (i.e. files are 20
printed in the order they are placed in the queue). If the FIFO processing order is acceptable, press the ENTER key. The AS/400 is now ready to send jobs to the printer located at the designated IP address; and specifically, the jobs will be sent to the specified queue located at that address.
3. Configuring And Printing From A Printer Device
Configuring an AS/400 to use a printer device is no more difficult than configuring the computer to use an output queue. In fact, when creating the printer device, both an output queue, and a print writer are created with the same name as the printer device (unless specified otherwise). The difference between an output queue print setup and a printer device print setup is that when creating an output queue, the "direction", or "route" that a print job will take to the printer, consists of a printer's IP address and a printer queue name, both of which are programmed into the output queue. When using a printer device, the data route is dictated by what is programmed into the printer device description, and this consists of the printer's IP address and the printer's port number (as opposed to the printer's queue name). Remember, one object prints to the printer device queue name, the other object prints to the printer's port number. For those familiar with 21
configuring printing on Windows NT or Windows 2000 servers, an analogy might be found by comparing the OS/400's output queue print method to the Windows LPR print method (both print to a device queue name), and the OS/400's printer device print method to the Windows "RAW" print method (both use the printer's port number).
To create the printer device description and the associated writer and queue, start by entering the command CRTDEVPRT on the command line. CRTDEVPRT is the OS/400 command that stands for "Create Device Printer". Press the ENTER key after the command is entered. The next screen, like many others, will have a title, in this case "Create Device Desc (Printer)", and next to the title, the command name. Observe the word "Printer" in parentheses; this indicates that the device description that will be configured, is for a printer. Many other types of device descriptions can be configured on an AS/400. For example, a line device description is used to describe the characteristics of a communications line. For now, however, the only device description that the administrator need concern themselves with is the printer device description.
The first three lines on the screen allow entry of the "Device description" (the 22
name), the "Device class", the "Device type", and the "Device model". To create a device description for an Aficio 1045, the administrator would enter the values shown. The device class can be considered as the type of connection that will be used to communicate with the device. In this example, "*LAN" is the specified type because the connection to the ASCII printer will be through a local area network. If the printer were connected via a local port, or a remote port, the device class might be changed to "*LCL" or "*RMT". Again, placing the cursor in the input field, and pressing the F4 key, will display a list of possible entries (a few of which are usually listed to the right of the entry field).
Select "3812" as the device type. The IBM 3812 is a specific type of a printer. When printing to an ASCII device, this is the most common entry for this field. And, associated with the device type, is the device model. Here, the model is entered as "1". An IBM 3812 printer supports both IPDS and non-IPDS printing. If the device model were entered as "0", the OS would assume that the printer were an IPDS-capable printer. By specifying "1", the system sends data as if it is communicating with a non-IPDS-capable printer.
23
When these three entries have been completed, press the ENTER key and additional input fields will be displayed. Among the new parameters, the key items are "LAN attachment", "Port number", and "Font: Identifier". Recommended entries for these fields are shown in the sample screen. The "LAN attachment" field allows an administrator to specify the protocol used for the LAN connection. Here, "*IP" is selected because the printer will communicate with the AS/400 using TCP/IP. The "Port number" field contains very important information; this field configures the OS/400 printer device to use a specific port number, at the designated IP address, that will be used by the printer for bi-directional printing. While most printers use port 9100, it is suggested that the printer documentation be consulted to ensure that the correct port is entered; a common problem is to configure everything else correctly, but have an incorrect, or no, port entry supplied. Without the port number the AS/400 can not print to the printer.
The "Font: Identifier" entry allows an operator to specify which font will be used by the printer. The number entered here applies to IPDS printers and it designates a font through the use of a global font identifier number. A list of available fonts is usually provided with the printer, or it may be obtained by using the printer's 24
configuration/setup menu. Note that the font identifier of "11" is entered in the example, however, selection of a font will have no effect when using an ASCII printer.
The last item of concern on this page is the "Form feed" parameter. As with most other data fields, if the cursor is placed in the input field, and the F4 key is pressed, a list of available entries will be displayed. For the "Form feed" parameter, possible choices are "*TYPE", "*CONT", "*CONT2", "*CUT", and "*AUTOCUT".
The selection made depends upon the type of paper in use and the paper feed mechanism. For most printers that use standard letter and legal paper, already cut to size, select "*AUTOCUT". Observe that upon returning from the F4's "prompt", the entry will appear in its place on the screen. Press the ENTER key to continue and a new set of screens will be presented. In 25
reality, these are not new screens, they are "continuations" of the "Create Device Desc (Printer)" screen. The reason that they were not displayed previously is that they were not necessary based upon the data that existed in the fields. As soon as the fields were filled in, or modified, the operating system realized that it needed more information, and in turn provided screens where the additional information could be supplied. The major items on these screens include "Inactivity timer", "Host print transform", "Manufacturer type and model", "Paper source 1", and "Paper source 2". Refer to the following screen for the recommended entries. Now notice that the word "More" appears in the lower right-hand corner. This indicates that by using the PAGE DOWN key an operator can scroll to the "next" screen, where two of the most important parameters are found.
26
The first input field allows the entry of the printer's IP address. Note that single quotation marks (') are placed around the address. Here "'10.10.10.200'"has been typed as the "Remote location: Name or address". The second important field is the "System driver program". The F4 key will display available options; however, for most ASCII printers, enter "*HPPJLDRV" into this field. And lastly, a text description of the printer device can be added into the field at the bottom of the screen. When all of the entries are complete, press the ENTER key. The printer device description, output queue, and writer will be automatically created.
Before sending output to a printer it is important to ensure that all of the objects associated with the printer device description are enabled. Enter the command WRKCFGSTS at the command line and press the ENTER key. Remember that previously this command was used to "activate" a TCP/IP interface? Now, WRKCFGSTS will be used to "activate" a printer device. The screen that appears next will ask for the "Type" of object that will have its status changed. Enter "*DEV" (for "Device") in the "Type" input field. Enter the name assigned to the printer device description in the field to the right of "Configuration description". Press the ENTER key. 27
The next three fields for "Output", "Range", and "Status" can be left at their default values. Press the ENTER key. Now, another "Work with Configuration Status" screen is displayed. Observe the name of the printer device description, and its status. The status of the device is "Varied Off", or disabled. Before any printing can occur, the device must be activated. Do this by typing the number "1" in the input field below the word "Opt". Note that at the top of the display, the list of options defines "1" as the option to vary an object on. 28
Press the ENTER key after entering the number on the input field. Observe the following: 1) the status has now changed to "Varied On", and 2) a message appears in the lower portion of the screen stating "Vary on completed for device AF1045". So far, so good. Now that this has been completed successfully it's necessary to actually "start" the printer device object. To start the printer device object, simply return to command line by pressing the F3 key, and enter the command GO PRINTER.
The "Printer" screen will now appear. Note the menu name "PRINTER" in the upper left-hand corner. The menu name is the "PRINTER" part of the GO PRINTER command. 29
Enter the number "2" on the command line. This corresponds with the menu choice of "Work with printers".
Press the ENTER key. Now the "Work with Printers" screen is displayed. Here, the printer device created earlier, and varied on in the previous procedure, is showing a status of "Stopped". Unless the printer is started, no printing can occur. 30
The screen also gives the operator a "hint" as to what to do in this case. Notice the statement "use Opt 1" to the right of the word "Stopped"? The OS/400 is "telling" the operator, that to start the printer, option number 1 must be selected. So, follow the hint and type a "1" in the input field below the "Opt" heading. Press the ENTER key. The next screen to appear is displayed below. At this screen, again press the ENTER key. The screen now displayed has three items worth noticing. First, the status of the printer has changed from "Stopped" to "Attempting to start". Second, the message at the bottom of the screen states "Attempting to start printer AF1045", and third, another hint ("use F5") appears 31
to the right of the status message. If the F5 key is pressed, the screen will refresh, and the display will show either "Ready for printing" or "Message waiting (use Opt 7)".
If the status is "Ready for printing" that's all there is to it. The printer device will now send jobs to a connected network printer. If, on the other hand, the status "Message waiting (use Opt 7)" appears, either the printer or the AS/400 configuration requires attention before printing can start. To view the message, enter "7" on the input field below "Opt",
and press the ENTER key. The next screen is the message screen. Information on message screens provides valuable help. For one thing, the message screen will provide a full text version of the error or condition that requires correcting. In the 32
example, the text states that the "Remote device rejected an attempt by the writer to open a connection". A message ID is also provided. This ID becomes very useful during troubleshooting, or if a call to IBM is required. Also, the system will list potential causes. For message ID CPD337F, the possible causes include an incorrect port number or IP address, a potentially "busy" printer, or a printer that is not ready to print. In addition to a list of possible causes, the system provides some suggestions as to how to recover from the problem. The recommendations in this example include checking the port number and IP address, starting a print writer, and making sure that the printer is available and ready to print. The following two screens provide both "pages" of "Additional Message Information" for message ID CPD337F.
33
After reviewing the information in the message, press the ENTER key to continue. Make any changes necessary to "clear" the problem, and printing will either continue automatically, or the process may have to be repeated. In either case, after the problem is fixed, no more messages should appear and printing should be successful.
4. Testing The Printing Configuration
While configuring either an output queue or a printer device description appears simple, the real test is to send jobs to either object and create some output. An easy way to confirm that the output queue or printer device is functioning is to tell the OS/400 to print the system information reports, and manually re-direct one of the reports from the default output queue to the newly created output queue or the device description. The following steps show how this can be done.
First, enter the command PRTSYSINF on the command line and press the ENTER key. The PRTSYSINF command prints a series of system information reports to the OS/400's default output queue. 34
As the command is processing, an "X" will appear on the status line, indicting that keyboard input is inhibited, and descriptions of the various information files will be displayed just above the status line.
And, when the reports have all been dumped into the default output queue, the command line will clear, and the message "System information printed successfully" will appear above the status line. Enter the command WRKOUTQ on the command line, to display the "Work with All Output Queues" screen, and press the ENTER key. The display should now look like this: 35
Notice the number of files in the QPRINT output queue. The QPRINT output queue is the system's default output queue, and the 91 files are the reports that were just created. One of those reports must now be manually moved to the new output queue or printer device to test the new object. To do this, enter the number "5" on the input field to the left of the QPRINT queue name. This will allow the operator to work with the jobs in the queue.
Press the ENTER key after typing the "5". The next screen, "Work with Output Queue" lists all of the jobs in the QPRINT output queue. Note the name of the queue in the upper left-hand corner. 36
Each of the jobs in the "File" column represents a different system information report. In addition, the number in the "Pages" column tells the user the number of pages in the report. To select a job, and re-direct it from the QPRINT output queue to the new object, enter the number "2", for "Change" in the input field to the left of the file name. Here the number "2" was placed next to the QSYSPRT report that contains 3 pages. Press the ENTER key after typing the number.
The screen displayed next is the "Change Spooled File Attributes (CHGSPLFA)" screen. Note the command name, CHGSPLFA. This command could have been entered at a command line to bring the operator immediately to this screen. Here, the characteristics of the spooled file can be modified, and the two key areas of concern are the "Printer" parameter and the "Output queue" parameter. Changing one of these will re-direct the spooled file into either a new output queue or a new printer device description. 37
If the object that is to be tested is a printer device description, enter the name of the device description into the input field for "Printer". Here, the printer device name is "AF1045", and it is entered on the line to replace "*OUTQ". After entering the name of the printer device, press the ENTER key and the output will be processed by the new printer device description.
38
If, however, the object to be tested is an output queue, simply enter the name of the new queue on the "Output queue" line to replace the default value of "QPRINT". After typing the queue name, press the ENTER key and the job will be re-directed to the new queue, and then sent to the printer.
5. Messages And Responses
In addition to the message CPD337F described in the previous section, one of the most common messages is that which notifies an operator that a required form type is needed on the printer. This message, ID CPA3394, is displayed below, and in addition to the ID, and a list of possible causes, the OS/400 lists possible "responses". Unlike the previous message, where an operator is prompted to check the printer or the OS/400 configuration, this message not only prompts for action, it allows the operator to tell the system what action it (the system) should take next. For example, message CPA3394 asks the operator to load the correct form type, and/or allows the operator to tell the computer to continue processing, ignore the form request, cancel the print job, or retry the job without any changes. The action that the operator chooses for the system is entered as a response on the 39
"Reply" line. For this message, the typical reply is "G" (begin processing the current file after loading the form type). After entering the letter "G" on the "Reply" line, the job should continue to print; if not, check the printer to ensure that it is supplied with the correct paper.
Two other common messages include message IDs CPA403D and CPA3387. CPA3387 identifies the printer as the source of the problem and recommends checking that the device is powered on or varied on. The possible replies for this message include "R" to retry printing, or "C' to cancel the job. Message ID CPA403D is a bit more generic than CPA3387. CPA403D simply states that a problem exists with the printer, and suggests that the printer configuration be checked. Valid replies for CPA403D also include "R" to retry, and "C" to cancel.
While the OS/400 can generate hundreds of messages, those described here are the most common that one might encounter during printing.
40
6. Output Queue And Printer Device Quick Setup Guide
The following lists provide a quick reference guide to configure the AS/400 for printer device description and output queue printing.
Output Queue Printing OS/400 Command CRTOUTQ Output Queue Name of printer (e.g. AF1045, AP4510) Remote System *INTNETADR Remote Printer Queue Printer's internal queue name (e.g. PORT1) Writers To AutoStart 1 Connection Type *IP Destination Type *OTHER Host Print Transform *YES Manufacturer Type And Model *HP5SI (select best emulation for printer) Internet Address Printer's IP address in single quotes (') Print Selection Page *NO Text Description Description of the output queue or printer
Printer Device Description Printing OS/400 Command CRTDEVPRT Device Description Name of printer (e.g. AF1045, AP4510) Device Class *LAN Device Type 3812 Device Model 1 LAN Attachment *IP Port Number Printer's port number (usually 9100) Font Identifier 11 Form Feed *AUTOCUT Inactivity Timer *SEC15 Host Print Transform *YES Manufacturer Type And Model *HP5SI (select best emulation for printer) Paper Source 1 *LETTER 41
Paper Source 2 *LETTER Remote Location Name Or Address Printer's IP address in single quotes (') System Driver Program *HPPJLDRV Text Description Description of the printer device
Note: The parameters specified provide a general configuration that will allow printing to an ASCII printer. Most of the input fields have multiple possible values. Remember that each network and installation is different; therefore, it is important to consult with the site's network and AS/400 administrators to get the best possible printing results.
7. Ricoh Port Numbers, The DIPRINT Command, And Device Queues
TCP/IP ports numbers are addresses that define a specific application associated with the data transferred using the TCP/IP protocol. Typical TCP/IP port numbers include port 21 for the FTP application, port 23 for TELNET, port 25 for SMTP (Simple Mail Transfer Protocol), and port 80 for HTTP. Most printers, however, use port 9100 as the address of the internal application that processes print data.
Printing through an OS/400 printer device description requires the definition of a TCP/IP port, both in the device description and at the printer. Configuration of the port number in the device description was described in section 8--the procedure for doing so is consistent from one AS/400 to another. However, the process of configuring and enabling port 9100 on a printer may vary from one device to another.
Many printers are configured at the factory with port 9100 printing enabled. Other printers use port 9100, but the port must be enabled before any printing can occur. Still other printers require that the port number be specified and the port enabled. If either the port number is not specified correctly, or the port is not enabled, "RAW" TCP/IP printing to a port can not occur.
Ricoh's printers can be placed in two categories. 42
The first category uses NIBs (Network Interface Boards) that require that the port be set, through a browser, to 9099 (this is what should be entered at the browser interface; equals 9100 - 1). With this type of NIB, the printer must be rebooted for the change to take affect. An example of NIB that is configured this way is the Type 450E NIB.
The second type of NIB has the printer port "pre-set" to 9100; however, the port must be enabled by TELNETing into the NIB and entering the command DIPRINT BIDIRECT ON. After the DIPRINT command has been entered, remember to logout of the TELNET session, and when the "Save Changes ?" prompt appears, enter "Yes". An example of this second type of NIB is the Type 185 NIB.
While port numbers are required when printing through a device description, device queue names are used when printing through an output queue. Many printers use "lp" as their queue name, and this applies to a number of Ricoh printers, including those that use the Type 185 and Type 270 controllers. Other Ricoh printers, including those with Type 450, Type 450E, Type 650, Type 700, and Type 850 controllers, use queues named "PORT1". Queue names vary from manufacturer-to- manufacturer and product-to-product; the best method the ensure that the correct name is used, is to check the operator's manual supplied with the equipment.
43
8. Resource Material
Navigating The AS/400, A Hands -On Guide John Enck, Michael Ryan ISBN 0-13-862558-1
Personal Computer Dictionary Philip E. Margolis ISBN 0-679-76424-0
AS/400e Basic System Operation, Administration, and Problem Handling IBM Corporation Publication SC41-52066-04
IBM AS/400 Printing V IBM Redbooks Publication SG24-2160-01
TCP/IP Tutorial And Technical Overview IBM Redbooks Publication GG24-3376-05
OS/400 Printer Device Programming V4R5 IBM Redbooks Publication SC41-5713-03
IBM Redbooks Website http://www.redbooks.ibm.com
44
9. Trademarks
Aficio Ricoh Company Limited Ricoh Ricoh Company Limited FlashForm400 FORMation mg, Incorporated PrintDriver400 FORMation mg, Incorporated FlashMail400 FORMation mg, Incorporated FlashCheck400 FORMation mg, Incorporated HP Hewlett-Packard Corporation PCL Hewlett-Packard Corporation HP5SI Hewlett-Packard Corporation PJL Hewlett-Packard Corporation PostScript Adobe Incorporated Macintosh Apple Computer Corporation DEC Digital Equipment Corporation VAX Digital Equipment Corporation UNIX Unix Systems Laboratories Incorporation Microsoft Microsoft Corporation Windows Microsoft Corporation Windows NT Microsoft Corporation Windows 2000 Microsoft Corporation Novell Novell Incorporated NetWare Novell Incorporated IPX Novell Incorporated SPX Novell Incorporated PSF/400 International Business Machines Corporation Redbooks International Business Machines Corporation PC International Business Machines Corporation Client Access International Business Machines Corporation Operations Navigator International Business Machines Corporation AS/400 International Business Machines Corporation OS/400 International Business Machines Corporation AFP International Business Machines Corporation 45
IPDS International Business Machines Corporation Intelligent Printer Data Stream International Business Machines Corporation PowerPC International Business Machines Corporation IBM International Business Machines Corporation System/36 International Business Machines Corporation System/38 International Business Machines Corporation Officevision/400 International Business Machines Corporation
All other trademarks are the property of their respective owners.