• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Three Ways to Direct OS/400 Output Queues to TCP/IP Printers

    July 24, 2002 Timothy Prickett Morgan

    Dear Readers:

    In shops with TCP/IP networks, a common task is to redirect OS/400 printer output to a TCP/IP printer sitting somewhere else on your network. While the easiest way to configure the printer is by hard coding the IP address inside the printer output queue configuration, that’s not the only way to do it. In fact, there are three different ways to configure an OS/400 TCP/IP remote output queue that I’d like to share with you.

    For this example, let’s look at sending output to a networked TCP/IP printer by using a remote writer that is started through an OS/400 remote output queue. [Note: The concepts I’m discussing here can also be applied to device-based IP printers configured by using the Create Device Description (Printer), CRTDEVPRT command, but I unfortunately don’t have the space to cover CRTDEVPRT TCP/IP configuration in this tip]. Let’s say we’re setting up an OS/400 remote output queue called HPLJ5SI in library QGPL. This new queue will be printing to the RAW remote printer queue of a TCP/IP-connected HP LaserJet 5SI, which has an IP address of 10.0.0.5. To create this output queue and direct it to that address, we would enter the Create Output Queue (CRTOUTQ) command as follows:

    CRTOUTQ  OUTQ(QGPL/HPLJ5SI) +
       RMTSYS(*INTNETADR) RMTPRTQ(RAW) +
       AUTOSTRWTR(1) CNNTYPE(*IP) +
       DESTTYPE(*OTHER) MFRTYPMDL(*HP5SI) +
       INTNETADR('10.0.0.5') +
       TEXT('HP 5SI Outq for Fifth Floor printer')
    

    The Remote System (RMTSYS) value of *INTNETADR combined with the *IP Connection Type (CNNTYPE), a Destination Type of *OTHER (DESTTYPE), and the Internet Address (INTNETADR) of 10.0.0.5 specify that we’ll be redirecting queue output to a TCP/IP printer. The RAW value for the Remote Printer Queue (RMTPRTQ) parameter tells OS/400 to send spool files to the RAW printer queue on our target printer. The Writers to Autostart (AUTOSTRWTR) value of 1 tells OS/400 to automatically start one TCP/IP writer to be used by this remote output queue, and the rest of the parameters describe the print characteristics of the printer this queue will sending information to.

    Once created, OS/400 will automatically start a remote writer associated with this output queue whenever TCP/IP starts or a change is made to this output queue. To end this writer, use the End Writer (ENDWTR) command, as follows:

    ENDWTR WTR(HPLJ5SI)
    

    If you wanted to restart the remote writer, use the Start Remote Writer (STRRMTWTR) command specifying the remote output queue, as follows:

    STRRMTWTR OUTQ(QGPL/HPLJ5SI)
    

    Here’s the downside of hard coding IP addresses into printer output queues: If your destination printer has an IP address change, you have to search all the output queues on your system to find the queue (or queues) that redirect printouts to the old address. If you have multiple AS/400s with multiple TCP/IP-based output queues, locating the proper output queue can be fairly tedious when IP changes occur.

    To slightly ease that burden, you could configure the remote output queue’s IP address by using an OS/400 host table entry for your RMTSYS value. You do this by entering a host table name that’s associated with your printer’s IP address and assigning the host name–not the IP address–to your printer queue. You can create the host table name by opening the Configure TCP/IP menu (GO CFGTCP) and selecting option 10, Work with host table entries. Then you would use option 1=Add on the Work with Host Table Entries screen to enter a new entry that associates your IP address with a unique host table name.

    For our example, assume that we added a host name of FIFTH_FLOOR_HP5SI_PRINTER to our host table, and that name is assigned to IP address 10.0.0.5. Now, if we wanted to create our remote output queue to print to 10.0.0.5 via this host table entry, we would create the remote output queue with the following CRTOUTQ command:

    CRTOUTQ  OUTQ(QGPL/HPLJ5SI) +
       RMTSYS(FIFTH_FLOOR_HP5SI_PRINTER) +
       RMTPRTQ(RAW) AUTOSTRWTR(1) +
       CNNTYPE(*IP) DESTTYPE(*OTHER) +
       MFRTYPMDL(*HP5SI) +
       TEXT('HP 5SI Outq for Fifth Floor printer')
    

    By doing this, we shifted the IP address resolution away from the remote output queue and into the OS/400 host table, where it can be used in multiple objects throughout the system. The remote output queue will now redirect printouts to the TCP/IP address specified in the FIFTH_FLOOR_HP5SI_PRINTER host table entry. If the printer changes its network IP address in the future, we would only have to change our host table entry and the printer would then be redirected to the new address through the FIFTH_FLOOR_HP5SI_PRINTER host name.

    Conversely, if we wanted to change an existing printer queue to use the FIFTH_FLOOR_HP5SI_PRINTER host name, we could use the Change Output Queue (CHGOUTQ) command as follows:

    CHGOUTQ OUTQ(QGPL/HPLJ5SI) +
       RMTSYS(FIFTH_FLOOR_HP5SI_PRINTER) +
       INTNETADR(' ')
    

    This CHGOUTQ command leaves all the other parameters intact while wiping out the original IP address for the queue by blanking out the INTNETADR parameter; it also redirects printer output to the site designated by the FIFTH_FLOOR_HP5SI_PRINTER host table entry.

    While using host table names in your printer output queue descriptions centralizes your IP addresses in one place, it still leaves you with the same problem you have when you hard code the address: If your printer changes IP addresses, you still have to manually change the remote TCP/IP printer’s IP address on your AS/400 (except the change is in the host table this time). To get around that issue, you could also use a DNS entry if one is available for your printer. In fact, using DNS entries inside OS/400 objects is a good practice because a single change to a DNS entry will automatically ripple throughout your network, allowing you to quickly make IP changes without having to incur a lot of manual maintenance. So if you assign a DNS entry for your target printer to your remote output queue, OS/400’s DNS function will do the work of looking up the IP address for you.

    Assigning a DNS name to a printer output queue is functionally the same as using a host table name. So if your HP 5SI printer had an internal DNS name of hp5si.midrangeguru.com and a short DNS alias of HP5SI, you could have your remote output queue resolve that DNS name to an IP address by configuring your queue to point to the DNS alias, as follows:

    CRTOUTQ  OUTQ(QGPL/HPLJ5SI) +
       RMTSYS(HP5SI) RMTPRTQ(RAW) +
       AUTOSTRWTR(1) CNNTYPE(*IP) +
       DESTTYPE(*OTHER) +
       MFRTYPMDL(*HP5SI) +
       TEXT('HP 5SI Outq for Fifth Floor printer')
    

    And if you have DNS lookup configured correctly on your AS/400, your remote output queue will resolve to the IP address of your networked HP 5SI printer. Here’s the upside: Using a DNS name for your remote output queue shifts the IP resolution work away from your AS/400 and on to the network. Here’s the downside: This technique may add a small amount of network traffic as OS/400 DNS communicates across your network to resolve the address.

    So there you have it: Three techniques for setting up a remote output queue that resolves to a TCP/IP-attached printer on your network. And depending on how you want to get your work done, each of these techniques will work equally well.

    — Joe

    Sponsored By
    WORKSRIGHT SOFTWARE

    On June 30, 2002,
    $$$$$$$$    Postal Rates went UP!    $$$$$$$$

    On July 1, 2002,
    $$$$$    you wanted your postage bill to go down.    $$$$$

    We have the solution! CASS certify your mailing names and addresses and presort your outgoing mail and save. Our CASS certification software ensures that your address files have valid ZIP Code and address information. Our presort software ensures that you can properly prepare you mail for delivery to your Post Office.

    WorksRight Software, Inc. is the number-one source for iSeries and AS/400 CASS, presort, ZIP Code, and area code software and data.

    Visit our Web site – www.worksright.com – to learn more about our CASS and presorting software, or contact WorksRight Software, Inc., phone 601-856-8337,
    e-mail software@worksright. com .

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 55 -- July 24, 2002

    Sponsored by
    PERFSCAN

    Revolutionary Performance Management Software

    At Greymine, we recognize there is a void in the IT world for a dedicated performance management company and also for a performance management tool that’s modern, easy to use, and doesn’t cost an arm and a leg. That’s why we created PERFSCAN.

    PERFSCAN is designed to make your job easier. With revolutionary technology, an easy-to-read report and graphics engine, and real time monitoring, tasks that used to take days can now take minutes. This means you will know your system better and will be able to provide better service to your customers.

    OUR FEATURES

    PERFSCAN is full of robust features that don’t require you to take a three-day class in order to use the product effectively.

    Customizable Performance Reporting

    Whether you are troubleshooting a major system problem or simply creating a monthly report, PERFSCAN lets you select any combination of desired performance metrics (CPU, Disk, and Memory).

    User Defined Performance Guidelines

    No matter if you are a managed service provider managing complex systems in the cloud or a customer analyzing your on-premises solution, PERFSCAN gives you the flexibility to define all mission critical guidelines how they need to be.

    Understanding The Impact Of Change

    Tired of all the finger pointing when performance is suffering? PERFSCAN’s innovative What’s Changed and Period vs. Period analysis creates a culture of proof by correlating known environmental changes with system performance metrics.

    Comprehensive Executive Summary

    Creating performance graphs is easy. Understanding what they mean is another thing. With one mouse click, PERFSCAN includes an easy-to-understand executive summary for each core metric analyzed.

    Combined Real-Time Monitor And Performance Analysis Tool

    With PERFSCAN’s combined built in enterprise real-time monitor and historical performance analysis capability, you will always know how your mission-critical systems are performing.

    Cloud Performance Reporting Is Easy

    Managing performance for production systems in the cloud can be a black hole to many system administrators. The good news is PERFSCAN analyzes all core metrics regardless of the location. That’s why MSPs and customers love PERFSCAN.

    Detailed Job Analysis

    PERFSCAN shows detailed top job analysis for any desired period. All metrics are displayed in two ways: Traditional Report and Percentage Breakdown Pie Chart. This toggle capability instantly shows the jobs using the most system resources.

    Save Report Capability

    Your boss lost the report you gave to him on Friday. Now what do you do? With PERFSCAN’s save report capability, any report can be retrieved in a matter of seconds.

    Professional PDF Reporting With Branding

    Creating professional looking reports for your customers has never been easier with PERFSCAN. Branding for our partners and service provider customers is easy with PERFSCAN.

    Check it out at perfscan.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Populating JavaBeans from Database Values Generating a Unique Identifier

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 55

This Issue Sponsored By

    Table of Contents

    • Scheduling a Job to Run More than Once a Day
    • Three Ways to Direct OS/400 Output Queues to TCP/IP Printers
    • Did OPNQRYF Retrieve Records?

    Content archive

    • The Four Hundred
    • Four Hundred Stuff
    • Four Hundred Guru

    Recent Posts

    • IBM i Delivers Sizable Benefits, Forrester Consulting Reports
    • SBOMs Will Come to IBM i, Eventually
    • IBM i Backup Provider Storagepipe Snapped Up By Thrive
    • Four Hundred Monitor, June 7
    • IBM i PTF Guide, Volume 25, Number 23
    • Power10 Boosts NVM-Express Flash Performance
    • Fortra Completes Postmortem Of GoAnywhere Vulnerability
    • Guru: Binding Directory Entries
    • How Does Your Infrastructure Spending Stack Up To The World?
    • IBM i PTF Guide, Volume 25, Number 22

    Subscribe

    To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

    Pages

    • About Us
    • Contact
    • Contributors
    • Four Hundred Monitor
    • IBM i PTF Guide
    • Media Kit
    • Subscribe

    Search

    Copyright © 2023 IT Jungle