IBM Support

Query/400 Creating Labels

Troubleshooting


Problem

This document explains how to create labels with Query/400.

Resolving The Problem

Query/400 example of creating labels:

1.

The data file layout is as follows:

      Field Length Dec Type Text

NAME 30 A Name
ADDR1 30 A Address line 1
ADDR2 30 A Address line 2
CITY 15 A City
STATE 2 A State
ZIP 5 0 P Zip code
2. Create the query taking note of the following information:

Select specify report column formatting, and change the headings for each field to *NONE. *NONE must be specified in uppercase. Also specify column spacing as 0 for ADDR1, ADDR2, and CITY as these fields begin printing at the start of each line. Edit the ZIP field so that the entire contents of the field prints without editing.

Select specify output type and output form. Designate the output type as printer, line wrapping to yes, and record on one page to yes. Specify the length as 6, width as 30, start line as 2, and end line as 5.
3. The query definition for this example is as follows:

                   
Query . . . . . . . . . . . . . . . . . QRYLABEL
Library . . . . . . . . . . . . . . . XZY2664
Query text . . . . . . . . . . . . . . Employee Mailing Labels
Selected files
ID File Library Member Record Format
T01 EMPLOYEE XZY2664 *FIRST EMPLOYER
Ordering of selected fields
Field Sort Ascending/ Break Field
Name Priority Descending Level Text
NAME NAME
ADDR1 ADDRESS 1
ADDR2 ADDRESS 2
CITY CITY
STATE STATE
ZIP ZIP CODE
Report column formatting and summary functions
Summary functions: 1-Total, 2-Average, 3-Minimum, 4-Maximum, 5-Count
Field Summary Column Dec
Name Functions Spacing Column Headings Len Pos
NAME 0 *NONE 30
ADDR1 0 *NONE 30
ADDR2 0 *NONE 30
CITY 0 *NONE 15
STATE 2 *NONE 2
ZIP 2 *NONE 5 0
Selected output attributes
Output type . . . . . . . . . . . . . . Printer
Form of output . . . . . . . . . . . . Detail
Line wrapping . . . . . . . . . . . . . Yes
Wrapping width . . . . . . . . . . .
Record on one page . . . . . . . . . Yes
Printer Output
Printer device . . . . . . . . . . . . *PRINT
Report size
Length . . . . . . . . . . . . . . . 6
Width . . . . . . . . . . . . . . . . 30
Report start line . . . . . . . . . . . 2
Report end line . . . . . . . . . . . . 5
Report line spacing . . . . . . . . . . Single space
Print definition . . . . . . . . . . . No

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CQbAAM","label":"IBM i Db2-\u003EQuery\/400"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

6515817

Document Information

Modified date:
17 January 2025

UID

nas8N1010662