Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

TSTAT - Interrogate terminal attributes

&pagelevel(3)&pagelevel

General

Application areas:

Data terminal communication; see "Data terminal communication"Requesting and accessing lists and tables; see "Requesting and accessing lists and tables"

Macro type:

Type S, MF format 1:
31-bit interface: standard/L/E/C/D form; see "S-type macros"


  • This macro description applies to TIAM V13.2A.

Macro description

Information about a terminal may be requested in timesharing mode by means of the TSTAT macro. The information obtained refers to the generated device type.

Macro format and description of operands

TSTAT

TCHAR / PHDIM / LIDIM / VDTYP / EDOPT / OFLOW / STNAM / PRNAM / ALL / MONCS / PERPH / BASIC

,area [,length]

[,MF=C / (C,pre) / (E,..) / (D,pre) / D / L]

TCHAR
Requests physical type of terminal.

PHDIM
Requests physical dimensions of terminal (line mode).

LIDIM
Requests logical dimensions of terminal (line mode).

VDTYP
Requests logical type of terminal.

EDOPT
Requests static edit options.

OFLOW
Requests type of overflow control.

STNAM
Requests terminal name.

PRNAM

Requests processor name.

ALL
Requests output of all information.

MONCS
Requests information on the monitor and the character sets of the terminal.

PERPH
Requests information on the connected peripherals.

BASIC
Requests basic information on the terminal.

area
Symbolic address of an area in which the information requested is stored. The area must be aligned on a halfword boundary.

length
Specifies the length of the area.

  • for ALL : 64 bytes

  • for MONCS : at least 14 bytes

  • for BASIC : 640 bytes

  • for other options : 8 bytes

If this specification is missing, the length attribute “area” is used. If the ALL, MONCS or BASIC operand is specified and the area length is smaller than the terminal information supplied, the amount of information which can be supplied is limited to that which will fit in this area.

MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. for a prefix), see section “S-type macros”. The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.

A prefix (pre = 1..3 letters) can be specified in the C form and D form of the macro, as shown in the macro format.
Default value: pre = TST

The operands TCHAR, PHIDIM, LIDIM, VDTYP, EDOPT, OFLOW, STNAM, PRNAM ALL, MONCS, PERPH and BASIC correspond to those described for the DCSTA macro.

Functional description

The calling program may define the area which is to receive the information either itself or by means of the DCSTA C,... call (see Example 2). If the program defines the destination area itself, it may perform addressing with the aid of a DSECT generated by means of the DCSTA D,... call.

For a description of information supplied see the DCSTA macro ("DCSTA - Generate operand table for terminal attributes").

Return information and error flags

R15:

+---------------+
|   |   |   |   |
|0|0|0|0|0|0|a|a|
+---------------+

A return code relating to the execution of the TSTAT macro is transferred in register R15.

X'aa'

Meaning

X'00'

Normal termination.

X'04'

Unrecoverable error.

X'08'

Operand error.

X'0C'

No terminal available.

X'10'

Receiving area is too short; only part of the information was supplied if the ALL, MONCS or
BASIC operand was specified. In all other cases, nothing is supplied.

X'14'

Not all the information required is available.

Example 1

This example requests the logical terminal type and the type of screen overflow control.The receiving fields defined via the TSTAT macro (LOG and UEL) contain this information in hexadecimal form. The DCSTA macro is required for evaluating this information. DCSTA C,... is used to generate memory areas with symbolic addresses; these areas can be specified as receiving fields when the TSTAT macro is called.
All the symbolic names generated by the macro and their meanings are listed in the DCSTA macro description on "DCSTA - Generate operand table for terminal attributes". For example, it is possible to read the type of overflow control from the <PREFIX>OFLOW field by evaluating the series of bits contained in it.

TSTAT1   START
         PRINT NOGEN
         BALR  3,0
         USING *,3
         TSTAT VDTYP,LOG,8 ——————————————————————————————————————————  (1) 
         TSTAT OFLOW,UEL,8 ——————————————————————————————————————————  (2) 
