Determining the characteristics of a CICS printer

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:

Table 31. INQUIRE TERMINAL options for printers
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 page size, 3270 printers

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.

Table 32. Priority of parameters defining BMS page size BMS uses the first value in the appropriate column that has been specified in the terminal definition.
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.

Supporting multiple printer types

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.

  1. You can refer to a map generically and have BMS select the map that was designed for the terminal associated with your task (see the discussion of map suffixes in Device-dependent maps).
  2. If you are using SEND TEXT, BMS breaks the text into lines at word boundaries, based on the page size of the receiving terminal. You can also request header and trailer text on each page.
[[ Contents Previous Page | Next Page Index ]]