Skip to content

DSD

Device Status Description

This string function returns information on the specified task, device, or logical disk directory.

DSD (string-value [,ERR=line-ref|,ERC=error-code])
string-value
is any string containing the name of a task, device or logical disk directory.
line-ref
is the program line number or label to branch to if an error is produced by this function.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.

Since DSD contains detailed information about the specified item, it is very operating system dependent, and care should be taken to not misinterpret the string data returned by DSD.

Logical disk directories return a 54-byte string.

The information is returned in the following format:

All Release Levels

Byte(s)
Description
1 - 2
Task, Device, or Logical Disk Directory name (e.g., "T1", "LP", "D2", or "A:")
3
Status Byte (unused)
4
"F"=Floppy Disk (Microsoft Windows) "G"=Ghost Task "P"=Printer "S"=SQL DataServer "T"=Terminal
5
Port Type:

$x0$=Ghost Task, Terminal, or Monitor $x1$=tty1 or COM1 (Microsoft Windows only) $x2$=tty2 or COM2 (Microsoft Windows only) $x9$=Printer

6
Printers:

$x0$=Direct Device $x1$=Spooled Device $x2$=Slaved to Terminal

Disks:

$x0$=Logical Disk Directory $x1$=Contains Subdirectories $x3$=Hierarchical Directory

SQL DataServer connections:

$x1$=Oracle
$x4$=MS SQL Server $x5$=MySQL

Microsoft Windows Floppy Drive (“A:” or “B:”)

Byte(s)
Description
7
Binary number of heads
8 - 9
Binary number of total cylinders
10
Binary number of 512-byte sectors per track
11
Unused

All Except Microsoft Windows Before Thoroughbred Basic 8.0

Byte(s)
Description
7 - 10
Unused
11
Logical Disk Directory Status:

“D”=Disabled
“L”=Locally Disabled “R”=Reserved Space=Enabled

Tasks in Microsoft Windows

Byte(s)
Description
12 - 18
Unused
19 - 20
The binary number of bytes in the input type-ahead buffer

Tasks in All Except Microsoft Windows Before Thoroughbred Basic 8.0

Byte(s)
Description
12 - 20
Unused

Tasks in Thoroughbred Basic 8.0 and Above

Byte(s)
Description
11 - 18
The Terminal Model Code from the TCONFIG8 file for this task
19 - 20
Number of characters in the type-ahead buffer (Microsoft Windows only)

Tasks in Thoroughbred Basic 8.2, Printers Only

Byte(s)
Description
11 - 18
Printer mnemonic table name

Logical Disk Directories in Thoroughbred Basic 7.4 and Above, Except Microsoft Windows

Byte(s)
Description
12
Open file Cache Status:

$x0$=Off
$x1$=On (default)

13 - 20
Unused
21 - 22
Binary Sector Size in bytes
23 - 86
Logical disk directory name; for a hierarchical directory, the directory name of the last file successfully opened on this disk using PREFIX ("." for current directory or if no PREFIX path name was successful; " " if a full-path file name was successfully opened on this disk)

Logical Disk Directories in Microsoft Windows

Byte(s)
Description
12 - 16
Unused
17
File Allocation Table (FAT) ID:

$FF$=double-sided, 8-sector floppy
$FE$=single-sided, 8-sector floppy
$FD$=double-sided, 9-sector floppy
$FC$=single-sided, 9-sector floppy
$F8$=hard disk

18
Sectors per Allocation Unit in binary
19 - 20
Number of Allocation Units in binary
21 - 22
Sector Size in binary
23 - 72
Path Name

SQL DataServer connections, starting in 8.8.1:

Byte(s) Description

7 - 10 Process id of SQL DataServer ( binary )

11 Logical Disk Directory Status:

“D”=Disabled
“L”=Locally Disabled
“R”=Reserved
Space=Enabled

12 Case sensitivity flag:

$x0$=Performs a case sensitive key comparison (default) $x1$= Performs a case insensitive key comparison

13 - 22 Unused

23 - Connection information, the server id and login/password, if specified

“R” (Reserved) only appears in byte 11 for the task that issued the RESERVE.

RESERVE has no effect on a logical disk directory other than changing the byte 11 designator.

DSD(FID(0)) is a special use of the DSD Function, which returns the terminal table name from the TCONFIG file that is currently being used by this task.

FID, FST, and XFD functions

From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF