For many years, the printing choices available from an IBM midrange host were limited to the proprietary SNA methods developed by IBM. In the last few years, however, a printing renaissance has occurred that has greatly increased the printing methods available to the AS/400 end-user community.
In this article, I will discuss the benefits and limitations of using a relatively new AS/400 printing protocol known as TN5250E. TN5250E is the protocol used to provide the native TCP/IP printing support in the Client Access for Windows 95/NT and AS/400 Client Access Express for Windows versions of PC5250, as well as some other software packages, such as IBM’s SecureWay Personal Communications. I’ll look at what TN5250E is, what it provides over prior TCP/IP implementations, AS/400 and Client Access updates you need to apply to use TN5250E, and common TN5250E problems and potential solutions.
Benefits of TN5250E Printing
In the last few years, the Internet Engineering Task Force (IETF) chartered a workgroup to enhance the TN3270 and TN5250 specifications. The purpose was to improve TCP/IP access for these types of hosts. One of the milestones for the group was to publish an updated TN5250 Request for Comments (RFC) that would include support for printing. The draft Telnet 5250 Enhancement specification known as TN5250E was released in February 1998 (the current version of this draft specification is posted on the IETF Web site at www.ietf.org/internet-drafts/draft-ietf-tn3270e-tn5250e-05.txt) and PC5250 was the first client software package to offer AS/400 printing support using TN5250E. As time passed, more vendors have introduced TN5250E clients that offer printing support.
Until recently, TN5250E servers provided display and print functionality for network-based clients by offering a pool of connections that could be used on an as-needed basis. If you needed access to an AS/400 via TN5250E, you contacted the appropriate AS/400 host and its Telnet server created a virtual display or printer device description for you (that usually started with the ‘QPADEV’ specification, i.e., QPADEV00001, QPADEV00002, etc.). Each time that you contacted the same AS/400, it was quite likely that you could receive a different terminal or printer ID from the available pool. This inability to specify a fixed terminal or printer device name on the AS/400 rendered OS/400 hardware device ID application security unusable.
An enhancement to the TN5250E specification allows a client to specify a particular host device name for the connection. If this AS/400 device is already connected to another client, the client connection will not be made unless a secondary host device name has been specified in the client configuration. This new TN5250E enhancement supports both terminal and printer device IDs.
The TN5250E specification also supports SSL encryption for printer data streams. If SSL is enabled (as it is available with the Express client PC5250 product; see “Securing Express Client and PC5250 Communications with SSL,” by Becky Schmieding on page 1 for more information), the reports sent from the AS/400 to a particular TN5250E-defined printer will be encrypted so that the data will not be viewable as clear text while it is being transmitted over the TCP/IP network. This enhancement is very useful for e-commerce applications that send sensitive personal or business information across a TCP/IP WAN (such as your bank statement printing on your home computer’s printer).
When IBM first designed SNA printing, it used SNA block mode formatted data to provide for the copy control and page range printing functions that are quite important to many AS/400 users. SNA printing technology also provides for robust error reporting and error detection while printing. It is also much simpler to cancel a print job using SNA protocols as compared to an AS/400-based TCP/IP Line Printer Requester (LPR) printer, which was the only available printer independent TCP/IP printing alternative before the implementation of TN5250E. This is because the *LAN device description (IP Sockets print driver) on the AS/400 only supports laser printers that understand the HP PJL language.
When the SNA printer data is carried within the TCP/IP-based Telnet application (as occurs when you create a PC5250 printer using the TN5250E protocol), IBM has married the robust application functionality of SNA with the easier-to-route and manage benefits of TCP/IP transport in a WAN environment. Thus, the relatively new TN5250E printing support is a powerful new tool for AS/400 shops.
AS/400 and PC5250 Setup for TN5250E Support
In order to run TN5250E support in PC5250 and on your AS/400, you need to ensure that your software—both your Client Access and your OS/400 operating system software—is upgraded to the current levels. To implement this support (including the named printer support), you must install the appropriate AS/400 PTFs to upgrade your AS/400’s Telnet server to support the new enhancements. To determine what PTFs you need to install for your AS/400’s Telnet server, reference IBM Informational APAR II10918, “Requirements for PC5250 Support of TCP/IP Enhancements,” at IBM’s Client Access APAR site (www.as400.ibm.com/clientaccess/caiiapar.htm).
You also may find that it will be helpful to install a few of the TN5250E TCP/IP printing PTFs that have been released since the introduction of this new type of printing capability. Figure 1 highlights a few of the common printing problems that have been solved via PTF in OS/400 V4R2 and below.
After your AS/400’s Telnet server has been upgraded to the appropriate PTF level, you must also ensure that your user PCs are at the proper Client Access versions to use the new support in PC5250. IBM implemented this support starting with Client Access for Windows 95/NT V3R1M3 and above and in Client Access Express for Windows. If you are running the Windows 95/NT V3R1M3 client, you must also have service pack SF46891 or above installed. Again, consult APAR II10918 for further details.
TN5250E Limitations—A Tale of Two Specifications
As mentioned earlier, the TN5250E specification was included in the charter for the TN3270E workgroup. The first specification this group completed was the enhancement of the TN3270 (mainframe) specification. The printer device ID used by TN3270E is an IBM
3287. The actual IBM printer was a very limited eight-wire matrix printer that could only
print at 10 CPI. The wonderful thing about this particular device was that it was so friendly. If you sent it a command from the host that it did not understand, its default operation was to ignore the command and maintain the currently existing page format. This functionality allows it to be used very successfully as a generic target printer since many different print commands can be sent to specialized printing devices with little fear of a NACK (negative acknowledgement) response being received from the print client that would halt print processing.
The IBM midrange environment TN5250E specification implements TN3270E printing support in a different fashion. The IBM Midrange SNA printer command set was made richer with more functions supported than in the mainframe environment. The error detection was also enhanced so that unsupported commands generated an immediate NACK.
These NACK responses can frequently halt print processing of a spool file. In order to create a successful generic target printer in the AS/400 environment, you need to pick the host printer device description with the most functionality rather than the least. The purpose is to allow you to send all valid printer control commands to a printer client while trying to minimize the possibility of receiving an unintended NACK response from the target print client. The printer device ID that is normally used for this purpose in the AS/400 environment is the 3812/1 printer.
When you attach a printer to an AS/400 using an APPC connection (usually by enabling a router on your PC such as the NetSoft Router), your AS/400-based device description will be created by the AS/400 SNA Passthru Server job. This program supports the creation of virtual devices. Therefore, it is possible for a print client to request that the SNA Passthru server configure a virtual device to treat it as, say, a 4214/2 matrix printer. The benefit to this feature is that it allows you to receive printer device-type specific formatting from the AS/400 that is sometimes critical to proper print formatting. One example would be when printing checks. Generally end users like to receive the load form message followed by the verify alignment message. The verify alignment message is not supported by the 3812/1 device description, so being able to request a virtual device description that does support the verify alignment message can be critical for check-printing applications.
In contrast, when you attach a printer to an AS/400 using a TN5250E connection, your AS/400-based device description will be created by the AS/400 Telnet server job. The Telnet server does not support the creation of virtual device descriptions at this time. Thus, TN5250E printing support is currently constrained to the features and error conditions supported by the true 3812/1 laser printer, which is what your AS/400 will automatically configure your printer device to be when printing via the TN5250E protocol.
For some customers, this limitation will prevent the use of TN5250E-defined printers because these printers will not be backward compatible with a feature that is considered a must-have for proper printing of their application output.
Sometimes there is a way around this situation, however, in TN5250E printing. While the Telnet server automatically creates an AS/400 3812 device for your printers, there are some techniques you can use to configure your AS/400 spool file output for the target physical printers on your PC5250 sessions or for other printers attached to your AS/400 through the TN5250E specification. OS/400 and PC5250 allow you to format your printer output by using an AS/400-based Workstation Customization Object (WCO) that formats your printer data stream to print on the associated printer. In addition, PC5250 offers a second option in that you can assign a Printer Definition Table (PDT) object to your PC5250 session that can also be programmed to format AS/400 spool files to print correctly on many different printers. Configuring and assigning AS/400 WCOs and PDTs to your PC5250 printer sessions is beyond the scope of this article, but AS/400 Network Expert has provided two articles on ANE Web to help you understand this functionality:
• To understand your options for PC5250 printer formatting, see “The Basics of PC5250 Printer Emulation,” by Becky Schmieding and Joe Hertvik (Midrange Computing, February 1999, www.midrangecomputing.com/ane/monthdisplay.cfm? md=19992).
• To understand how to create Workstation Customization Objects to format printer output going to any AS/400-defined printer, see “Fill the Gaps with Workstation Customization Objects,” by Bradley V. Stone (Midrange Computing, February 1999, www.midrangecomputing.com/ane/monthdisplay.cfm? md=19992).
While these two articles won’t answer all your questions about formatting printer output, they can help you correct some problems with the TN5250E printing process.
Early TN5250E implementers have also found some significant problems with the current error reporting support on the AS/400 for TN5250E print sessions. Currently, the AS/400 print queue servicing a TN5250E printer may hang if the AS/400 Telnet server receives an unexpected printer error code from the client. Also, companies that have implemented a TN5250E client onto a multiprotocol print server are also seeing the same type of condition when the print server is powered off while the writer is started on the AS/400. Instead of receiving some form of “lost communication with device” message on the AS/400 host and a resulting termination of the writer, the writer hangs in a condition that makes it very hard to end. IBM has just released a set of PTFs that significantly improve an AS/400’s ability to determine whether a particular TCP/IP device is active. The hope of the IBM developers is that this new device-handling routine will significantly reduce the phenomenon of certain Telnet device descriptions becoming hung when the device stops communicating with the host in an unexpected fashion. The PTFs that provide this functionality are as follows:
• OS/400 V3R2 (SF53481)
• OS/400 V3R7 (SF53483)
• OS/400 V4R1 (SF53485)
• OS/400 V4R2 (SF53486)
• OS/400 V4R3 (SF53489) The change is included in the base level code for V4R4.
The Future’s So Bright, TN5250E Has to Wear Shades
In spite of some of these issues, the TN5250E specification adds another valuable printing capability to the AS/400’s TCP/IP support. For many end users, it will provide a reliable and useful method for printing their daily reports. The current limitations of the implementation will cause some end users to look elsewhere for a printing solution but there are some workarounds. It is very likely that some of the limitations will disappear as more TN5250E printing clients reach the market and IBM receives ongoing feedback from the field. Thus, the future looks very bright for significant use of TN5250E printing around the world.
Related Materials
“Easy-to-use AS/400-Windows NT Report Sharing Through LPR/LPD,” Paul Tykodi, AS/400 Network Expert, July/August 1999
“The Basics of PC5250 Printer Emulation,” Becky Schmieding and Joe Hertvik, Midrange Computing, February 1999 (Available on ANE Web at www.midrangecomputing.com/ ane/monthdisplay.cfm?md=19992.)
“Fill the Gaps with Workstation Customization Objects,” Bradley V. Stone, Midrange Computing, February 1999 (Available on ANE Web at www.midrangecomputing.com/ ane/monthdisplay.cfm?md=19992.)
IBM Informational APAR II10918, “Requirements for PC5250 Support of TCP/IP Enhancements” (Available at IBM’s Client Access APAR site, www.as400.ibm.com/clientaccess/caiiapar.htm.)
AS/400 Client Access Express for Windows: Implementing V4R4M0, Redbook (SG24-
5191)—Available at the IBM Redbook site, www.redbooks.ibm.com.
Cannot print multiple copies MA19713 MF21135 MF21580 MF21681
Cannot start a new Telnet SF47712 SF47713 SF47714 SF47715 printer session; control block
for device is corrupted
Writer not active error SF46542 SF46543 SF46544 SF46545 message issued when
not expected
Telnet sessions drop when SF55588 SF55587 SF55584 SF55440 session name received from
client exceeds system defined
field length
Telnet printer session is SF50020 SF50019 SF50018 SF50017 ended via message CPF3305;
unable to re-establish a new
session
Missing two flags for printer MF19117 MF18971 pass-through headers
Queue for printer session SF50008 SF49569 SF49568 SF49539 doesn't exist in QGPL; printer
session cannot be started
Memory leak in QTVSINIT SF49317 SF49335. SF49336 causes QTGTELNETS job to
get quite large, preventing
new Telnet clients from
connecting to host
QTGTELNETS Job ends SF48910 SF48390 abnormally; cannot establish
new printer sessions
No support for zero-byte MF20619 MF19418 MF19416 MF19412 last-of-chain headers,
causing occasional hanging
of spool files
Problem PTF—
V4R2
PTF—
V3R2
Figure 1: Here are some available PTFs to solve common TN5250E printing problems in OS/400 V4R2 and below.
PTF—
V3R7
PTF—
V4R1
LATEST COMMENTS
MC Press Online