Looks like a barcode printer language, perhaps ZPL or EPL2. Start with the make and model of the printer that is being used and you should be able to google your way to the printer language manual that will help you interpret that.
These were very common in warehouse environments for shipping labels, etc.
Beware that there might be some EBCDIC/ASCII conversion going on that alters some of the characters, so if you find something with that CC or XA command, you're probably on the right track.
The other suggestions of third party barcode projects or the barcode DDS keyword are good ones. if the printer supports it, but its arguable which is more understandable for the next guy. In any case, when you figure it out, add a few comments so the next guy isn't in the same boat.
------------------------------
Vincent Greene
IT Consultant
Lab Services Power Systems Delivery Practice
IBM
Vincent.Greene@ibm.comThe postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
------------------------------
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
------------------------------