DTH1     TERM
LOG      DS    CL8
UEL      DS    CL8
         END

Runtime log:

/start-assembh
%  BLS0500 PROGRAM 'ASSEMBH', VERSION '<ver>' OF '<date>' LOADED
%  ASS6010 <ver> OF BS2000 ASSEMBH  READY 
//compile source=*library-element(macexmp.lib,tstat1), -
//        compiler-action=module-generation(module-format=llm), -
//        module-library=macexmp.lib, -
//        listing=parameters(output=*library-element(macexmp.lib,tstat1)), -
//        test-support=*aid
%  ASS6011 ASSEMBLY TIME: 245 MSEC
%  ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES
%  ASS6019 HIGHEST ERROR-WEIGHT: NO ERRORS
%  ASS6006 LISTING GENERATOR TIME: 78 MSEC
//end
%  ASS6012 END OF ASSEMBH
/load-executable-program library=macexmp.lib,element-or-symbol=tstat1, -
/     test-options=*aid
%  BLS0523 ELEMENT 'TSTAT1', VERSION '@' FROM LIBRARY
   ':2OSG:$QM212.MACEXMP.LIB' IN PROCESS
%  BLS0524 LLM 'TSTAT1', VERSION ' ' OF '<date> <time>' LOADED
/%in dth1<%d log %x, uel %x>
/%r
*** TID: 005000D8 *** TSN: 2QSE *********************************************
**
CURRENT PC: 00000022    CSECT: TSTAT1  **************************************
**
V'0000003E' = LOG      + #'00000000'  —————————————————————————————————  (3) 
0000003E (00000000) 5B010000 00000000                      $.......
V'00000046' = UEL      + #'00000000'  —————————————————————————————————  (4) 
00000046 (00000000) 02060000 00000000                      ........

(1)

Logical type of terminal is requested.

(2)

Type of overflow control is requested.

(3)

The task runs on a data display terminal (bit 26 is set) at which the line, format and physical modes are all permitted (bits 20, 21 and 23 are set).

(4)

The system (bit 25 =0) controls the overflow. When the screen is full, the system requests an acknowledgment at the terminal before overwriting the screen (bit 21 =1).

Example 2

  TSTAT2   START
           PRINT NOGEN
           BALR  3,0
           USING *,3
           TSTAT TCHAR,STATCHAR,8 —————————————————————————————————————  (1) 
           TSTAT PHDIM,PHYSAREA,8 —————————————————————————————————————  (2) 
           TSTAT LIDIM,FILIDIM,8 ——————————————————————————————————————  (3) 
  DTH1     TERM
           PRINT GEN
           DCSTA C,TYPE=TCHAR —————————————————————————————————————————  (4) 
