Introduction MTB Statements File System Compiler Applications Reference Guide Index

Language Structure Data Division I/O Format Division Procedure Division Mnemonics

DSTAT function

Syntax: DSTAT(device-name [,EXCP=statement-label])
Discussion: The DSTAT function returns the current status of system devices.

The device-name is the name of the device to be checked. The device-name may be a string constant, a single-element string variable, a string array element, a string expression, or a string function.

Detailed information: DSTAT of the console
DSTAT of remote terminals
DSTAT of a local printer
DSTAT of a remote printer
DSTAT of a spooler
DSTAT of the system driver (X00)
DSTAT of a gateway
DSTAT of a directory
DSTAT of the clock


DSTAT of the console:

Position  Length    Description/Values
============================================================
1         3         Partition 
4         1         Type
                    0 = Monochrome
                    1 = Color
                    2 = Monochrome with flicker-free adapter
                    3 = Color with flicker-free adapter
                    4 = EGA/VGA/MCGA Monochrome
                    5 = EGA/VGA/MCGA Color
                    6 = TeleVideo
                    7 = AT&T
5         1         Option
                    01H = Force 80-column mode 
                    02H = Force CR the same as Qantel
                    04H = Auto increment cursor
                    08H = FAST option enabled for all files
                    10H = Insert key is the same as Qantel
                    20H = Use expanded memory for all partitions
                    40H = Standard I/O for keyboard
6         1         Status    
7         1         Foreground attribute     
8         1         Background attribute     
9         1         Invisible attribute 
10        1         Border attribute    
11        1         Entry attribute     
12        2         Base address   
14        2         Current column and row   
16        1         BIOS mode for 132-column 
17        1         Current number of columns on screen
21        1         Returns "@01@" if the session is CometAnywhere

DSTAT of remote terminals:

Position  Length    Description/Values
===================================================================
1         3         Partition 
4         1         Type
                    80H = dumb terminal
                    81H = TeleVideo terminal
                    82H = Ampex terminal
                    83H = Qantel VT3 terminal
                    84H = Qantel VT6 terminal
                    86H = QTerm workstation
                    F0H = Intermec bar code reader
                    FEH = RDI printer
                    FFH = ignored terminal
5         1         not used  
6         1         Status    
7         1         UART 
8         1         Poll address   
9         1         Terminal flag

                    80H  OBP Terminal Lockout (Signal to PC that FG
                         processing loop is active on this terminal
                         and effectively locks out PC from changing
                         anything in the term table.)

                    20H  Status Poll Hold Request (PC signals don't
                         do status poll on this terminal.)

                    10H  Select Request (OBP should initiate a
                         select poll (data is in the buffer)

                    08H  Buffer In Use Flag (OBP should not
                         initiate a data poll)

                    04H  Data Poll Ack Request (PC has received the
                         data and the buffer is clear)

                    02H  Reset Request (user has hit Escape)

                    01H  Data Poll Request

10        1         Terminal process

                    Foreground Attention Needed
                    0  = IDLE - Dead terminal
                    1  = IDLE - Active terminal
                    2  = Status Poll Complete
                    8  = Waiting to send buffer to PC
                    9  = Finished select - OK
                    A  = Finished select - NG
                    B  = Data poll complete (ACK included)

                    UART is Working on this one
                    10H  = Doing status poll
                    11H  = Receiving data from terminal
                    12H  = Sending data to terminal
                    13H  = Retransmitting to terminal (1st
                    retransmit)
                    14H  = Retransmitting to terminal (2nd
                    retransmit)
                    15H  = Terminal reset in progress

DSTAT of a local printer:

Position  Length    Description
=======================================================================
1         3         Partition
4         1         Type *
                    00H = local printer with no interupt printer 
                          driver installed
                    01H = local printer with interupt printer installed
                    02H = network printer (cfig type "N")
                    03H = Novell queue type printer (cfig type "Q")
                    04H = Windows printer
                    >=f0H = remote printer on multi-user system
5         1         Spool Type
6         1         Status
7         2         Printer Port
9         2         Buffer Count (convert to decimal for use)
11        30        Path

* This byte was changed in the 504.249 and 505.249 release to
  more accurately reflect the printer type.

DSTAT of a remote printer:

Position  Length    Description
=========================================
1         3         Partition
4         1         Type
5         1         Spool Type
6         1         Status
7         1         UART
8         1         Poll Address
9         1         Terminal Flag
10        1         Terminal Process
11        1         ROM Version

DSTAT of a spooler:

Position  Length    Description
=====================================
1         27        DOS path name





DSTAT of the system driver (X00):

Position  Length    Description
===================================================
1         32        (reserved)
33        16        Network node name
49         2        Number of the of first partiton 
                    on the node (byte-reversed hex)
51         2        Total number of partitions on
                    the node (byte-reversed hex)




DSTAT of a gateway:

Position  Length    Description
=============================================
1         3         Controlling partition
4         1         Gateway type (hex)
5         1         Gateway subtype (hex)



DSTAT of a directory:

Position  Length    Description
======================================
1         3         Directory name
4         27        DOS path name





DSTAT of the clock:

Position  Length    Description
===================================
1         3         Clock name