?
Solved

Configuring a Zebra P110i on an AS400 as a network printer

Posted on 2010-03-24
10
Medium Priority
?
1,566 Views
Last Modified: 2012-05-09
I am trying to configure a Zebra P110i to print simple text output from an RPG program on our AS400.  However I dont know what is the correct device setup to configure correctly.  The IP address responds correctly but everytime I try to print the spool file I get an error message on printer and no output.
Could somebody help please?
0
Comment
Question by:mf999
  • 4
  • 3
  • 2
9 Comments
 
LVL 36

Expert Comment

by:Gary Patterson
ID: 28449033
Please show your configuration and the specific error message, with details.

- Gary Patterson
0
 

Author Comment

by:mf999
ID: 28451896
The specific error on the display of the printer say command error.

DEVICE Descrption on AS400
                                                           
 Device description . . . . . . . . :   IEEP0014            
 Option . . . . . . . . . . . . . . :   *BASIC              
 Category of device . . . . . . . . :   *PRT                
                                                           
 Device class . . . . . . . . . . . :   *LAN                
 Device type  . . . . . . . . . . . :   3812                
 Device model . . . . . . . . . . . :   1                  
 LAN attachment . . . . . . . . . . :   *IP                
 Port number  . . . . . . . . . . . :   9100                
 Physical attachment  . . . . . . . :   *DIRECT            
 Online at IPL  . . . . . . . . . . :   *YES                
 Font:                                                      
   Identifier . . . . . . . . . . . :   11                  
   Point size . . . . . . . . . . . :   *NONE              
 Form feed  . . . . . . . . . . . . :   *AUTOCUT            
 Separator drawer . . . . . . . . . :   *FILE              
                                                     
 Device description . . . . . . . . :   IEEP0014      
 Option . . . . . . . . . . . . . . :   *BASIC        
 Category of device . . . . . . . . :   *PRT          
                                                     
 Separator program  . . . . . . . . :   *NONE        
 Printer error message  . . . . . . :   *INQ          
 Message queue  . . . . . . . . . . :   *CTLD        
 Current message queue  . . . . . . :   QSYSOPR      
   Library  . . . . . . . . . . . . :     QSYS        
 Activation timer . . . . . . . . . :   170          
 Inactivity timer . . . . . . . . . :   *SEC15        
 Line speed . . . . . . . . . . . . :   19200        
 Word length  . . . . . . . . . . . :   8            
 Type of parity . . . . . . . . . . :   *NONE        
 Stop bits  . . . . . . . . . . . . :   1            
 Host print transform . . . . . . . :   *YES          
                                                             24/0
 Device description . . . . . . . . :   IEEP0014                
 Option . . . . . . . . . . . . . . :   *BASIC                  
 Category of device . . . . . . . . :   *PRT                    
                                                                 
 Manufacturer type and model  . . . :   *WSCST                  
 Paper source 1 . . . . . . . . . . :   *LETTER                  
 Paper source 2 . . . . . . . . . . :   *LETTER                  
 Envelope source  . . . . . . . . . :   *NUMBER10                
 ASCII code page 899 support  . . . :   *NO                      
 Image configuration  . . . . . . . :   *NONE                    
 Character identifier . . . . . . . :   *SYSVAL                  
 Remote location:                                                
   Name or address  . . . . . . . . :   193.242.36.130          
                                                              Device description . . . . . . . . :   IEEP0014  
 Option . . . . . . . . . . . . . . :   *BASIC    
 Category of device . . . . . . . . :   *PRT      
                                                   
 Workstation customizing object . . :   HP4SRC    
   Library  . . . . . . . . . . . . :     QGPL    
 User-defined object  . . . . . . . :   *NONE      
   Object type  . . . . . . . . . . :     *NONE    
 Data transform program . . . . . . :   *NONE      
 System driver program  . . . . . . :   *HPPJLDRV  
 Allocated to:                                    
 Job name . . . . . . . . . . . . . :   IEEP0014  
   User . . . . . . . . . . . . . . :     QSPLJOB  
   Number . . . . . . . . . . . . . :     211120  
 Published  . . . . . . . . . . . . :   *NO    
                                                             
 Device description . . . . . . . . :   IEEP0014            
 Option . . . . . . . . . . . . . . :   *BASIC              
 Category of device . . . . . . . . :   *PRT                
                                                             
 Publishing information:                                    
   Support duplex . . . . . . . . . :   *UNKNOWN            
   Support color  . . . . . . . . . :   *UNKNOWN            
   Pages per minute black . . . . . :   *UNKNOWN            
   Pages per minute color . . . . . :   *UNKNOWN            
   Location . . . . . . . . . . . . :   *BLANK              
   Data streams supported . . . . . :   *UNKNOWN            
 Text . . . . . . . . . . . . . . . :   Zebra Printer P110i  
                                                             
                                                             
