View Single Post

   
  #2 (permalink)  
Old 01-05-2008, 12:32 PM
Ian Northeast
 
Posts: n/a
Default Re: Barcode printing: Unix to HP?

On Wed, 04 Apr 2007 11:00:45 -0400, John B. wrote:

> Programming in COBOL on a Unix mainframe - I'm trying to get Code 128
> barcodes to print on an HP LaserJet 2430n. The appropriate PCL code is
> sent via a print file and ends up in a Unix print queue. Everything is
> recognized, except the start and stop characters of the barcode escape
> sequence. They are passed as a Hex A2 and Hex A4, respectively, (and show
> as such when displayed in hex) but are somehow "lost" come time to
> physically print them on the HP. All I'm getting are the data characters
> and check character in the barcodes, thus making them unscannable.
>
> When I physically send those hex characters to the printer, they come out
> as an inverted L for the Hex A2 and a double pipe for the Hex A4, which
> are way off. Would they be getting mucked up going from EBCDIC to ASCII?
> Are there any print queue settings on the Unix side I need to change?
> Filters, perhaps? (The HP will successfully print a Code 128 barcode via
> other methods, so it's not the printer itself.) Or is this simply not
> possible to do??


Could you please clarify the setup? What do you mean by a "Unix
mainframe"? While there have been a couple of versions of UNIX for
mainframes they are very rare and I believe they all use ASCII not EBCDIC.

Are you printing from a mainframe running e.g. MVS to an AIX LPD server?
If so then yes, the character code translation probably is messing it up.
If this is the case then you may need to experiment to see what characters
get turned into the ones you want - running dd on AIX with conv=ebcdic or
conv=ibm may help here.

If the print queue on AIX is the "jetdirect" type (it doesn't have to be,
they also support LPD) it will need to be set to binary mode to pass non
text characters.

Where are you seeing these xA2 and xA4 codes? On the EBCDIC or ASCII side?

Regards, Ian
Reply With Quote