1 STATCHAR DS    0XL8
1 *
1 *              DEFINE TERMINAL CHARACTERISTICS FIELDS
1 *
1 STASTTCH DS    0XL8                     TERMINAL CHARACTERISTICS AREA
1 STAMNTCH DS    0XL8                     MINIMUM TERMINAL CHARICS. AREA
1 *
1 STAPTTYP DC    AL1(0)                   PARTNERTYPE
1 STADVTYP DC    AL1(0)                   DEVICE TYPE
1 STATCHR2 DC    AL1(0)                   TERMINAL CHARACTERISTICS BYTE 2
1 STATCHR3 DC    AL1(0)                   TERMINAL CHARACTERISTICS BYTE 3
1 STATCHR4 DC    AL1(0)                   TERM. CHARACTERISTIC BYTE 4 901
1 STATCHRS DC    AL1(0)                   TERM. CHAR FROM STATION     920
1 STACTRLU DC    AL1(0)                   CONTROL UNIT FOR PRINTER    701
1 STACHCAD DC    AL1(0)                   CENTRAL HARDCOPY ADDRESS
1 *
1 *              DEFINE PARTNER TYPES (PTTYP)
1 *
1 STADCAMP EQU   X'00'                  PARTNER IS A PROGRAM
1 STADCAMT EQU   X'01'                  PARTNER IS A TERMINAL
1 *
1          DCDEVCH STA
2 *
2 *              DEFINE DEVICE TYPES (DVTYP)
2 *
2 STAD8103 EQU   X'02'                 TELETYPE 8103
2 STAD8150 EQU   X'04'                 VIDEO TERMINAL 8150
2 STAD8153 EQU   X'05'     *NO VTSU*   VIDEO TERMINAL 8153
2 STADHOST EQU   X'08'                 INTELLIGENT PARTNER
2 STAD8151 EQU   X'15'                 VIDEO TERMINAL 8151
2 STAD8152 EQU   X'16'                 VIDEO TERMINAL 8152
2 STAD8110 EQU   X'17'                 SS-
8110                            00530000
2 STAD6154 EQU   X'18'     *NO VTSU*   VIDEO 8161 54 CHAR PER LINE 
2 STAD6164 EQU   X'19'     *NO VTSU*   VIDEO 8161 64 CHAR PER LINE 
2 STAD6180 EQU   X'1A'     *NO VTSU*   VIDEO 8161 80 CHAR PER LINE  
2 STAD8161 EQU   X'1A'     *NO VTSU*   VIDEO 8161 
2 STAD8121 EQU   X'1C'                 PRINTER STATION 8121 
2 STADPT80 EQU   X'1D'     *AS 8103*   TELETYPE PT80
2 STAD1000 EQU   X'1E'     *AS 8103*   TELETYPE T1000 
2 STADT100 EQU   X'23'     *AS 8103*   TELETYPE T100 
2 STAD100E EQU   X'26'     *AS 8103*   FS100-E 
2 STAD8122 EQU   X'2B'                 PRINTER STATION 8122 
2 STAD8162 EQU   X'2C'                 VIDEO 8162 
2 STAD8160 EQU   X'2D'                 VIDEO 8160 
2 STAD8124 EQU   X'2E'                 PRINTER STATION 8124
2 STAD8167 EQU   X'2F'     *AS 8160*   VIDEO 8167
2 STADAP   EQU   X'30'     *AS HOST*   AP-STATION
2 STAD9750 EQU   X'35'                 VIDEO 9750 OR 9749
2 STAD9003 EQU   X'36'                 PRINTER STATION 9003
2 STAD9770 EQU   X'39'     *AS 8151*   DS 9770
2 STAD9002 EQU   X'3B'                 PRINTER STATION 9002
2 STAD3974 EQU   X'3D'                 VIDEO TERMINAL 3974
2 STAD9751 EQU   X'3F'     *AS 8160*   DSS 9751
2 STAD9752 EQU   X'40'     *AS 9750*   DSS 9752
2 STAD9753 EQU   X'41'     *AS 9750*   DSS 9753
2 STAD9001 EQU   X'42'                 PRINTER 9001
2 STAD9731 EQU   X'43'     *AS 3974*   GRAFIC STATION 9731
2 STAD9004 EQU   X'45'                 PRINTER 9004
2 STAD9754 EQU   X'4C'     *AS 8160*   VIDEO 9754
2 STAD9755 EQU   X'4E'                 DSS-9755
2 STAD9763 EQU   X'4F'                 DSS-9763
2 STADBTXF EQU   X'55'     *AS HOST*   BTX-STATION T-3000 (FELDVERS.)
2 STADBTXE EQU   X'56'     *AS HOST*   BTX-EDITIER-STATION (DIENST)
2 STADBTXA EQU   X'57'     *AS HOST*   BTX-ABFRAGE-STATION (DIENST)
2 STADUTC  EQU   X'5A'                 UTC FUER TELETEX
2 STAD9012 EQU   X'5B'                 PRINTER 9012
2 STAD9013 EQU   X'5C'                 PRINTER 9013
2 STAD3270 EQU   X'5E'                 DSS-3270
2 STAD0131 EQU   X'65'                 PRINTER 9001-31
2 STAD0189 EQU   X'66'                 PRINTER 9001-8931
2 STAD9022 EQU   X'68'                 PRINTER 9022
2 STAD1118 EQU   X'6B'                 PRINTER 9011-18
2 STAD1119 EQU   X'6C'                 PRINTER 9011-19
2 STAD3287 EQU   X'6E'                 PRINTER 3287
2 STADPCL  EQU   X'70'                 PRINTERS PCL
2 STAD9021 EQU   X'70'                 PRINTERS 9021 / 9022-200, HP LJ
2 STAD9014 EQU   X'72'                 PRINTER 9014
2 STAD9026 EQU   X'73'                 PRINTER 9026 (HDLC,COMP.9025)
2 STADTNO8 EQU   X'74'                 Telnet without overflow 8-bit
2 STADTOV8 EQU   X'75'                 Telnet with overflow 8-bit
2 STADFE   EQU   X'78'                 FRONT-END TERMINAL (FHS-DOORS)
2 *
2 *              DEFINE TERMINAL CHARACTERISTICS BYTE 2 (TCHR2) BITS
2 *
2 STATC2EX EQU   8                        SECONDARY CHARACTER SET
2 STATC2LC EQU   32                       LOWER CASE
2 STATC2DT EQU   64                       GERM KEYB WITH GERM NAT CHAR
2 STATC2DF EQU   128                      BYTE 2 DEFINED
2 *
2 *              DEFINE TERMINAL CHARACTERISTICS BYTE 3 (TCHR3) BITS
2 *
2 STATC3H1 EQU   1                        HARDCOPY BIT 1  (LOCAL)
2 STATC3H2 EQU   2                        HARDCOPY BIT 2  (CENTRAL)
2 STATC3HC EQU   3                        HARDCOPY BITS
2 STATC3IC EQU   4                        IDENTITY CARD READER
2 STATC3FD EQU   8                        FLOPPY DISK
2 STATC3AP EQU   16                       APL CAPABILITY
2 STATC3GF EQU   32                       GRAPHICS
2 STATC3DZ EQU   64                       DEZENTRAL FORMATING
2 STATC3DF EQU   128                      BYTE 3 DEFINED
2 *
2 *              DEFINE TERMINAL CHARACTERISTICS BYTE 4 (TCHR4) BITS
2 *
2 STATC4CO EQU   1                        4 COLOURS(ITALIC/HALFBRIGHT)
2 STATC4ZF EQU   2                        NEW ZAT AND FAT POSSIBLE
2 STATC4ST EQU   4                        STATUS QUERY POSSIBLE
2 STATC4HI EQU   8                        HARDWARE INFOLINE AVAILABLE
2 STATC4C8 EQU   16                       8 COLOURS
2 STATC4HP EQU   32                       HP LASER JET II
2 STATC4DF EQU   128                      BYTE 4 DEFINED
2 *
2 *              DEFINE TERM CHAR FROM STATION   BYTE   (TCHRS) BITS
2 *
2 STATCSDT EQU   1                        GERMAN KEYBOARD
2 STATCSHC EQU   2                        LOCAL HARDCOPY PRINTER
2 STATCSIC EQU   4                        ID-CARD READER
2 STATCDOR EQU   8                        DOORS capability (reserved)
2 STATCDSK EQU   16                       DESK capability
2 STATCECC EQU   32                       ENCRYPTION capability (res)
2 STATCPER EQU   64                       Permanent ENCRYPTION reques
2 STATCSDF EQU   128                      TERM CHAR FROM STAT RECEIVED
2                *,DCDEVCH    200    960821
1 *
1                *,DCSTA      201    970513
  PHYSAREA DCSTA C,TYPE=PHDIM —————————————————————————————————————————  (5) 
1 PHYSAREA DS    0XL8
1 *
1 *              DEFINE PHYSICAL TERMINAL ATTRIBUTES FIELDS
1 *
1 STASTPV  DS    0XL8                     PHYSICAL TERMINAL ATTR. AREA
1 STAMNPV  DS    0XL8                     MINIMUM PHYS. TERM. ATTR. AREA
1 *
1 STALLEN  DC    H'0'                     PHYSICAL LINE LENGTH
1 STANOLIN DC    H'0'                     PHYSICAL NUMBER OF LINES
1 STAMAXDB DC    H'0'                     MAX. PHYSICAL DEVICE BUFFER
1          DC    2AL1(0)                  RESERVED FOR FUTURE DEVELOPMENT
1                *,DCSTA      201    970513
           DCSTA C,FI,TYPE=LIDIM ——————————————————————————————————————  (6) 
1 FILIDIM  DS    0XL8
1 *
1 *              DEFINE VIRTUAL TERMINAL ATTRIBUTES FIELDS
1 *
1 FISTLV   DS    0XL8                     VIRTUAL TERMINAL ATTR. AREA
1 FIMNLV   DS    0XL8                     MINIMUM VIRTUAL TERM ATTR AREA
1 *
1 FILLLEN  DC    H'0'                     VIRTUAL LINE LENGTH
1 FILNOLN  DC    H'0'                     VIRTUAL NUMBER OF LINES
1 FILMAXB  DC    H'0'                     MAXIMUM VIRTUAL DEVICE BUFFER
1          DC    2AL1(0)                  RESERVED FOR FUTURE DEVELOPMENT
1                *,DCSTA      201    970513
           END

