18
Thu, Apr
5 New Articles

TN5250E PC5250 Printing: Problems, Situations, and Solutions

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

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

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: