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

# GENOTBBJ.PUB

GENOTBBJ.PUB is a public program for selecting the output destination when printing to a BBj PDF file or print object. Programs that provide a BBj form for output should call this routine for printer selection.

`0110 ENTER DEVICE$, CHANNEL, OUT_COLS, OVRDARCHIVE$, RPTPFX$, BBJPRINTER$, BBJPATH$, FORM_TYPE$, COPIES, PRINT_DEVICE$, PRINT_CHANNEL, LINES, COPY_NAME$[ALL], ALIGNMENT`

Variable | Description
DEVICE$ | Devices that can be selected. One or more of the following options are valid: E = all P = printer F = file
CHANNEL | Set to the channel number of the device. This will normally return 0.
OUT_COLS | Number of output columns, usually 80 or 132. This will normally return 0.
OVRDARCHIVE$ | Overrides the normal archive path.
RPTPFX$ | Returns the report prefix.
BBJPRINTER$ | Contains the java name of the BBj printer the form will print to.
BBJPATH$ | Contains the name of the path that the PDF file will be printed to.
FORM_TYPE$ | The ID of the Form Type from the OSFRM file
COPIES | Number of copies to be printed (returned to calling program)
PRINT_DEVICE$ | The device name of the printer or device for the output. This will generally be blank.
PRINT_CHANNEL | The channel on which the printer will be opened. This will generally be 0.
LINES | Unused
COPY_NAME$[ALL] | The copy descriptions for the form (returned to calling program)
ALIGNMENT$ | Set to YES if an alignment should be printed; or NO if no alignment is necessary (returned to calling program)

GENOTBBJ.PUB controls output selection, including printer selection and the file name for file output. BBj forms do not have a print to screen ability, so terminal output is not done through this routine.

Since BBj forms do not rely on a specific number of output column or output channel, those variables return 0 to the calling program. Instead, the name of the BBj printer that the user choses to print to is passed back for use in the print program.

GENOTBBJ.PUB also determines whether GUI mode is currently active. If so, GENGOBBJ.PUB is run from GENOTBBJ.PUB.