(1)

Physical type of terminal is requested. The destination area which is generated by means of the DCSTA C,... macro is called STATCHAR by default.

(2)

Physical dimensions of terminal are requested. PHYSAREA is the name of the destination area selected by the user.

(3)

Logical dimensions of terminal are requested. The default prefix “STA” is replaced by the prefix “FI” in the name of the FILIDIM destination area.

(4)

The destination area for information on the physical type is generated together with the symbolic constants for checking the bit values.

(5)

The destination area for information on the physical dimensions is generated.

(6)

The destination area for information on the logical dimensions is generated. “FI” is to be the prefix for the field names (default: “STA”).

Runtime log:

/start-assembh
%  BLS0500 PROGRAM 'ASSEMBH', VERSION '<ver>' OF '<date>' LOADED
%  ASS6010 <ver> OF BS2000 ASSEMBH  READY 
//compile source=*library-element(macexmp.lib,tstat2), -
//        compiler-action=module-generation(module-format=llm), -
//        module-library=macexmp.lib, -
//        listing=parameters(output=*library-element(macexmp.lib,tstat2)), -
//        test-support=*aid
%  ASS6011 ASSEMBLY TIME: 389 MSEC
%  ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES
%  ASS6019 HIGHEST ERROR-WEIGHT: NO ERRORS
%  ASS6006 LISTING GENERATOR TIME: 112 MSEC
//end
%  ASS6012 END OF ASSEMBH
/load-executable-program library=macexmp.lib,element-or-symbol=tstat2, -
/     test-options=*aid
%  BLS0523 ELEMENT 'TSTAT2', VERSION '@' FROM LIBRARY
   ':2OSG:$QM212.MACEXMP.LIB' IN PROCESS
%  BLS0524 LLM 'TSTAT2', VERSION ' ' OF '<date> <time>' LOADED
/%in dth1<%d statchar %xl8, physarea %xl8, filidim %xl8>
/%r
*** TID: 005000D8 *** TSN: 2QSE *********************************************
**
CURRENT PC: 00000036    CSECT: TSTAT2  **************************************
**
V'00000052' = STATCHAR + #'00000000'
00000052 (00000000) 0135A081 88000000                      ...ah... ———  (7) 
V'0000005A' = PHYSAREA + #'00000000'
0000005A (00000000) 00500018 17FF0000                      .&...~..  ——  (8) 
V'00000062' = FILIDIM  + #'00000000'
00000062 (00000000) 00500018 07800000                      .&......  ——  (9) 

(7)

The process is running on a 9755 Data Display Terminal.

(8)

X'0050' The physical line length is 80 characters. X'0018' The physical number of lines is 24 lines. X'17FF' The physical device buffer has a capacity of 6143 characters.

(9)

X'0050' The logical line length is 80 characters (LINE mode). X'0018' The logical number of lines is 24 lines (LINE mode). X'0780' The logical character buffer comprises 1920 characters (= 24 lines x 80 columns).