If you are writing a program that supports more than one type of CICS® printer, you may need to determine the characteristics of a particular printer. As we explained in connection with terminals generally, you can use the ASSIGN and INQUIRE TERMINAL commands for this purpose. Table 25 lists the ASSIGN options that apply to terminals, including several that are specific to printers.
The INQUIRE TERMINAL options that apply specifically to printers and the corresponding parameters in the terminal definition are shown in Table 31:
INQUIRE option | Source in TERMINAL or TYPETERM definition | Description |
---|---|---|
PAGEHT | x of PAGESIZE(x,y) | Number of lines per page (for alternate screen size terminals, reflects default size) |
PAGEWD | y of PAGESIZE(x,y) | Number of characters per line (for alternate screen size terminals, reflects default size) |
DEFPAGEHT | x of PAGESIZE(x,y) | Number of lines per page in default mode (alternate screen size terminals only) |
DEFPAGEWD | y of PAGESIZE(x,y) | Number of characters per line in default mode (alternate screen size terminals only) |
ALTPAGEHT | x of ALTPAGE(x,y) | Number of lines per page in alternate mode (alternate screen size terminals only) |
ALTPAGEWD | y of ALTPAGE(x,y) | Number of characters per line in alternate mode (alternate screen size terminals only) |
DEVICE | DEVICE | The device type (see the CICS System Programming Reference for possible values) |
TERMMODEL | TERMMODEL | The model number of the terminal (either 1 or 2) |
BMS uses both the terminal definition and the profile of the transaction that is running to determine the page size of a CICS printer. The profile is used when the terminal has the alternate screen size feature, to determine whether to use default or alternate size. (The default profile in CICS specifies "default" size for the screen.) Table 32 lists the values used.
Terminals with alternate screen size, using alternate size | Terminals with alternate screen size, using default size | Terminals without alternate screen size feature |
---|---|---|
ALTPAGE | PAGESIZE | PAGESIZE |
ALTSCREEN | DEFSCREEN | TERMMODEL |
DEFSCREEN | TERMMODEL | (12,80) |
TERMMODEL | (12,80) | |
(12,80) |
The definition of a "page" is unique to BMS. If you are printing with terminal control SEND commands, you define what constitutes a page, within the physical limits of the device, by your print format. If you need to know the buffer size to determine how much data you can send at once, you can determine this from the SCRNHT and SCRNWD values returned by the ASSIGN command.
When you are writing programs to support printers that have different page sizes, it is not always possible to keep device dependencies like page size out of the program. However, BMS helps with this problem in two ways.