We are just trying to send a simple line of text to the printer using a standard print file and an rpg program

Print file attributes are as follows

                                                                             
 Save file after written  . . . . . . . :   *YES                              
 Device type  . . . . . . . . . . . . . :   PRINTER                          
 Printer device type  . . . . . . . . . :   *SCS                              
 Device file  . . . . . . . . . . . . . :   AUTPRTF                          
   Library  . . . . . . . . . . . . . . :     IEVAUOPLM                      
 User-specified data  . . . . . . . . . :   AUTPRTBRS                        
 Accounting code  . . . . . . . . . . . :                                    
 Program that opened file . . . . . . . :   AUTPRTBRS                        
   Library  . . . . . . . . . . . . . . :     IEVAUOPLM                      
 Date file was opened . . . . . . . . . :   19/03/10                          
 Time file was opened . . . . . . . . . :   16:12:03                          
 Date file was last used  . . . . . . . :   23/03/10                          
                                                   
 Device requirements:                              
   Final form text  . . . . . . . . . . :   N      
   Variable font  . . . . . . . . . . . :   N      
   Variable LPI . . . . . . . . . . . . :   N      
   Variable drawer  . . . . . . . . . . :   N      
   Superscript/subscript  . . . . . . . :   N      
   Variable character ID  . . . . . . . :   N      
   Highlight  . . . . . . . . . . . . . :   N      
   Extended 3812 font . . . . . . . . . :   N      
   Graphics 522X  . . . . . . . . . . . :   N      
   Graphics 4214  . . . . . . . . . . . :   N      
   Graphics 4234  . . . . . . . . . . . :   N      
                                                   
                                                   
   Graphics . . . . . . . . . . . . . . :   N      
   Bar codes  . . . . . . . . . . . . . :   N      
   Rotation . . . . . . . . . . . . . . :   N      
   PC printer emulation . . . . . . . . :   N      
   Defined characters . . . . . . . . . :   N      
   Variable CPI . . . . . . . . . . . . :   N      
   Transparency . . . . . . . . . . . . :   N      
   IPDS transparent data  . . . . . . . :   N      
   Field outlining  . . . . . . . . . . :   N      
 Last page printed  . . . . . . . . . . :          
 Total pages  . . . . . . . . . . . . . :   1      
 Restart printing . . . . . . . . . . . :   *STRPAGE
                                                   
 Page range to print:                              
   Starting page  . . . . . . . . . . . :   1      
   Ending page  . . . . . . . . . . . . :   *END    
 Record length  . . . . . . . . . . . . :   20      
 Page size:                                        
   Length . . . . . . . . . . . . . . . :   18      
   Width  . . . . . . . . . . . . . . . :   20      
   Measurement method . . . . . . . . . :   *ROWCOL
 Lines per inch . . . . . . . . . . . . :   6      
 Characters per inch  . . . . . . . . . :   10      
 Overflow line number . . . . . . . . . :   60      
 Fold records . . . . . . . . . . . . . :   *NO    
                                                     
 Control character  . . . . . . . . . . :   *NONE    
 Replace unprintables . . . . . . . . . :   *YES    
   Replacement character  . . . . . . . :     ' '    
 Align page . . . . . . . . . . . . . . :   *NO      
 Print quality  . . . . . . . . . . . . :   *STD    
 Form feed  . . . . . . . . . . . . . . :   *DEVD    
 Source drawer  . . . . . . . . . . . . :   1        
 Output bin . . . . . . . . . . . . . . :   *DEVD    
 Font:                                              
   Identifier . . . . . . . . . . . . . :   *CPI    
   Point size . . . . . . . . . . . . . :   *NONE    
                                                     
                                                      Character identifier:                              
   Graphic character set  . . . . . . . :   *DEVD  
   Code page  . . . . . . . . . . . . . :          
 Page rotation  . . . . . . . . . . . . :   0      
 Justification  . . . . . . . . . . . . :   0      
 Print on both sides  . . . . . . . . . :   *NO    
 Pages per side . . . . . . . . . . . . :   1      
 Reduce output  . . . . . . . . . . . . :   *TEXT  
 Unit of measure  . . . . . . . . . . . :   *INCH  
                                                                                                               
 Front side overlay:                                        
   Overlay  . . . . . . . . . . . . . . :   *NONE          
     Library  . . . . . . . . . . . . . :                  
   Offset down  . . . . . . . . . . . . :   0              
   Offset across  . . . . . . . . . . . :   0              
 Back side overlay:                                        
   Overlay  . . . . . . . . . . . . . . :   *FRONTOVL      
     Library  . . . . . . . . . . . . . :                  
   Offset down  . . . . . . . . . . . . :                  
   Offset across  . . . . . . . . . . . :                  
   Constant back  . . . . . . . . . . . :                  
                                                                                                                       
 Form definition  . . . . . . . . . . . :                  
   Library  . . . . . . . . . . . . . . :                  
 Print fidelity . . . . . . . . . . . . :   *CONTENT        
 User defined text  . . . . . . . . . . :                  
                                                           
 User defined option  . . . . . . . . . :   *NONE          
 User defined data  . . . . . . . . . . :   *NONE          
                                                             User defined object:                                  
   Object . . . . . . . . . . . . . . . :   *NONE      
     Library  . . . . . . . . . . . . . :              
   Object type  . . . . . . . . . . . . :              
 Decimal format . . . . . . . . . . . . :   *JOB      
 Spooled file size (K)  . . . . . . . . :   28        
 IPDS pass through  . . . . . . . . . . :   *DEVD      
 User resource library list . . . . . . :   *DEVD      
 Corner staple  . . . . . . . . . . . . :   *NONE      
 Font resolution for formatting . . . . :   *DEVD      
                                                                                                               
 Edge Stitching:                                        
   Reference edge . . . . . . . . . . . :   *NONE        
   Reference edge offset  . . . . . . . :                
   Number of Staples  . . . . . . . . . :                
   Staple offsets . . . . . . . . . . . :                
 Saddle Stitch:                                          
   Reference edge . . . . . . . . . . . :   *NONE        
   Number of Staples  . . . . . . . . . :                
   Staple offsets . . . . . . . . . . . :                
                                                         
                                                         
                                                           
                                                           
                                                   
                                                                                                       
 
   
                                                                 
                                                           
