Tip

System i printing: Configuring an ASCII printer

Chip Milosch
A very common question posted on various iSeries forums is some variation of: I have a XXXX ASCII printer on my network. How can I make this printer available to my iSeries users?

Although this question seems to cause a lot of anxiety among iSeries administrators, there really is no reason for the emotional trauma. Configuring most ASCII printers to work with both a normal PC network and the iSeries in perfect harmony is not really that difficult. The secret to making it all work smoothly is knowing what information you need to have and where to find it. I hope to provide a simple plan to guide you through the steps of ASCII printer configuration. Fortunately, IBM's Web site provides a wealth of information in very well structured tables that have the necessary configuration choices and parameters.

More Information

To configure an ASCII printer on the iSeries you need to know some general information about the printer, beginning with the printer Make & model # & its IP address. If you are responsible for setting up the printers, then you presumably know the IP address. If you don't, you may have to print a network configuration page from the printer. In any case, once you know the IP address of the printer, verify that your iSeries can 'see' the printer by PINGing it from an iSeries command prompt:

PING RMTSYS('10.60.26.202')

Once you know the printer's IP address, you are almost ready to define the printer using the CRTDEVPRT (Create Printer Device) command. When using CRTDEVPRT to configure ASCII printers, we need to define three important parameters:

  • MFRTYPMDL (Manufacture Type & Model)
  • WSCST (Workstation Customization Table)
  • SYSDRVPGM (System Driver Program)
  • The starting place to find most of the information required is an IBM web page titled Support for Various ASCII Printers. From this page, you can follow links to pages for printers from specific manufacturers as well as get information necessary for setting up Host Print Transform for your printer.

    MFRTYPMDL

    This defines the general type of printer. To locate the proper MFRTYPMDL value for your printer, follow the appropriate link from the URL above for your printer manufacturer. Search this page for the model number of the printer you are configuring, and then locate the appropriate MFRTYPMDL value. For example, if configuring an HP4350 printer, the MFRTYPMDL value would be *HP4000.

    WSCST Setting

    The WSCST value in the CRTDEVPRT command defines the workstation customization object that PSF/400 is going to use to translate between IPDS printing and the ASCII (usually PCL) printing on the physical printer. This functionality is generally referred to as Host Print Transform. PSF/400 is the printing subsystem on the iSeries that actually handles the communications and work producing printer output. The main reference URL given above includes a link to IBM's Version 5 Printer Model Settings for Host Print Transform (HPT) document.

    Locate the MFRTYPMDL value for the ASCII printer. There will be a column defining the default WSCST object to use. Again, using an HP4350 as an example, the MFRTYPMDL value of *HP4000 points to a WSCST value of QWPHPLSRE.

    In some cases, the behavior provided by the IBM-supplied WSCST won't be quite adequate. If that is the case, then you will have to delve into the guts of a WSCST source files. I won't cover that joyous task here, but will at some future time.

    SYSDRVPGM

    The system driver program value says what internal program is used to communicate with the physical printer. In almost all cases, this will be *HPPJLDRV. Again, refer to the documentation on IBM's website to be sure you have chosen the correct value.

    Port Number

    The last piece of information you have to gather is the correct port number to use with the TCP/IP address for your ASCII printer. Once again, IBM provides recommended value on a web page.Recommended PJL Port Number Values for *LAN 3812 PJL Device Descriptions.

    Creating the Printer Device

    In almost every case, the ASCII print device you create will be configured to emulate an IBM 3812 laser printer, so that is the model that will be used in this example of creating the device 'MYASCII'.

    Now we are ready to execute the CRTDEVPRT command. This command 'walks' you through the necessary parameters by adding command parameters as it determines which options are available to you based on previous choices. Type in CRTDEVPRT, press f4 and fill it the first four available parameters as follows:

                        Create Device Desc (Printer) (CRTDEVPRT)                    
                                                                                    
     Type choices, press Enter.                                                     
                                                                                    
     Device description . . . . . . . > MYASCII       Name                          
     Device class . . . . . . . . . .   *lan          *LCL, *RMT, *VRT, *SNPT, *LAN 
     Device type  . . . . . . . . . .   3812          3287, 3812, 4019, 4201...     
     Device model . . . . . . . . . .   1             0, 1, 2, 3, 4, 10, 13, 200...
    

    Press enter, and then fill in the next available parameter, LAN attachment. Since we know we are connecting our ASCII device using TCP/IP, we choose *IP for this choice.

                                                                                    
     Device description . . . . . . . > MYASCII       Name                          
     Device class . . . . . . . . . . > *LAN          *LCL, *RMT, *VRT, *SNPT, *LAN 
     Device type  . . . . . . . . . . > 3812          3287, 3812, 4019, 4201...     
     Device model . . . . . . . . . . > 1             0, 1, 2, 3, 4, 10, 13, 200... 
     LAN attachment . . . . . . . . .   *IP           *LEXLINK, *IP, *USRDFN  

    Now we can supply the port number that we looked up earlier from the IBM Web tables. The only other parameter that requires some action on our part is the Font Identifier. 11 is generally a good choice here:

                                                                                   
     Device description . . . . . . . > MYASCII       Name                          
     Device class . . . . . . . . . . > *LAN          *LCL, *RMT, *VRT, *SNPT, *LAN 
     Device type  . . . . . . . . . . > 3812          3287, 3812, 4019, 4201...     
     Device model . . . . . . . . . . > 1             0, 1, 2, 3, 4, 10, 13, 200... 
     LAN attachment . . . . . . . . . > *IP           *LEXLINK, *IP, *USRDFN        
     Port number  . . . . . . . . . .   9001          0-65535                       
     Online at IPL  . . . . . . . . .   *YES          *YES, *NO                     
     Font:                                                                          
       Identifier . . . . . . . . . .   11            3, 5, 11, 12, 13, 18, 19...   
       Point size . . . . . . . . . .   *NONE         000.1-999.9, *NONE            
     Form feed  . . . . . . . . . . .   *TYPE         *TYPE, *CONT, *CONT2, *CUT... 
     Separator drawer . . . . . . . .   *FILE         1-255, *FILE                  
     Separator program  . . . . . . .   *NONE         Name, *NONE                   
       Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB          
    

    Press F10 after this panel, so we can fill in additional options. Press Page Down, and verify that Host Print Transform is set to *YES:

    Type choices, press Enter.

                                 
                                                                                    
     Message queue  . . . . . . . . .   *CTLD         Name, *CTLD, *SYSOPR, QSYSOPR 
       Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB          
     Activation timer . . . . . . . .   170           1-2550, *NOMAX                
     Inactivity timer . . . . . . . .   *ATTACH       1-30, *ATTACH, *NOMAX...      
     Host print transform . . . . . .   *YES          *NO, *YES         

    Press ENTER, and the panel expands allowing use to specify the rest of our configuration information such as MFRTYPMDL:

                                                                                    
     Message queue  . . . . . . . . .   *CTLD         Name, *CTLD, *SYSOPR, QSYSOPR 
       Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB          
     Activation timer . . . . . . . .   170           1-2550, *NOMAX                
     Inactivity timer . . . . . . . .   *ATTACH       1-30, *ATTACH, *NOMAX...      
     Host print transform . . . . . .   *YES          *NO, *YES                     
     Manufacturer type and model  . . > *HP4000                                     
     Paper source 1 . . . . . . . . .   *MFRTYPMDL    *MFRTYPMDL, *LETTER...        
     Paper source 2 . . . . . . . . .   *MFRTYPMDL    *MFRTYPMDL, *LETTER...        
     Envelope source  . . . . . . . .   *MFRTYPMDL    *MFRTYPMDL, *MONARCH...       
     ASCII code page 899 support  . .   *NO           *NO, *YES                     
     Image configuration  . . . . . .   *NONE         *NONE, *IMGA01, *IMGA02...    
     Character identifier:                                                          
       Graphic character set  . . . .   *SYSVAL       1-32767, *SYSVAL              
       Code page  . . . . . . . . . .                 1-32767 

    Press Page Down:

    Type choices, press Enter.

                                                    
                                                                                    
     Remote location:                                                               
       Name or address  . . . . . . . > '10.60.26.200'                              
                                                                                    
                                                                                    
                                                                                    
     User-defined options . . . . . .   *NONE         Character value, *NONE        
                    + for more values                                               
     User-defined object:                                                           
       Object . . . . . . . . . . . .   *NONE         Name, *NONE                   
         Library  . . . . . . . . . .                 Name, *LIBL, *CURLIB          
       Object type  . . . . . . . . .                 *DTAARA, *DTAQ, *FILE...      
     Data transform program . . . . .   *NONE         Name, *NONE                   
       Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB          
     System driver program  . . . . .   *HPPJLDRV                                   
     Secure connection  . . . . . . .   *NO           *NO, *YES    

    Here we fill in the IP address of our printer and specify the System driver program needed. As previously mentioned, this value is *HPPJLDRV in the majority of cases, since most ASCII printers provide basic emulation of HP Laser printers.

    Page down again, so you can provide a reasonable description of your new ASCII printer. The Publishing information fields are not necessary, but you can complete them if you wish to provide more internal documentation of the printer capabilities:

                                                                                   
     Validation list  . . . . . . . .   *NONE         Name, *NONE                   
       Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB          
     Publishing information:                                                        
       Support duplex . . . . . . . .   *UNKNOWN      *UNKNOWN, *SIMPLEX, *DUPLEX   
       Support color  . . . . . . . .   *UNKNOWN      *UNKNOWN, *NOCOLOR, *COLOR    
       Pages per minute black . . . .   *UNKNOWN      1-32767, *UNKNOWN             
       Pages per minute color . . . .   *UNKNOWN      1-32767, *UNKNOWN             
       Location . . . . . . . . . . .   *BLANK                                      
       Data streams supported . . . .   *UNKNOWN      *UNKNOWN, *PCL, *PS, *PDF...  
                    + for more values                                               
     Text 'description' . . . . . . .   *BLANK                                      
                                                                                    
                                                                                    
                                Additional Parameters                               
                                                                                    
     Remote network identifier  . . .   *NETATR       Name, *NETATR, *NONE     

    Pressing page down one last time shows a page where you can specify a Workstation customizing object (WSCST). We won't need one for this example. A future article will discuss some of the details of how and why you might want (or need) to create your own WSCST object. For now, just press enter on this last panel:

                                                                                    
     Workstation customizing object     *NONE         Name, *NONE                   
       Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB          
     Authority  . . . . . . . . . . .   *CHANGE       Name, *CHANGE, *ALL, *USE...  

    At this point you will have created your ASCII print device on the iSeries, as an emulated 3812 printer. Initially the device will be varied off, so you will have to type ...

    WRKCFGSTS CFGTYPE(*DEV) CFGD(MYASCII)

    Use option 1 to vary the device on then you can start the print writer and try printing to your new device.

    ---------------------------

    ABOUT THE AUTHOR: Chip Milosch is a consultant at Griffin Consulting. Chip has been in IT for over 25 years, with more than 15 years on the AS/400 and iSeries platforms. In addition, Chip trains clients on how to increase programmer productivity by using new tools. He has spoken several times at DevCon on print-related topics.

    This was first published in March 2007

    There are Comments. Add yours.

     
    TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

    REGISTER or login:

    Forgot Password?
    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
    Sort by: OldestNewest

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to:

    Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.