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

# GENLABEL.PUB

GENLABEL.PUB is a public program that prints labels for many key files, such as employees, customers, and vendors. Label setup is maintained thru Resource Manager, and then selected as a base for labels in OSAS applications.

SETUP:

This entry point sets up the SCRT$ template used to hold information about the scratch file that contains the data to print on labels.

`1005 SETUP:`
`1010 ENTER FILE[ALL],OSLB$,SCRT$`

Variable | Description
FILE[ALL] | Standard file array
OSLB$ | Current label template from the label ID the user selects to print their labels
SCRT$ | Template for scratch file used to hold data that prints on labels

This chart breaks down the SCRT$ template:

Field | Description
SEQ:C(8*) | Unique sequence number
LINES[OSLB.HEIGHT]:C(OSLB.WIDTH) | Array of lines that holds the data that prints on label. The array is dimesioned to however many lines there are per label, by number of characters wide each label is

START_PRINT:

This entry point is used when the calling program is ready to start printing the data that’s stored in the scratch file built by the calling program, in the format laid out by the SCRT$ template.

`2005 START_PRINT:`
`2010 ENTER FILE[ALL],OSLB$,SCRT_INDEX,SCRT$,PRINT_CHANNEL,COPIES,COLLATE,SKIP_LABELS`

Variable | Description
FILE[ALL] | Standard file array
OSLB$ | Current label template from the label ID the user selects to print their labels
SCRT_INDEX | Index to FILE[ALL] element where the scratch file that holds the data to print is opened on
SCRT$ | Template for scratch file used to hold data that prints on labels
PRINT_CHANNEL | Channel where printer or print file is opened on
COPIES | Number of copies to print for each label
COLLATE | 0=Normal printing, 1=Collated printing
SKIP_LABELS | Set to the number of labels to skip on a normal page