In the wonderful days of yesteryear, there was a printer on every desktop. As networks have matured, the printers are
no longer directly attached to just one desktop. Network printers have become an integral part of the modern office. Presenting a low-cost, easy-to-maintain solution, they are sprouting up everywhere.
With the iSeries 400 now attached to the office network, the question of how to utilize these printers moves to the forefront. If the iSeries 400 and the network printer are on the same network, how can I get the two to talk to one another? The iSeries has the capability to talk to nearly anything. By the end of this article, you should have a powerful tool at your disposal to open up network printers for printing from the iSeries.
Output queues have been a regular part of the printing process "since the dawn of time," and you can use the Create Output Queue (CRTOUTQ) command to tap into the network printers. CRTOUTQ has been a trusty friend, and IBM expanded the capabilities of this command in OS/400 V3R7. The output queue and its associated writer become the bridge between the iSeries 400 output and the IP-connected network printers. With OS/400 built-in functions, solving the printing problem becomes quite simple. Figure 1 displays an example of the CRTOUTQ command with the appropriate values filled in.
|
Figure 1: Use the CRTOUTQ command to establish a connection to an IP printer.
Network Terms 101
Before diving into the parameters of the CRTOUTQ command, some network terms need to be defined. This will aid in understanding the pieces and parts involved and will remove some of the mystery behind some of the parameters. The underlying protocols, utilities, and devices are often taken for granted when everything is working fine, but each has a role in making the simplest of print jobs successful. Most of the components have existed for years and are now being utilized for workgroup computing. The following is by no means a complete list of network-related components, but it will serve as a good starting point:
- TCP/IP--This set of communication protocols defines how data is passed back and forth across a network.
- IP address--This is a numbering system that the network uses to know where a device exists on the network. The IP address of a device can be either a static address (assigned once and never changed) or a dynamic address (the network itself assigns a new IP address to the device every time the device is turned off and then on again). The IP address is used by the routers on the network to deliver packets of commands and data to the destination device. The numbering system consists of a series of four numbers separated by periods, and each position has a significant meaning. So, a typical IP address would look something like the following: 172.16.12.49 or 192.25.1.32
- Ethernet--This network topography supports the assigning and addressing of IP addresses. It defines a particular method of breaking data into packets and passing these packets to and from various devices.
- PING--This command is used for testing whether a workstation or server on the network can communicate with the specific device represented by an IP address. A packet is sent to the specified address, and, if the device successfully receives the packet, it responds by sending the packet back. Think of PINGing an IP-addressed network device as similar to a submarine sending out a sonar wave to determine if an object is close by. The sonar waves go out; if they return, the submarine knows that something is close at hand. PINGing a device doesn't tell you what type of device it is, but it does confirm that a connection can, at the very least, be made. The PING command on the iSeries400 would look like this (using one of the example IP addresses):
PING ADDR('172.16.12.49')
- Print Server --This device connects a printer to the network and acts as a communications liaison between the printer and the network. It may be an internally installed card or an external box. This is the device to which the IP address is assigned. The print server has several functions. It translates the packets coming from the network into something the printer understands; it maintains communications with the network; and it acts as a referee when more than one print job is thrown at the printer at the same time. Additional functions may be added by the print server's manufacturer.
- Line Printer Requester/Line Printer Daemon--LPR/LPD are book-end utilities that allow print jobs to be sent by way of TCP/IP across a network. LPR sends the print file, and LPD receives the print file.
Some Work Has Already Been Done
The scope of this article doesn't cover the configuration of the underlying subsystems and communication protocols that are needed to connect devices on the network. Setting these up and maintaining them are the jobs of the iSeries and network administrators. Assume that a few things are already in place and working fine. First, the network devices that connect the iSeries, the PCs, and the printers support the TCP/IP protocol (a common type is Ethernet). Second, the iSeries already has TCP/IP configured and running. Third, the network printer has a static IP address. This is very important, as the IP address of the network printer cannot change after the output queue has been created. It is the IP address that the iSeries will use to route the output file to the network printer. The network administrator should provide the printer's IP address. Finally, when PINGing the printer using the IP address, the packet is successfully returned, meaning that the iSeries can, in fact, communicate with the device. These assumptions simply mean that our environment is primed to allow the iSeries to print to the IP-connected network printers.
Welcome Back, Old Friend
The CRTOUTQ command allows us to create an output queue that contains print files. As boring as that description might seem, the actual wonder is revealed in the way the command is constructed. By specifying the right values on the right parameters, the plain-vanilla output queue is transformed into a staging area for printing to the IP-connected network printers. The associated writer becomes a powerful companion that takes the files from the queue, translates them for the destination printer, and sends them through the network to the printer itself. In the process of creating the output queue, you will also implicitly create an associated writer, accomplishing two tasks with one command. There will be an interesting twist, though. Because the printer is not directly attached to the iSeries, the type of writer created is called a remote writer.
One notable limitation exists using this method: the output file must have a printer device type of *SCS, which means that basic report formatting is available, but some of the features available with printer files generated for *IPDS device types are not available. Several *SCS printer device file parameters do influence the way that the output file is printed, and the vast majority of reports fall into this category.
Doing Your Homework
Before you can create the output queue that will allow output files to be sent to the IP-connected network printer, you must answer four questions.
- What is the type and manufacturer of the network printer?
- What is the statically assigned IP address?
- What is the type and manufacturer of the print server?
- What will be the name of the new output queue?
The answers become the values to some of the parameters of the CRTOUTQ command.
As you build a sample CRTOUTQ command, use the following as an example: an HP LaserJet 4 printer has been assigned a static IP address of 172.16.12.49; the print server that connects the printer to the network is an Intel Netport Pro print server; and the output queue name is ACCT02Q because it resides in the Accounting department. Also assume that users are currently printing to the printer from their PCs and that you've successfully PINGed the printer from the iSeries.
The Mystery Revealed
Several parameters of the CRTOUTQ command are necessary to accomplish the stated goal. Sometimes the value for one parameter will drive the value for a following parameter, as some of the parameters are interrelated. Each is discussed in turn as the command is built.
- OUTQ--Output queue specifies the library where the output queue is located and the name of the output queue itself. Using the example above, this is what the parameter would look like:
OUTQ(QUSRSYS/ACCT02Q)
- RMTSYS--Remote system specifies the remote system that the iSeries should send files to when it's time to print. Because the printer is located on the network and is linked to the iSeries by an IP address, the value for this parameter will be *INTNETADR. This parameter's value will drive the value of the parameter CNNTYPE. By specifying *INTNETADR as the RMTSYS, the CNNTYPE must be set to *IP. It will also cause the type of writer associated with this output queue to be a remote writer:
RMTSYS(*INTNETADR)
- RMTPRTQ--Remote printer queue is the name of the printer queue on the remote system that the output files are sent to. When printing to an IP-connected network printer, this parameter is directly related to the type and manufacturer of the print server. IBM has published a partial list of these values in an online technical support document at www.ibm.com/support. Search for "Recommended RMTPRTQ Values." Although the document is not a complete list, it does list several of the more common print servers. Figure 2 lists two examples for this parameter. Because the example print server is an Intel Netport Pro print server, the value for this parameter is LPT1_PASSTHRU:
RMTPRTQ('LPT1_PASSTHRU')
Print Server
|
RMTPRTQ Entry
|
HP JetDirect Card (Internal)
|
'raw' (formatted)
'text' (unformatted) |
Intel Netport Pro
|
'LPTx_PASSTHRU' (formatted)
'LPTx_TEXT' (unformatted) where x = port |
Figure 2: Remote Printer Queue entries are based on print server manufacturer.
- AUTOSTRWTR--This parameter specifies the number of remote writers that will be started automatically by the system when the output queue is created or the system IPLs. This parameter takes the place of the Start Remote Writer (STRRMTWTR) command so that the STRRMTWTR command doesn't have to be manually executed after creating the output queue:
AUTOSTRWTR(1)
- CNNTYPE--This parameter specifies the connection type that the iSeries will make with the remote system. Because *INTNETADR was specified on the RMTSYS parameter, the value for CNNTYPE must be *IP. This means that the spooled files will be sent from the iSeries 400 to the network printer using TCP/IP:
CNNTYPE(*IP)
- DESTTYPE--Destination type specifies the type of the remote system. This parameter, along with the type of data contained in the spooled file, is used by the remote writer to determine the format used to send the spooled file. Because *INTNETADR was specified on the RMTSYS parameter, the value for this parameter is *OTHER:
DESTTYPE(*OTHER)
- TRANSFORM--This parameter is Transform SCS data to ASCII; it determines whether the writer should make use of the host print transform function to transform a spooled file of device type *SCS into ASCII data when the file is sent to a remote printer. The value should be set to *YES:
TRANSFORM(*YES)
- MFRTYPMDL--This parameter specifies the manufacturer, type, and model for a printer using the host print transform function or user data transform program. *IP must by specified on the CNNTYPE parameter and *YES must be specified on the TRANSFORM parameter in order to use this parameter. F4 (prompt) will be very helpful in viewing the vast IBM-supplied list of manufacturer printer types and models. The example printer is an HP LaserJet 4 printer, so the value will be *HP4:
MFRTYPMDL(*HP4)
- INTNETADR--This is the IP address of the network printer that output files in this output queue will be sent to. Because *INTNETADR was specified on the RMTSYS parameter and *IP was specified on the CNNTYPE parameter, the IP address must be entered. The IP address assigned to the example printer is 172.16.12.49, making the INTNETADR parameter look as follows:
INTNETADR('172.16.12.49')
- SEPPAGE--This parameter determines whether or not to request a separator page when printing on a network printer. This is individual preference; no separator page will be required for the example:
SEPPAGE(*NO)
- TEXT--Text description is a brief description of the output queue. Make sure that the description indicates that this output queue is for an IP-connected network printer:
TEXT('Accounting HP LaserJet 4 via IP')
Life Just Got Good
You now have a very powerful tool to access resources that have been begging to be utilized. Looking back at Figure 1, you can now see how it all fits together. There are many combinations of printers and print servers in the marketplace, but a couple of minutes spent in research will pay huge dividends in the long run. Even though the list of printer manufacturers is quite extensive, some printers may not be supported or may need to be set up in an emulation mode. Your mind is probably already turning to which printer you want to tackle first. Run, don't walk, to your nearest workstation and start experimenting. The steps to setting up and printing to the IP-connected network printer are simple and straightforward. I'll list these steps again for quick reference:
1. Answer the four questions.
2. PING the device.
3. Create the new output queue.
4. Test the new output queue.
5. Change user profiles to the new output queue.
One final thing: If you're setting up an HP LaserJet printer and would like to take advantage of the many fonts available to you, refer back to my article "Changing Fonts on IP-connected HP LaserJet Printers" for some insight.
Herbert H. Rea is a systems consultant for Mason Associates, Inc., based in Brunswick, Maine, and has been working with the AS/400 since 1989. He can be reached at
LATEST COMMENTS
MC Press Online