LIST.LABEL and SORT.LABEL

LIST.LABEL and SORT.LABEL

Top  Previous  Next

 

The LIST.LABEL and SORT.LABEL verbs are used to print address labels from QM files. The LIST.LABEL verb processes records in the order in which they are encountered in the file unless a sort clause in present in the command. The SORT.LABEL verb is equivalent to LIST.LABEL with a final sort by record id.

 

LIST.LABEL {DICT} file.name

{USING {DICT} file.name}

{field.name {field.qualifier} ...}

{selection.clause}

{sort.clause}

{display.clause}

{record.id...}

{FROM select.list.no}

 

SORT.LABEL {DICT} file.name

{USING {DICT} file.name}

{field.name {field.qualifier} ...}

{selection.clause}

{sort.clause}

{display.clause}

{record.id...}

{FROM select.list.no}

 

 

The optional clauses to LIST.LABEL and SORT.LABEL work in exactly the same way as for LIST and SORT except that arithmetic field modifiers (AVERAGE, ENUMERATE, MAX, MIN, PERCENTAGE, TOTAL), breakpoints (BREAK.ON, BREAK.SUP) and the page format keywords (COL.SUP, COL.HDR.SUPP, COL.SPACES, HDR.SUP, DBL.SPC, FOOTING, GRAND.TOTAL, HEADING, PAN, SCROLL, VERTICALLY) are not allowed.

 

The LIST.LABEL and SORT.LABEL commands produce a vertical style report set out into the positions of labels on the printed page. The label page shape may be defined by a record in the dictionary of the file or in the VOC file, or it may be entered in response to prompts.

 

If the command includes the LABEL keyword, this may be followed by the name of an X-type label template record stored in the dictionary or in the VOC. This record contains the page shape as a series of lines. Only the leading numeric part of each line is used thus allowing comments to be inserted explaining what each number represents. A typical label definition might read:

 

1: X

2: 2   Count of labels across the page

3: 8   Count of labels per column

4: 42  Characters per line on each label

5: 7   Lines per label

6: 0   Indentation to first column of leftmost label

7: 6   Horizontal space between labels

8: 3   Lines between labels

9: 1   Omit blanks

 

The final field determines whether blank lines within a label should be omitted. It should be set to 1 to omit or 0 to include such lines.

 

If no LABEL keyword is present in the command line (or any phrase use by the query), the query processor looks for a default label template stored in a record named @LABEL in the dictionary of the file or in the VOC. This action can be suppressed by use of LABEL NO.DEFAULT in the command.

 

If no label template has been specified and either there is no @LABEL record or the NO.DEFAULT keyword has been used, the query processor will prompt the user to enter the label shape parameters in the same order as above. The omit blanks option must be entered as Y or N. The items may be entered in response to each prompt in turn or as a comma separated list.

 

It may be necessary to check that a printer font is chosen where the line spacing fits correctly onto the label page. The SETPTR command top margin may also need to be set to fit the page.

 

 

Example

 

LIST.LABEL CUSTOMERS NAME ADDRESS ID.SUP LABEL ADDR.LABELS LPTR

 

This command prints address labels from all records in the CUSTOMERS file. Each label contains data from the NAME and ADDRESS fields. A label template named ADDR.LABELS is used.