zebra printer as/400

265 pts.
AS/400 printing
Zebra printers
Hi all, I need to print labels to Zebra printer from existing RPG program. I created outq and devprt. How do I send data to Zebra? Thank you, Larisa.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Bidmac46, thank you. Looks like we are doing the same with printng UPS labels. How can I embed ZPL file to RPG?

example of 2 line label we use for ID labels for in house use.(1X3 labels.)
If *in21 is on it will print 2 lines up to 19 Characters that are 10/32″ high
If *IN22 is on it will print up to 25 Characters that are 1/4 inch high
LBLTXT** fields are entered fby user from entry program and can specify # of labels needed. .
O 13 ‘>XA>PON>LH0,0’
O 21 34 ‘>FO015,030>A0,090,055’
O 22 34 ‘>FO015,030>A0,070,040’
O 37 ‘>FV’
O 21 LBLTXT1A 56
O 22 LBLTXT2A 62
O 21 59 ‘>FS’
O 22 65 ‘>FS’
O 21 34 ‘>FO015,130>A0,090,055’
O 22 34 ‘>FO015,130>A0,070,040’
O 37 ‘>FV’
O 21 LBLTXT1B 56
O 22 LBLTXT2B 62
O 21 62 ‘>FS>XZ’
O 22 68 ‘>FS>XZ’
Tthe ‘>’ is what we send as as a control character to to the printer’. We send it ~XA~CC>~XZ once via an rpg created spool file when the printers are put in production and ocasionally when for some reason it looses the setting and just blinks green instead of printing. We also have some printing using the default control character ~because we need print a > on the label. If using the default ~ control, replace the > in the print specs with a ~. The above looks kinda confusing unless you understand hoiw it works. For example the only thing printing on the label is the data in the varaibles. The other is telling the Zebra via ZPL where on in the label to put which variable ,the font and end of label, etc .t.
You MUST!!!!!!! get the ZPL II manual from the Zebra site</ul></b>

. .
It’ really pretty easy once you get past the fact that the end position of the field in RPG specs gas nothing to do with placement on the label which is controlled by the ZPL II values. Also look at some of the other related questions on Zebra.

Discuss This Question: 4  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • philpl1jb
    What printer has your RPG UPS program been printing to? Was it designed to print to a Zebra printer. You will want to get the Zebra programmers manual from Zebra.COM But you must know which Zebra you have. Your program will have to send escape codes to prepare the printer and locate at the correct positions--it might already do that if you've been printing to a similar printer. Phil
    53,910 pointsBadges:
  • WoodEngineer
    In another life I printed to a Zebra attached to an AS/400 using twinax. That will give you an idea of how long ago it way. We configured the printer as the most basic character-based printer. It might have been a model 5224 printer. The print file was a single field of 80 or more characters. We wrote the ZPL commands and data to the print file in clear text. Everything was human readable when the print file was displayed. It seems there was a special character that replaced one of the ZPL command-related characters. Might have been the Lazy L, i.e. the character that looks like an L on its side. The Zebra operated somewhat like a laser printer in that it does not print until the whole label is written to the spool followed by a character string that is the print-it-now command. Again this is contained in the print file in clear text. The manual will be invaluable, as Philpl1jb recommends. "Don't leave home without it." One thing that caused us some grief at the beginning was not using the correct reference point when specifying the X and Y coordinates for the print data. Once that was corrected we started to see data on the tickets. This was a jewelry applications - you know those little tags you see on rings at the store. There was not a lot of real estate to work with. By using the wrong reference point it turned out that we were coding data to print in an area which did not land on our tags. Hope this helps. The Zebra is a great printer. It served us very will with almost no problems.
    6,955 pointsBadges:
  • Bigmac46
    If you search this site there are examples of how to set up output to a zebra using ZPL and printing simple labels. We use several models of printers based on the need at the location. We still have ha ve twinax connected zebras definead as 4214s and 5224s. We also have zebras connected as Client access printers and defined as generic text printers on the PC and 4114's on the 400. We did have 1 IP connected but we always have a dumb terminal or PC at the same location so we use that device as a connection poit for the Zebra. In one location we have 2 zebras and a 2500 series dotmatrix all connected to the same PC. The device type and connection type is transparent tothe zebra. We create all our labels in house(including UPS labels) and normally use QSYSPRT spoolfiles. As WoodEngineer says - when the ZPL code is embeded in the string it just works. The zebras really don't care how they are connect as long the outq gets the spoolfile to them. Another repeat - get the manual from Zebra.
    1,000 pointsBadges:
  • Bigmac46
    and 4114’s should have been 4214s
    1,000 pointsBadges:

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: