ENFORM User's Guide
Formatting a Report
Developing an ENFORM Query
3–56 058058 Tandem Computers Incorporated
Decorations specify a character string that can be added to a column on the report, the
conditions under which the string is to be added, the location of the string, and
whether it is to be added either before or after the other formatting is done. The
following query specifies that when the value of price is negative, zero, or positive, a
dollar sign ($) is to be inserted in the first position immediately to the left of the value:
OPEN parts;
LIST partnum,
partname,
price AS "[MZPF "$"]F8.1",
WHERE partnum LT 1000;
Report:
Part
Number PARTNAME PRICE
------ ------------------ --------
212 SYSTEM 192KB CORE $97000.0
244 SYSTEM 192KB SEMI $87000.0
Refer to the description of the AS clause in the ENFORM Reference Manual for more
information about display formatting.
Printing a Date Value on a Report
Use the AS DATE clause to specify printing of a date that is stored in internal format.
If dates are not stored in internal format, use the JULIAN-DATE clause to convert
them to internal format.
In the following example, the AS DATE clause prints the current date using by the
default date format to modify the system variable @DATE:
OPEN orders;
LIST ordernum,
TITLE "ORDER NUMBER" SPACE 10,
@DATE AS DATE *, SKIP 2;
Report:
ORDER NUMBERS 05/07/82
ORDERNUM
--------
21
25
...