0
 
LVL 36

Expert Comment

by:Gary Patterson
ID: 28454701
Well, unless this printer speaks PJL/PCL (I'm not familiar with this particular printer, but most of the Zebra barcode printers, at least, don't - they speak one or more of several Zebra proprietary printer languages, like ZPL), you probably won't have much luck with that approach, unless you've customized that QGPL/HP4SRC workstation customization object to contain the correct printer commands for this particular printer.

By default, the AS/400 sends printed output in SCS (SNA Character Stream), which is EBCDIC, and just simply guaranteed not to work on any printer that isn't designed for it.  Same with IPDS and AFPDS.  This is certainly an ASCII printer, so that means either hand-coding in the low-level printer language, using a utility that knows this printer language, or using Host Print Transform.

I assume this is an ASCII printer, and you've configured Host Print Transform, which will convert EBCDIC to ASCII for you:

Host print transform . . . . . . . :   *YES        
And you've configured a specific workstation customization object containing printer commands:

Manufacturer type and model  . . . :   *WSCST                  
Workstation  customizing object . . :   HP4SRC    
   Library  . . . . . . . . . .  . . :     QGPL    
Based on the name, I am guessing that this WSCST object contains HP4 PCL commands.  

Based on the error that you're getting, I'm guessing that the printer doesn't know what to do with those PJL/PCL commands when it receives them.  Even if you managed to just send a raw line of text (and you probably didn't if you used HPT - it'll insert initialization commands automatically), with no commands, there is no guarantee that the printer would know what to do with it - for example, this printer may require some sort of initialization command.

