• No results found

The printers that CA-Easytrieve/Plus supports use different techniques to identify fonts and print items within a print record. The seven categories of printers that CA-Easytrieve/Plus supports are shown in the following diagram.

Page Printers

In contrast to Line Mode devices, which associate one print record with one print line, Page Printers are devices that process a Data Stream containing printer commands and print data. Page Printers use Structured Fields and provide support for “All Points Addressable” printing. Print records contain structured fields. Structured fields are self-identifying strings of bytes containing control information, control information parameters, and a print item's data. Page printer's process data on a page basis (as opposed to line by line). Therefore, CA-Easytrieve/Plus positions a print item on the page by defining the coordinates of the start of the item. These coordinates consist of a vertical displacement from the top of the page (Y-direction) and a horizontal displacement from the left side of a page (X-direction). At compile time CA-Easytrieve/Plus assigns each print item its appropriate X-direction coordinate based on the coding of the CA-Easytrieve/Plus program.

CA-Easytrieve/Plus cannot determine the Y-direction coordinate until execution time because the vertical displacement from the top of the page of a particular print line is dependent upon the vertical space already occupied by print lines printed before the current print line.

As a result, CA-Easytrieve/Plus determines the appropriate X-direction

coordinate at compile time and builds the appropriate print records leaving room for the insertion of the correct Y-direction coordinate during the execution of the user program. To perform this function, CA-Easytrieve/Plus uses a set of printer control codes that normal line mode printers do not support. These control codes are:

Set Vertical Position

This is a control code that defines the Y-direction coordinate for the data that follows in the current print record. CA-Easytrieve/Plus supports two ways of defining this coordinate. The first is to establish the Y-direction coordinate relative to the current Y-direction coordinate. This means that

CA-Easytrieve/Plus must merge the control code with a value in H-units that specifies the distance that the new line is to be positioned relative to the current Y-direction coordinate. The second method of establishing the Y-direction coordinate is by setting an absolute Y-direction coordinate. In this case

CA-Easytrieve/Plus merges the control code with the new Y-direction address on the page (in H-units) and adds this value to the print record prior to performing any horizontal (X-direction) positioning.

Set Horizontal Position

This is a control code that defines the X-direction coordinate for the data that immediately follows in the print record. This code precedes the data for each print item. Like the Set Vertical Position, the X-direction coordinate can be defined as either a relative offset from the current coordinate, or as an absolute address on the current line. In either case, the control code nullifies the need for blank spacing between print items. Line mode printers use this blank spacing to position one item to the right of another print item on a print line. This is no longer required as each item can be uniquely assigned its print position independent of any other print item.

Function Codes

These are additional, printer specific codes that can be added to the print records to identify the characteristics of the font to be used for a print item's data.

Examples of the characteristics that such codes define include the character's height, width, style, shape, data format (EBCDIC or DBCS), and so on.

CA-Easytrieve/Plus inserts these codes into print records after the Set Horizontal Position control code (for Function Header codes) and after the print item's data (for Function Trailer codes).

Note: CA-Easytrieve/Plus only inserts the Function Trailer when the next print item's font is different from that of the current print item. Where the fonts are the same, CA-Easytrieve/Plus does not insert the Function Trailer code and the Function Header code (for the next print item).

The following example illustrates the construction of print records for Page Printers. --- | S | S | F | d | S | d | S | F | d | S | F | d | F | | V | H | C | a | H | a | H | C | a | H | C | a | C | | P | P | | t | P | t | P | | t | P | | t | | | | | | a | | a | | | a | | | a | | --- | | | | | | | | | |

| | | | --- Function Code(s). At this | | | | point, the font has changed | | | | so the Function Trailer code | | | | for the current font is | | | | inserted prior to the | | | | Function Header for the | | | | font of the third print item | | | |

| | | --- “Set Horizontal Position” code | | | to set the X-direction coordinate | | | for the next print item. Note that | | | the lack of a Function Code indicates | | | that the font is the same for the | | | second print item.

| | |

| | --- Header Function code for the font assigned | | to the first print item on this record. | |

| --- “Set Horizontal Position” code merged with | the X-direction coordinate value.

|

--- “Set Vertical Position” code merged with the Y-direction coordinate value.

Line Mode

Line Mode printers support print data sets whose print records contain data and control information particular to a line. Line Mode printers restrict control of mapping print items to a page permitting only the positioning of items along the current line. At the start of each print record carriage control codes control the vertical position on a page.

Line printers can be further divided into six more finite classifications based on their ability to support Overprint and Function codes in the print record.

Overprint Codes

Printers that support only one font per print record use Overprint Codes. Therefore to combine more than one font on a print line CA-Easytrieve/Plus must build multiple print records. However, a print item is only output on the print record whose Overprint Code matches the Overprint Code of that print item's font. Line spacing occurs prior to the first print record. Each additional print record overprints the first. The printer then merges all these print records to form one print line. CA-Easytrieve/Plus uses two methods of merging print records depending on the extended reporting printer's characteristics. The two methods are Merge Overprint and Print Overprint. The following topics discuss both of these overprint methods.

