Hi ebmaust,
One method requires that you know the control characters for the printer being used to print the barcodes. For example, if the printer is an OKIDATA 4410 and you wanted to print Interleave 2 of 5 barcodes, you would do the following:
First define the print command to select the type and size of the barcode:
* N0 = designates the number of characters to follow
* N1 = selects Interleaved 2 of 5
* N2 thru 8 defines the physical size of the barcode
*
******************************************************************
Code:
01 select-code.
05 filler pic 9 comp-x value 27.
05 filler pic 9 comp-x value 16.
05 filler pic x value "A".
05 n0 PIC 9 comp-x value 8.
05 n1 PIC 9 comp-x value 3.
05 n2 PIC 9 comp-x value 0.
05 n3 PIC 9 comp-x value 0.
05 n4 PIC 9 comp-x value 3.
05 n5 PIC 9 comp-x value 0.
05 n6 PIC 9 comp-x value 0.
05 n7 PIC 9 comp-x value 0.
05 n8 PIC 9 comp-x value 0.
We used comp-x since we want to send the binary equivalent of the values to the printer. 27 16 is Escape DLE.
Second define the command to print the barcode.
Code:
01 bar-code.
05 filler pic 9 comp-x value 27.
05 filler pic 9 comp-x value 16.
05 filler pic x value "B".
05 no-of-chars pic 9 comp-x value 8.
05 bar-code-chars pic x(9) value "12345678".
Now send the commands to the printer:
write print-record from select-code.
write print-record from bar-code.
The above would print a barcode for the characters 12345678.
You can probably obtain the printer commands from the printer manufacturer's web site.
Let me know if you need more information
Mike Marley