I've done a LOT of printing: hundreds of different printers over the years, and oddball printers like this are difficult to use unless they emulate an AS/400 supported printer, or unless the manufacturer or a third party supplies a driver or interface utility.

Some options:

1) Find a manufacturer-supplied or third-party supplied program that supports this printer on the AS/400.  If this was a barcode printer, I'd suggest TL Ashford's Barcode/400: they have fantastic Zebra support.  Probably worth checking with them anyway - this might be a supported printer.  This package will pay for itself over and over, in my experience.  Even though there is a cost and a small learning curve, if you factor in time, this is usually the cheapest overall solution.  

2) Contact Zebra tech support and ask them about AS/400 printing tools for this printer.  You can also find out what printer language it supports (not on the data sheet - I looked), and get a link to the technical reference for that language.

3) Write your own custom driver program, or bring in a printing expert to help you with this.  This should be a last resort, IMHO, unless you are planning on developing a commercial product for resale.  This is an expensive long-term solution, since you have the complexity of learning how to print to this particular printer, custom coding to this printer, and then you have to maintain those programs over time, and probably scrap them in a few years when you move on to newer hardware and this printer isn't being made anymore.

4) Interface to the printer through Windows.  This may be the least expensive approach, though it can be a little tricky if you've never done it before.  Zebra supplies a Windows printer driver, and I'm sure they have software that can be used to layout and print cards.  Usually, these applications offer a "batch print" option that allows you to download a file or call a program that invokes the printing software.  I've developed these interfaces many times, and often the process works like this:

  • AS/400 program creates a file containing the information needed to generate one or more cards.
  • AS/400 program exports the file (maybe a CSV) to the Integrated File System, to a share visible to Windows.
  • AS/400 uses RUNRMTCMD, for example, to launch the Windows Label Printing utility, passing the filename containing the cards to print.
5) Create your own custom workstation customization object to allow HPT to handle the transform for you.  If you can make this approach work, this is definitely better than hand-coding a driver, but there are some functionality limitations, and it is still a fairly complex task that requires a great deal of familiarity with the printer language of the target printer.

- Gary Patterson

http://www.experts-exchange.com/M_4382324.html



0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 

Author Comment

by:mf999
ID: 28470444
Gary
Thank you for your comprehensive answer.

Let me just outline that as regards the device setup, i was trying to get anything to work..ie taking a HP printer that we have configured here and copying it and then using some suggestions from the web, so my configuration as outlined above is just a guess.

I have found out the following...TL Ashford do not support this type of Zebra Card printrer so the 3rd party software does not appear to be an option.    The technical support for the printer tell me the It uses EPCL language (ELTRON contoller language for Card Readers)
Our requirement is just to print 2 or 3 simple lines of text on a plastic card each time an order is processed on the AS400 no bar codes or graphics.  Do you think it is possible to configure the device setup correctly to do this  or do we have to have a special print file in the RPG program?
Thank you for your assistance to date.   I look forward to your suggestion


0
 
LVL 36

Expert Comment