The overprint feature is a function of the printer hardware. For both overprint techniques, CA-Easytrieve/Plus generates multiple print records containing the required data and printer control codes. However, the layout of the data in the print records that CA-Easytrieve/Plus produces for each overprint technique must be different in order for the print items on the report to line up properly. This becomes evident upon examining the different techniques.

The following example illustrates the overall structure of the print records built for printers that support Overprint Codes.

Function Codes

Printers that support both control and print data in the same print record use Function Codes. Printer manufacturers assign the control information special values (function codes) that identify it from the normal print data. The printer does not print function codes on the report but uses them to define the function that is to be performed. A function code defines the format of the data (EBCDIC or DBCS), the size of the characters, and so on. The following example illustrates the structure of print records supported by function code printers:

Overprint and Function Codes

The third major category of Line Mode printers are those that support both Overprint and Function Codes in the same print record. These printers use the Overprint Code to establish the font of the characters to be printed (size, style, shape, and design). They use Function Codes to distinguish one Data Type from another, that is, to distinguish EBCDIC from DBCS.

Because these printers support an Overprint Code, the printer combines multiple print records to form a single print line when CA-Easytrieve/Plus requires a mixture of fonts on one line. As has already been mentioned, there are two techniques applicable to combining multiple print records: Merge Overprint and Print Overprint. These same two techniques are also applicable to this category of printer. The following section compares the two overprinting techniques.

The following example illustrates the format of the print records built for this type of printer:

Overprint Techniques

The two techniques that CA-Easytrieve/Plus supports for overprinting multiple print records to form a single print line are Merge Overprint, and Print

Overprint. The printer hardware defines the technique that CA-Easytrieve/Plus uses. CA-Easytrieve/Plus automatically compensates for the characteristics of the appropriate technique that the extended reporting printer uses.

The first overprint technique, Merge Overprint, merges the print records by character position in the print record. The second technique, Print Overprint, combines the print records by their physical position in the final print line. The results of the Print Overprint technique are similar to those obtained when overprinting on an impact line printer.

Merge Overprint

When merging multiple print records into a single print line, the merge process combines the data on a character by character basis. The 12th character in a print record, for example, merges with the 12th character in another print record. This happens regardless of where those characters might otherwise appear (as a result of differences in character width) on the print line. The rules that the printer uses to merge print records (of the same or different font widths) into one print line are:

■ A printable character in a following record replaces an identical character or

a blank.

■ A blank in a following record does not replace either a blank or a printable

character.

■ When merging blanks of different W-units, the resulting blank has the

W-unit of the first one.

■ When a printable character is merged with a blank, the resulting character

has the W-units of the printable character.

To illustrate this process, assume that three print records are being merged and the W-units are in points. The first record contains 7-point characters, the second contains 12-point characters, and the third contains 9-point characters. Each print record contains four characters (three blanks and one printable character in each case). The following example illustrates the three print records and the resulting print line.

Print Overprint

The Print Overprint technique overprints print records the same as does a normal impact line printer. The printer develops the image (or images) each print record independent of any other print record for the same line. It is the imaged or physical lines that are combined. With this technique you can have one character from one print record overlay another character because the physical images of the two records occupy the same position on the line.

To illustrate this technique, the same three records that demonstrate the Merge process are used. That is, 7, 12, and 9-point print records.

As the following example demonstrates, the independent imaging of the three records results in an overlap of character boundaries. For example, the character from the first record is overprinted by the character on the second imaged record because they occupy the same physical space on the print line.

In addition, there is a 3-point gap between the character on the third imaged record and the 12-point character on the second imaged record.

To overcome the problem of characters overlaying one another,

CA-Easytrieve/Plus must build the print records to provide the necessary spacing to separate the characters in the different print records. Each print record must provide sufficient spacing characters so that when the record is imaged, the

The next example uses the same 7, 12, and 9-point print records to illustrate the format of the print records that do not cause overlaying of characters. In this case though, the print records have been built compensating for the attributes of the Print Overprint technique.

Note: The first record requires four blanks in front of the printable character. When imaged, the four blanks of 7 points each give 28 points of lateral spacing in front of the character, thus positioning the character to the right of the second character. Not only must CA-Easytrieve/Plus take this additional spacing into account when building the print records, but it also must compensate for the gaps that appear between characters. For example, the 3-point gap between the 9- and the 12-point character and the 4-point gap between the 12- and the 7-point character.

Supported Printers

Based on the set of characteristics that the Extended Reporting Facility supports, the following table illustrates the various printing systems that

CA-Easytrieve/Plus can support. This list is not restrictive as printers that fit into one of the seven categories defined previously can still be supported through the extended reporting options module. See the discussion on the generation of the options module in Chapter 4.