Some applications must support more than one type of terminal, and sometimes the types are sufficiently different that they require separate code. If you are writing such a program, and you need to determine what sort of terminal it is currently communicating with, you can use the ASSIGN command to find out.
ASSIGN returns a variety of information about the executing task, including a number of fields that describe its principal facility. Table 25 lists the ones that relate directly to terminal control operations. There are other ASSIGN options that relate to BMS and to other aspects of the task. You can find details on all ASSIGN options in the CICS® Application Programming Reference manual. The "terminal" cited in column 2 of the table is always the principal facility of the task.
ASSIGN option | Information returned |
---|---|
ALTSCRNHT ALTSCRNWD |
The alternate height and width of the terminal screen (from its terminal definition); see also SCRNHT and SCRNWD |
APLKYBD | Whether terminal has an APL keyboard |
APLTEXT | Whether terminal has the APL text feature |
BTRANS | Whether terminal has background transparency capability |
COLOR | Whether terminal has extended color capability |
DEFSCRNHT DEFSCRNWD |
The default height and width of the terminal screen (from its terminal definition); see also SCRNHT and SCRNWD |
DELIMITER | The data-link control character for the terminal (for 3600 terminals only) |
DESTID DESTIDLENGTH |
The identifier of the outboard destination and its length (for BDI operations only) |
DSSCS | Whether the terminal is an SCS data stream device |
DS3270 | Whether the terminal is a 3270 data stream device |
EXTDS | Whether the terminal supports "query structured field" orders |
EWASUPP | Whether the terminal supports "erase write alternate" orders (i.e. has alternate screen size capability) |
FACILITY | The 4-character identifier of the terminal |
FCI | The type of principal facility associated with the task (terminal, queue, and so on) |
GCHARS GCODES |
The graphic character set global identifier and the code page global identifier associated with the terminal |
HILIGHT | Whether the terminal has extended highlight capability |
KATAKANA | Whether the terminal supports Katakana |
LANGINUSE | The 3-character mnemonic |
MSRCONTROL | Whether the terminal supports magnetic slot reader control |
NATLANGINUSE | The national language in use for the current task |
NETNAME | The 8-character identifier of the terminal in the VTAM® network |
NUMTAB | Number of tabs required to position the print element in the correct passbook area (for 2980s only) |
OPID OPCLASS |
Operator identifier code and operator class of user signed on at terminal |
OUTLINE | Whether the terminal has field outlining capability |
PARTNS | Whether the terminal supports screen partitions |
PS | Whether the terminal has programmed symbols capability |
SCRNHT SCRNWD |
Height and width of the terminal screen for the current task |
SIGDATA | SIGNAL data received from the terminal |
SOSI | Whether the terminal has mixed EBCDIC/double-byte character set capability |
STATIONID TELLERID |
Station and teller identifier of the terminal (for 2980s only) |
TERMCODE | Type and model number of the terminal |
TERMPRIORITY | Terminal priority value |
TEXTKYBD | Whether the terminal has the TEXTKYBD feature |
TEXTPRINT | Whether the terminal has the TEXTPRINT feature |
UNATTEND | Whether the terminal is unattended |
USERID USERNAME USERPRIORITY |
The 8-character identifier, 20-character name and priority of the user signed on at the terminal |
VALIDATION | Whether the terminal has validation capability |
You can also use the INQUIRE TERMINAL command to find out about your own terminal or any other terminal. INQUIRE TERMINAL returns information from the terminal definition, whereas ASSIGN describes the use of that terminal in the current task. For many options, however, particularly the hardware characteristics, the information returned is the same. INQUIRE TERMINAL is described in the CICS System Programming Reference manual .
CICS reports the results of processing terminal control commands, including those generated by BMS, in the EIB. Because of the complexity of terminal operations, many EIB fields are specific to terminal commands. Those that apply to the principal facility are listed in Table 26. (Other fields relate only to LU type 6.1, APPC and MRO operations; see the CICS Application Programming Reference manual for programming information about these.)
EIB fields are posted when CICS returns control to your task, and they always describe the most recent command to which they apply. This means that if you are conducting program-to-program communication over an alternate facility and using your principal facility, you need to check the EIB before results from one overlay those of the other.
It also means that when a task is initiated by unsolicited input from the terminal, or by a RETURN IMMEDIATE in the previous task at the same terminal, the EIB fields that describe the input are not set at task start. You must issue a RECEIVE to gain access to the input and post the EIB fields.
Here are the fields that apply to the principal facility:
Field | Contents |
---|---|
EIBAID | The attention identifier (AID) from the last input operation (3270s only, see The AID) |
EIBATT | Whether the input contains attach header data (an attach FMH) |
EIBCOMPL | Whether the RECEIVE command just issued used all the input data, or more RECEIVEs are required (see Chaining output data) |
EIBCPOSN | Cursor position at time of last input operation (3270s only) |
EIBEOC | Whether an end-of-chain indicator appeared in the input from the last RECEIVE |
EIBFMH | Whether user data just received or retrieved contains an FMH |
EIBFREE | Whether the facility just used has been freed |
EIBRCODE, EIBRESP, EIBRESP2 |
CICS response code values from the previously issued command
Note:
For output commands in which transmission can be deferred, these
values reflect only the initial CICS processing of the command, not the eventual
transmission (see Terminal waits). |
EIBSIG | Whether the terminal has sent a SIGNAL |
EIBTRMID | (CICS) identifier of the terminal |