by:Gary Patterson
ID: 28555760
Yes, it is possible, but you'll need to either write custom code to format the printer string, or create a custom workstation customization object with EPCL commands in it.

One way is to create a *USERASCII printer file, which allows you to code ASCII commands and text right into the printer file, and print directly to an ASCII printer.  You'll need to get the EPCL technical reference (Programming Guide),and figure out how to initialize the pinter and possibly how to position your print on the card.  It isn't very hard if your requirements are very basic.

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzalu/rzaludevtype.htm

Note that when you user *USERASCII spooled files, you will want the printer configured TRANSFORM(*NO).

If you prefer to create c custom Workstation Customization Object, you'll configure a standard printer file, and print to it like to any other printer, but you'll need to figure out what sections need to be set up in your workstation customization object.

- Gary Patterson



0
 

Author Comment

by:mf999
ID: 30012284
Hi Gary

Unfortunately I dont have any experiencing of producting non standard printer files or customization of workstation objects.

I have downloaded the Zebra EPCL programmers guide from Zebra.

One of our programming team has already created the program he requires to output the name and address text lines on a standard print file.

Do I need to go back and tell him that he now needs to creat a *userascii file and that the output needs to be in hex?   Do you have sample DDS printer file that we could follow?

Looking at the workstation customization object suggestion, I found a source file on our as400 that appears to have been used for a HP4 file.      Can i use this as a base?  Does it mean I need to find the Zebra alternative commands and put them into this file ?
I
 *************** Beginning of data **
 :WSCST DEVCLASS=TRANSFORM.          
                                     
     :TRNSFRMTBL.                    
     :PRTDTASTRM                    
       DATASTREAM=HPPCL5.            
     :NOPRTBDR                      
       OPTION=TOP                    
       ORIENT=PORTRAIT              
       DATA =  240.                  
     :NOPRTBDR                      
       OPTION=LEFT                  
       ORIENT=PORTRAIT              
       DATA =  360.                  
     :NOPRTBDR                      
       OPTION=RIGHT                  
       ORIENT=PORTRAIT              






0
 
LVL 17

Accepted Solution

by:
Murphey earned 2000 total points
ID: 33062785
Hi mf999,

It's perferable NOT to use Zebra and/or stripe printers as AS/400 / iSeries print device.
a lot of drivers will add extra coding to the print and this makes the result unpredictable.

The best and most secure way to "speak" to these printers is by Transfering (with FTP) the designed label to the printer.

Two big advantages.
1- the label is een text fiel and can be browsed and stored etc.
2- it's very easy to develope a label with a text editor as first step in label design.

Regards,
Murphey
0
 
LVL 36

Expert Comment

by:Gary Patterson
ID: 33064034
Personally, I love the Zebra printers, but Murphey is right - coding for them is not a job for the fainthearted.

Buy an inexpensive, robust barcode package.  I recommend TL Ashford's excellent product: Barcode 400.  Pay for itself over and over if you do much barcoding and labeling, and comes with built in support for lots of major barcode printers.

- Gary Patterson
0
 
LVL 17

Expert Comment

by:Murphey
ID: 33064377
Hey Gary,

TL Ashford's ISN'T an excellent product for developers, it takes all fun away from programming,
Programmers love it to shift lines 0,2 inch to the left or right :-)...

Learning ZPL or ZPL2 isn't that difficult and for the lazy programmers and users, they can hire me to do it :-)

But any way it doesn't matter how you create it, FTP to the device is faster, more reliable and more simple then using whatever printer driver on whatever system :-)

Regards
Murph

 
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You do not need to be a security expert to make the RIGHT security. You just need some 3D guidance, to help lay out an action plan to secure your business operations. It does not happen overnight. You just need to start now and do the first thin…
In-App Messaging has revolutionized the way we look at marketing. It has also changed the way we use Apps. If In-App Messaging is used well then you will find that it can drive a lot of traffic to specific areas of your site. It also helps to improv…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…
Suggested Courses

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question