You are here: Development Standards > Routines > General Routines > GENBARCD.PUB

# GENBARCD.PUB

GENBARCD.PUB is a public program that is used to generate barcode images. These images are then used for printing on BBj PDF forms.

CODE128:

This entry point will build a bar code image in 128 format, and save that image with the path and name specified.

`1010 CODE128:`
`1030 ENTER FILENAME$,CODE$,HEIGHT_SIZE,MSG$,NO_BARCODE`

Variable | Description
FILENAME$ | Path and name of data file to save
CODE$ | Text to translate to a barcode
HEIGHT_SIZE | Height of image file to create. Units is in a proprietary measurement; OSAS uses '3' on BBj forms
MSG$ | Returns an error message if any are generated
NO_BARCODE | Set to 1 if java barcode4j.jar can not be instantiated

Exit Points | Explanation
EXIT | GENBARCD.PUB does not return any errors.
EXIT ERR | GENBARCD.PUB returns error message in MSG$

POSTNET

This entry point will build a POSTNET bar code image, and save that image with the path and name specified.

`2010 POSTNET:`
`2030 ENTER FILENAME$,CODE$,MSG$,NO_BARCODE`

Variable | Description
FILENAME$ | Path and name of data file to save
CODE$ | Text to translate to a postnet barcode
MSG$ | Returns an error message if any are generated
NO_BARCODE | Set to 1 if java barcode4j.jar can not be instantiated

CHECK_BARCODE

This entry point will check to see if the barcode4j.jar file is in the java classpath used by BBj. If the jar file is available, programs can then call this routine to build bar code image files.

`2505 CHECK_BARCODE:`
`2510 ENTER USE_BARCODE`

Variable | Description
USE_BARCODE | If Code128Bean() method can be accesses, USE_BARCODE is set to a 1.