Original Message:
Sent: Fri February 10, 2023 11:47 PM
From: Bryan Dietz
Subject: rpgle barcode via o'specs help
please post the code for your printfile.
------------------------------
Bryan Dietz
Original Message:
Sent: Fri February 10, 2023 09:21 AM
From: Steve Anderson
Subject: rpgle barcode via o'specs help
I have that, it is my second line of code
ORITR339 E D1 01
O 3 '^XA'
O E D1
O 4 '^FWN'
and those don't show up in the spool file output.
------------------------------
Steve Anderson
Original Message:
Sent: Fri February 10, 2023 08:59 AM
From: Bryan Dietz
Subject: rpgle barcode via o'specs help
I pasted your code into an on-line viewer program
Labelary Online ZPL Viewer
saw "error" that it was missing a "^XA"
adding that first line shows...

------------------------------
Bryan Dietz
Original Message:
Sent: Fri February 10, 2023 08:32 AM
From: Steve Anderson
Subject: rpgle barcode via o'specs help
Hello,
I am still having issues, the spool file creates but nothing comes out of the zebra printer.
Here is my code in the O specs of the program:
ORITR339 E D1 01
O 3 '^XA'
O E D1
O 4 '^FWN'
O E D1
O 4 '^PRA'
O* FIELD ORIENTATION: HORIZONTAL,VERTICAL
O E N65 D1
O 21 '^FO310,30^A0,25,25^FD'
O 43 'Property of Agiliti^FS'
O E N65 D1
O 21 '^FO310,30^A0,25,25^FD'
O 43 'Property of Agiliti^FS'
O*
O E D1
O 11 '^BY2,2.4,20'
O* THIS IS THE HUMAN READABLE TEXT
O E D1
O 21 '^FO250,63^A0,75,80^FD'
O S1PFX 24
O S1EQNO 29
O 32 '^FS'
O E D1
O 21 '^FO251,63^A0,75,80^FD'
O S1PFX 24
O S1EQNO 29
O 32 '^FS'
O* THIS IS THE BAR CODE
O E D1
O 25 '^FO295,130,^B3,,60,N,D^
O S1PFX 28
O S1EQNO 32
O 35 '^FS'
O E D1
O 3 '^XZ'
And the resulting spool file:
^FWN
^PRA
^FO310,30^A0,25,25^FDProperty of Agiliti^FS
^FO310,30^A0,25,25^FDProperty of Agiliti^FS
^BY2,2.4,20
^FO250,63^A0,75,80^FDAIK 0500^FS
^FO251,63^A0,75,80^FDAIK 0500^FS
^FO295,130,^B3,,60,N,D^FDAIK0500^FS
^XZ
Do I need to override the printer file to allow for a zebra printer that has a prefix format of 5EH?
Thank you, Steve
------------------------------
Steve Anderson
Original Message:
Sent: Wed February 08, 2023 01:50 AM
From: Satid Singkorapoom
Subject: rpgle barcode via o'specs help
Dear Steve
Please look at Glenn Gross's post above and you will find the answer is yes. Read the manual from the URL that Mr. Glen provided for more information.
------------------------------
Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
------------------------------
Satid S.
Original Message:
Sent: Tue February 07, 2023 11:35 AM
From: Steve Anderson
Subject: rpgle barcode via o'specs help
Does the ^XA work for the Zebra printers that have a prefix format of 5EH? Our Zebra printers were changed to the AA prefix format so that we could print a barcode label from the O specs in the RPGLE program.
------------------------------
Steve Anderson
Original Message:
Sent: Fri August 19, 2022 08:57 AM
From: Glenn Gross
Subject: rpgle barcode via o'specs help
A lot of good info here. The code looks like the raw zebra print codes I have used. It is low level printing to a barcode zebra printer.
I see "EVAL DATA1='¬XA¬JMA¬FS¬XZ" is a ZPL codes.
This manual should help.
https://www.zebra.com/content/dam/zebra_new_ia/en-us/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf
Example from PDF page 374.
ZPL Commands ^XA
The ^XA command is used at the beginning of ZPL II code. It is the opening bracket and indicates the start
of a new label format. This command is substituted with a single ASCII control character STX (control-B,hexadecimal 02).
Start Format
Format: ^XA
Comments: Valid ZPL II format requires that label formats should start with the
^XA command and end with the ^XZ command
------------------------------
Glenn Gross
Original Message:
Sent: Thu August 18, 2022 09:26 AM
From: Jack Woehr
Subject: rpgle barcode via o'specs help
That's a good way of looking at it, @Lori Austin
------------------------------
Jack Woehr
IBM Champion 2021 -2022
Original Message:
Sent: Thu August 18, 2022 08:50 AM
From: Lori Austin
Subject: rpgle barcode via o'specs help
I just finished a barcode project and it helped me to think of it this way -- a barcode is just text printed with a different font. So you need to handle it like you would change any other font. We did end up exporting the data for printing at a third party so I can't help with any specifics. We also did the barcode reading with open source (node.js) because we took a PC network off-site, although it can be done in RPG. Again, a barcode scanner is just like a keyboard. Those two concepts helped me get my head wrapped around the project.
------------------------------
Lori Austin
Original Message:
Sent: Thu August 11, 2022 12:43 PM
From: Kevin Barkema
Subject: rpgle barcode via o'specs help
Hi,
This really isn't in my wheelhouse but am being asked to produce a barcode from an RPGLE program. We have some programs that do this but the "how" isn't obvious to me by looking at the code.
Hoping somebody can point me to a manual or tutorial where this is referenced. Below is some of the code in an already working program....
(I see nothing in the control CL doing anything fancy, and the O'specs are minimal)
IF SIZE = 1
EVAL DATA1='~CC¬
EVAL DATA2='
EXCEPT DETAIL
ENDIF
IF SIZE = 2 OR SIZE = 3
EVAL DATA1='~CC¬XZ
EVAL DATA2='
EXCEPT DETAIL
ENDIF
EVAL DATA1='¬XA¬JMA¬FS¬XZ
EVAL DATA2='
EXCEPT DETAIL
EVAL DATA1='¬XA¬MTT¬FS¬XZ
EVAL DATA2='
EXCEPT DETAIL
EVAL DATA1='¬XA¬MNY¬FS¬XZ
EVAL DATA2='
(Ospec)...
*******************************************OUTPUT SPECS******
OPRINTER E DETAIL 1
O DATA1 29
O DATA2 66
(try a snip since the copy and paste removed formatting)

------------------------------
Kevin Barkema
------------------------------