Operating System - OpenVMS

printing barcodes from OpenVMS COBOL

 
J Behr
Frequent Visitor

printing barcodes from OpenVMS COBOL

has anyone printed barcodes from OpenVMS COBOL?

6 REPLIES 6
Hein_vdHeuvel
Occasional Advisor

Re: printing barcodes from OpenVMS COBOL

The answer to your detailed question as asked is: 'YES.'

Now you probably want to know how to do so, and/or get an example. 

What have your tried so far? How far did a google "openvms barcode printing" take you and what else do you need to know?

The difficulty is unlikely with Cobol as such, and may not have anything to do with OpenVMS really, but rather with barcodes in general and for your specific purpose. So look for that first on the wild web, on stack-exchange, perhaps.

For a better question you'll have to tell us more. Specific target printer? Direct connection or going through a file/spooler? Is a specific intermediate target file type required or preferred ? (Text with escapes? PDF, Postscript? Picture)

A simple google leads to an older forum article here as first hit. The language asked for there is C, but the core problem is surely the same. Please "C" your way through all to the information out there first, and if need be then come back asking how 'something' achieved in one language can be achieved in Cobol. IMHO it is up to you to figure out that 'something'. You need to figure out what needs to be done in good detail and then by all means please do come back if you have trouble implementing what needs to be done with Cobol on OpenVMS.

Good Luck!

Hein

https://community.hpe.com/t5/Operating-System-OpenVMS/Barcode-Printing/td-p/6602230

J Behr
Frequent Visitor

Re: printing barcodes from OpenVMS COBOL

Well as long as i know that it can be done, I will continue with it.

The file with the barcode which i hope to create with the proper ESC sequences will be printed (spooled) on a HP LaserJet 4015. 

Our printers are managed through DCPS.

Hein_vdHeuvel
Occasional Advisor

Re: printing barcodes from OpenVMS COBOL

Yeah, you'll get it to work.

Just use some group fields to get escapes in the right place.

Here are code sample for something you do not want just now, but it may help - sequences to tell a terminal to start and stop sending text to an attached printer. I don't have barcode examples handy.

And yes, symbolic values run from 1 - 256, so very oddly you need to specify 28 for escape, not the 27 from the ascii table which you would use when redefining a bytes as comp.

hth,

Hein.

 

:
SPECIAL-NAMES.
    SYMBOLIC CHARACTERS
        NUL            IS   1
        ESCAPE         IS  28
        FORM_FEED      IS  13.
:
INPUT-OUTPUT SECTION.
:
WORKING-STORAGE SECTION.
:
01  ENTER_PRINTER_MODE.
    03  FILLER                      PIC X(01) VALUE ESCAPE.
    03  FILLER                      PIC X(03) VALUE "[5i".
01  EXIT_PRINTER_MODE.
    03  FILLER                      PIC X(01) VALUE ESCAPE.
    03  FILLER                      PIC X(03) VALUE "[4i".

 

 

J Behr
Frequent Visitor

Re: printing barcodes from OpenVMS COBOL

Turns out i will not be able to get it to work as i had planned as our printer is too old and does not have the PCL symbol set required to print barcodes. 

Hein_vdHeuvel
Occasional Advisor

Re: printing barcodes from OpenVMS COBOL

>> Turns out i will not be able to get it to work as i had planned as our printer is too old and does not have the PCL symbol set required to print barcodes. << 

Exactly the point I tried to make in my first reply.

Good luck,

Hein

 

J Behr
Frequent Visitor

Re: printing barcodes from OpenVMS COBOL

UPDATE:   Found that of of our other printer HPM506A had resident barcode fonts.

Using PCL escape sequences, I was able to print a barcode!