FORM.COLUMNS
Use FORM.COLUMNS to make choices about the uses of the columns. What you specify on FORM.COLUMNS is reflected on FORM.MAIN.
Conversely, what you specify on FORM.MAIN (areas A through F ) is reflected on FORM.COLUMNS.
FORM.COLUMNS
COLUMNS: Total Width of Report Columns: 66
A B C D E F
NUM COLUMN HEADING USAGE INDENT WIDTH EDIT SEQ
--- ------------------------------ ------ ----- ----- ----- ---
1 ID 2 6 L 1
2 NAME 2 9 C 2
3 DEPT 2 6 L 3
4 JOB 2 5 C 4
5 YEARS 2 6 L 5
6 SALARY 2 10 L2 6
7 COMM 2 10 L2 7
8 Total Earnings 2 12 L2 8
*** END ***
1=Help 2=Check 3=End 4=Show 5=Chart 6=Query
7=Backward 8=Forward 9=Specify 10=Insert 11=Delete 12=Report
OK, FORM.COLUMNS is displayed.
COMMAND ===> SCROLL ===> PAGE
- A COLUMN HEADING
- Reports
- Assign column headings. On the default form, column headings can
be any of the following:
- The database label assigned to the column or
the name of the column in the table from which it was selected
The DSQDC_COL_LABELS global variable controls whether the column heading defaults to the database label or the column name.
- A generated heading constructed by QMF for columns that contain constants or calculated values
You can enter any new heading of up to 40 characters over a heading shown in the COLUMN HEADING area. The heading, like the original column name, can contain blanks or special characters. To create multiple-line headings, use an underscore in a column heading to specify a break between lines. For example,EMPLOYEE_NAME
displays as follows in the report:
A single underscore before or after an entire column heading has no effect. For example,EMPLOYEE NAME
_EMPLOYEE NAME
does not add a blank line. However, consecutive underscores within the text of a column heading produce one or more blank lines in a column title. You can have up to nine lines in a column heading.For example, consider these two column names:1 ONE_TWO_THREE_FOUR_FIVE_SIX_SEVEN 2 SIX__LINE___TITLE
There is one blank line for each underscore entered, so these values display as follows in the report:
If you are using double-byte characters in column headings, you can specify a break between lines if the underscore you use is a single-byte character.ONE SIX TWO THREE LINE FOUR FIVE SIX TITLE SEVEN
To create column headings in uppercase and lowercase, specify in your profile a CASE value of either STRING or MIXED.
Headings are left-justified over columns of character data, and right-justified over columns of numeric data. If there is more than one line in the heading, the longest line is justified, and shorter lines are centered within the longest line. You can override these defaults by entering a new alignment value.
If any line of a heading is longer than the width of the column, it fills the whole width of the column and is cut off on the right.
You cannot use a global variable in a column heading; QMF will not substitute a value for the variable.
- The database label assigned to the column or
the name of the column in the table from which it was selected
- Charts
- Column headings for data plotted on the Y axis appear in the legend of a chart. Therefore, you probably want these column headings to be as concise as possible, or the legend will take up too much space on the chart.
- B USAGE
- Reports
- Specify how you want a column processed for a report. If the usage code for a column is blank, the values in the column are listed with no other processing unless one or more columns in the report has a usage of GROUP and at least one column has an aggregation usage. In that case, columns with blank usages are omitted. A number of aggregation functions, listed in the following table, can be entered in this area.
Aggregation | Usage code | Minimum abbreviation | Additional information |
---|---|---|---|
Across | ACROSS | AC | ACROSS usage code |
Average | AVERAGE (or AVG) | AV | Aggregation usage codes |
Break1 | BREAK, BREAK1 | B, B1 | FORM.BREAKn |
Break1x | BREAKX, BREAK1X | BX, B1X | FORM.BREAKn |
Break2 | BREAK2 | B2 | FORM.BREAKn |
Break2x | BREAK2X | B2X | FORM.BREAKn |
Break3 | BREAK3 | B3 | FORM.BREAKn |
Break3x | BREAK3X | B3X | FORM.BREAKn |
Break4 | BREAK4 | B4 | FORM.BREAKn |
Break4x | BREAK4X | B4X | FORM.BREAKn |
Break5 | BREAK5 | B5 | FORM.BREAKn |
Break5x | BREAK5X | B5X | FORM.BREAKn |
Break6 | BREAK6 | B6 | FORM.BREAKn |
Break6x | BREAK6X | B6X | FORM.BREAKn |
Calculate | CALCid | CA | FORM.CALC |
Count | COUNT | CO | Aggregation usage codes |
Cumulative percent | CPCT | CP | Aggregation usage codes |
Cumulative sum | CSUM | CS | Aggregation usage codes |
First | FIRST | F | Aggregation usage codes |
Group | GROUP | G | GROUP usage code |
Last | LAST | L | Aggregation usage codes |
Maximum | MAXIMUM | MA | Aggregation usage codes |
Minimum | MINIMUM | MI | Aggregation usage codes |
Omit | OMIT | O | OMIT usage code |
Percent | PCT | P | Aggregation usage codes |
Standard deviation | STDEV | ST | Aggregation usage codes |
Sum | SUM | SU | Aggregation usage codes |
Total cumulative percent | TCPCT | TC | Aggregation usage codes |
Total percent | TPCT | TP | Aggregation usage codes |
- C INDENT
- Reports
- Specify the number of blank spaces to the left of a column. The blank spaces separate the column from the previous column or from the left margin. INDENT can be any number from 0 through 999. For columns using a graphic edit code, the minimum indent is 1. The default INDENT for each column is 2.
INDENT is always specified as a number of single-byte characters.
- D WIDTH
- Reports
- Specify the number of character positions reserved for displaying
data from a column. This width applies to the column heading as well
and can be any number from 1 through 32,767.
If the column you are displaying uses a graphic edit code, the WIDTH value can be any number from 1 through 16,383. The width required to display or print the data is twice the width defined for the column in the database plus one character space.
When assigning a width for numeric data, ensure that the value you specify accounts for space for the following characters as well as for digits:- A minus sign (except with edit code J)
- A decimal point (when edit codes specify them)
- Separators for groups of thousands (with edit codes D, K, and P)
- A currency symbol (with edit code D)
- A percent sign (with edit code P)
If the length of a value to be displayed exceeds the width of the column (for example, when you attempt to display a column containing XML data):- If it is numeric data, it is replaced with a row of asterisks
(
********
).In some cases, you can avoid a numeric overflow by using a different data type. For example, in an arithmetic operation, if all operands are decimal numbers and an overflow occurs, you can change at least one operand to a floating-point number. In this example, the operand can be a floating-point constant or a floating-point table column.
- If it is character, date, time, or timestamp data, it is cut off on the right or left (depending on the alignment specified for the data).
Resolve column width problems by changing the WIDTH value for the column and displaying the report again. Alternatively, you can specify that you want to keep the column width the same, but wrap data that will not fit on a line to the next line in the column. Column wrapping applies only to nonnumeric data.
The width of a column on the default form is at least as great as the longest line in the column heading. Otherwise, the assigned width depends on the data type of the column, as shown in the following table.Table 2. Default widths of data types Data type Width on default form SMALLINT 6 INTEGER 11 BIGINT 20 DECIMAL The width of the column in the database, plus 3 character spaces. FLOAT 10 DECFLOAT(16) 12 if decimal floating-point data is supported by the operating system; otherwise, metadata is displayed with a default width of 8. DECFLOAT(34) 12 if decimal floating-point data is supported by the operating system; otherwise, metadata is displayed with a default width of 8. CHAR The width of the column in the database. VARCHAR The maximum width of the column in the database. LONG VARCHAR The smaller of: - The column width.
- A width determined by QMF, based on the quantity and type of other columns in the report.
GRAPHIC The width of the column in the database. VARGRAPHIC The width of the column in the database. LONG VARGRAPHIC The smaller of: - The column width.
- A width determined by QMF, based on the quantity and type of other columns in the report.
DATE 10 or, if your date format is locally defined by your site, the larger of: - The width of the column heading.
- The width of the locally defined date format.
TIME 8 or, if your time format is locally defined by your site, the larger of: - The width of the column heading.
- The width of the locally defined time format.
TIMESTAMP(0) 19 TIMESTAMP(n) 20 + n (where n = 1 to 12) TIMESTAMP (0) WITH TIME ZONE 25 TIMESTAMP (n) WITH TIME ZONE 26 + n (where n = 1 to 12) BINARY(n) Metadata is displayed by default with a default width of 8 + n, where n is 1 to 255. VARBINARY(n) Metadata is displayed by default with a default width of 11 + n, where n is 1 to 32704. XML Metadata is displayed by default. If the column name is fewer than 3 characters, the default width is 3. If the column name is greater than 3 characters, the default width is the same as the width of the column name, up to 10. CLOB Metadata is displayed by default. The default width is locally defined, up to 10. BLOB Metadata is displayed by default. The default width is locally defined, up to 10. DBCLOB Metadata is displayed by default. The default width is locally defined, up to 10. When inserting a line on FORM.COLUMNS, the default width is 10.
For single-precision floating point data, values with data types of FLOAT are treated the same for single-precision or double-precision numbers.
To work with DECFLOAT data in QMF, the processor on which QMF is running must support decimal floating-point instructions.
You can override default formatting behavior for character, numeric, decimal, date, and time data types by setting the following global variables:- DSQDC_EC_CHAR
- DSQDC_EC_NUM
- DSQEC_DEC
- DSQDC_EC_DATE
- DSQDC_EC_TIME
- Charts
Specify the number of character positions for labels on the X axis of a chart.
If the width exceeds the allotted space, the labels might be omitted. Truncating the width of column headings is one way to handle the problem of omitted labels. When labels are truncated, more labels fit in the allotted space.
Values from columns with date, time, timestamp, and timestamp with time zone data types (treated as character strings) cannot appear on the Y axis.
For single-precision floating point data, values with data types of FLOAT are treated the same for single-precision or double-precision numbers.
To work with DECFLOAT data in QMF, the processor on which QMF is running must support decimal floating-point instructions.
- E EDIT
- Reports
- Specify how QMF formats data for display. The default is C when inserting a line in FORM.COLUMNS.
- Charts
- The X-axis labels come from columns using GROUP or BREAK (or from the left-most column of the report when there is no GROUP or BREAK). The effect that edit codes have on the data in those columns appears in the X-axis labels. For example, if data selected for the X axis is column wrapped, only the first line is incorporated into the labels.
Numeric columns that are edited with Uxxxx or Vxxxx cannot be used for Y-axis data.
When column substitution values (&n) are used in the page heading (and, therefore, in the chart heading), they are edited according to the edit code for that column in the form.
You can use character edit codes with date, time, timestamp, and timestamp with time zone data to allow wrapping of those columns.
- F SEQ
- Reports
- Enter numbers in this column to change the sequence of the columns
in your report. Initial settings are taken from the NUM column. Any
numbers from 1 through 999 are allowed. If two numbers are the same,
those columns appear in the same order they are listed on the form.
The
Automatic reordering of report columns
option on the FORM.OPTIONS panel must be set to NO (the default) for SEQ to have an effect on column reordering.
When variables are resolved, the column number is taken from NUM, not SEQ.
SEQ numbers are ignored in ACROSS reports.