Code this command for each font that the extended reporting printer supports. The FONT commands must immediately follow the PRINTER command that defines the extended reporting printer to which the fonts belong. The next PRINTER command or the end of the command stream delimit the fonts for a printer.
Each font is given a unique number (1 to 256). Font commands can define fonts in any order. However, you cannot define a font for one particular printer twice by using two FONT commands in the same command stream. If you specify the MODEL keyword on the PRINTER keyword, all the fonts associated with the model definition become associated with the extended reporting printer being defined. If necessary, you can use FONT commands to modify any of these existing font definitions. To do this, the font number coded on the FONT
If the extended reporting printer that the previous PRINTER command defines is not a standard line printer, you must define one EBCDIC font. If the printer also supports DBCS data, you must code one DBCS font and one MIXED font.
Syntax
FONT NUMBER (value-1) - [WIDTH (W-units-1)] - [HEIGHT (H-units-1)] - [NAME (value-2)] - [ {EBCDIC } ] [ DATA-TYPE ( {DBCS } ) ] - [ {font-1 font-2} ] [OVERPRINT-CODE (value-3)] - [FUNCTION-HEADER (value-4)] - [FUNCTION-TRAILER (value-5)] - [ { } ] [ALIGN ({ Y }) ] - [ {value-6} ] [ { } ] [COMPLEX (2/4)] - [SPACE-REPLACE (value-7)] Keywords NUMBER
NUMBER is a required keyword on the FONT command. This keyword defines the number that CA-Easytrieve/Plus programs use to uniquely identify the font for a print item (field or literal). The combination of the extended reporting printer assigned to the print data set that receives the print record plus the font number identify the font and its characteristics.
pvalue-1
Value-1 defines the number that identifies the font that this FONT command defines. The value can be in the range of 1 to 256.
WIDTH
You must specify the WIDTH keyword for each font that defines either EBCDIC or DBCS format data. This keyword defines the width of the character that this font produces. By multiplying this value by the number of characters in a print
W-units-1
You must use a common Unit of Measure (W-unit) to define the widths of all fonts for a given extended reporting printer. The W-units-1 value defines the width of the character that this font produces as a multiple of W-units.
CA-Easytrieve/Plus supports up to two decimal places for the definition of the width of the character. The exception is a printer that supports the
STRUCTURED-FIELDS keyword of the PRINTER command. No decimal places are supported for these printers.
HEIGHT
The HEIGHT keyword is only required if the extended reporting printer for the font does not support an FCB (Forms Control Block) and ANSI/Machine Carriage Control codes. Should the printer support such codes and you code the HEIGHT keyword, an error message is output.
If the extended reporting printer for the font does not support an FCB,
CA-Easytrieve/Plus requires this keyword. The HEIGHT keyword defines the vertical space that a character printed using this font occupies.
CA-Easytrieve/Plus requires the height for line spacing and line counting can be achieved.
CA-Easytrieve/Plus does not support this keyword when you are defining fonts supporting MIXED format data.
H-units-1
You must use a common Unit of Measure (H-unit) to define the heights of all fonts for a given extended reporting printer. The H-units-1 value defines the height of the character this font produces as a multiple of H-units.
CA-Easytrieve/Plus supports up to two decimal places for the definition of the height of a character. The exception is a printer that supports the
STRUCTURED-FIELDS keyword of the PRINTER command. No decimal places are supported for these printers.
NAME
The NAME keyword is optional. This entry associates an alphanumeric name to the font that this FONT command defines.
value-2
This value is a 1 to 40 alphanumeric name that is associated with this FONT definition. If the value contains spaces or parentheses, enclose the value within quotes.
DATA-TYPE
This optional keyword indicates the data type that this font supports. A font can support EBCDIC, DBCS, or MIXED data types. If you do not code this keyword, CA-Easytrieve/Plus assumes the font to support EBCDIC data.
When using the font command in a CA-Easytrieve/Plus program, the data type of the print item must match the data type of the font associated with the item. {EBCDIC}
Code the EBCDIC operand to indicate that the font supports EBCDIC format data only. This means that the font can be associated with any of the EBCDIC print items that CA-Easytrieve/Plus supports including Alphabetic, Zoned Numeric, Packed, Unsigned Packed, and Binary fields, plus EBCDIC quoted literals.
{DBCS}
The DBCS operand indicates that the font supports DBCS format data only. The DBCS-CODE keyword on the PRINTER command defines the DBCS code system of this DBCS format data. A font that supports DBCS data can be associated with a DBCS/Kanji field (field type of K) plus any DBCS or Source Conversion literals. {font-1 font-2}
Use this form of the DATA-TYPE operands to define a font for a MIXED format field. MIXED format fields are a combination of EBCDIC and DBCS data.
Therefore, defining a font for this data type involves defining an EBCDIC font for the EBCDIC data found in the print item and a DBCS font for the DBCS data found in the print item.
Font-1 is the number of the font defined for the current extended reporting printer that is to be used for the EBCDIC portion of MIXED print items. This font cannot support Line Complexes.
Font-2 is the number of the font defined for the current extended reporting printer that is to be used for the DBCS portion of MIXED print items. This font cannot support Line Complexes.
OVERPRINT-CODE
If the extended reporting printer that the previous PRINTER command defines supports Overprint Codes, you must code the OVERPRINT-CODE keyword for each EBCDIC or DBCS font defined. CA-Easytrieve/Plus does not support the OVERPRINT-CODE keyword for MIXED format fonts. Use this keyword to define the control code value that CA-Easytrieve/Plus inserts into any print record that outputs print items associated with this font.
value-3
This keyword consists of a hexadecimal string consisting of the letters A - F and the numbers 0 - 9. CA-Easytrieve/Plus requires this operand when you code the OVERPRINT-CODE keyword.
FUNCTION-HEADER
If the extended reporting printer defined by the previous PRINTER command requires printer control information before the data of a print item, then you must define that control information through the FUNCTION-HEADER
keyword. You can only code this keyword for EBCDIC and DBCS fonts. Use it to define the control code value that CA-Easytrieve/Plus inserts into each print record that uses this font. CA-Easytrieve/Plus inserts the control information immediately before the text belonging the associated print item.
value-4
CA-Easytrieve/Plus requires this value when you code the
FUNCTION-HEADER keyword. Value-4 is a hexadecimal string consisting of the letters A - F and the numbers 0 - 9. If the function code requires
CA-Easytrieve/Plus to insert a data byte count into the control code, you should add a three-byte special control code for data byte counts (Character 2 = B) to the definition of value-4. For information on the three-byte code, refer to the XRPT Commands Overview topic earlier in this chapter.
FUNCTION-TRAILER
If the extended reporting printer defined by the previous PRINTER command requires printer control information after data of a print item, then you must define that control information with the FUNCTION-TRAILER keyword. You can only code this keyword for EBCDIC and DBCS fonts. Use it to define the control code value that CA-Easytrieve/Plus inserts into each print record that uses this font. CA-Easytrieve/Plus inserts the control information immediately after the text belonging the associated print item.
value-5
Value-5 is a hexadecimal string consisting of the letters A - F and the numbers 0 - 9. CA-Easytrieve/Plus requires this operand when you code the
ALIGN
Use the ALIGN keyword to indicate the need for double alignment with respect to EBCDIC print items in a print record. It is invalid for DBCS and MIXED fonts, and an error message is printed if it is used for these font types. If the extended reporting printer that the previous PRINTER command defines:
■ Supports EBCDIC data as Half-Sized characters (half the size of DBCS/Kanji
characters).
■ Requires that Half-Sized character print items have a length that is a multiple
of two, then you should specify the ALIGN keyword.
This keyword has one required operand. The letter Y indicates that double byte alignment is required and that the EBCDIC space character must be added to the EBCDIC print item to round it up to a double byte boundary.
If double byte alignment is necessary but the printer supports a special one byte NOP (No OPeration) function code, then you can define this code for this keyword. The NOP character is a special function code that CA-Easytrieve/Plus can add to the print record to perform alignment. However, the printer does not print the NOP character.
If an extended reporting printer does not have this requirement, do not code the ALIGN keyword.
{Y}
Code this operand for the ALIGN keyword when the extended reporting printer requires double byte alignment but does not support a special NOP character. When you code a Y, CA-Easytrieve/Plus aligns odd length EBCDIC print items by adding one EBCDIC space.
{value-6}
You can specify value-6 where the extended reporting printer requires double byte alignment, but provides a special NOP character to perform the alignment. Value-6 is a hexadecimal value defining one byte. The value must consist of the letters A - F and the numbers 0 - 9.
COMPLEX
The COMPLEX keyword indicates that a Line Complex is required. Only code this keyword if:
■ The font does define a Line Complex.
■ The extended reporting printer that the previous Printer command defines
CA-Easytrieve/Plus does not support this keyword for fonts defining MIXED format data. CA-Easytrieve/Plus outputs an error message if you attempt to use this keyword with MIXED format data.
The operand of the COMPLEX keyword indicates the number of lines that the complex covers. It supports the following two values:
■ A value of 2 indicates a two-line complex covering two print lines. ■ A value of 4 indicates a four-line complex covering four print lines.
To process Line Complexes, you must define a FUNCTION-HEADER on this FONT command. CA-Easytrieve/Plus inserts this code before the associated print item on each print record that makes up the Line Complex. In addition to inserting the Function Code in each print record, CA-Easytrieve/Plus changes the last byte of the Function Code to indicate the item's position in the Line Complex. CA-Easytrieve/Plus OR's the last byte with the following values: 1. X'00' for Line 1 of the Complex
2. X'01' for Line 2 of the Complex 3. X'02' for Line 3 of the Complex 4. X'03' for Line 4 of the Complex
Therefore, the definition of the FUNCTION-HEADER value must be in consideration of this processing.
SPACE-REPLACE
The SPACE-REPLACE keyword is optional. You can only code this keyword for Overprint Printers that support the Merge Overprint technique for combining multiple print records into the same print line. The operand for this keyword defines the one-byte value that replaces occurrences of X'40' in any field associated with this font.
value-7
Value-7 is the hexadecimal value that replaces occurrences of X'40' in any field associated with this font. Value-7 must consist of the characters A - F or the letters 0 - 9.