Skip to content

FST

File System Information

This string function returns selective file system information.

FST ( full-path-name, option [,ERR=line-ref|,ERC=error-code])
full-path-name
is the fully qualified path and file name up to 255 characters long in VAX/VMS; 192 characters long in UNIX.
option
is an integer value in the range of 0 to 1 designating the type of information to be returned, as follows:
0
returns file system information.
1
returns file system and file type information, for example, INDEXED, DIRECT, or SYSTEM.
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.

This function is generally available starting with release level 8.1.

The file need not be opened to a channel.

The information is returned in the following format:

Byte(s)
Description
1 - 2
System type

$0020$ = DOS
$0021$ = VAX
$0022$ = UNIX

3 - 4
Specific system type (not yet formulated; currently $0000$)
5 - 6
Thoroughbred Basic file type (not returned by option 0)

$0000$ = INDEXED file
$0001$ = SERIAL file
$0002$ = DIRECT file
$0003$ = TEXT file
$0004$ = PROGRAM file
$0006$ = MSORT file
$0007$ = TISAM file
$000A$ = Directory file
$000B$ = System file

7 - 10
Reserved

For UNIX Operating Systems

11 - 14
Device inode resides on
15 - 18
This inode number
19 - 20
File protection bits
21 - 22
Host system file type:

$000A$ = Directory File
$000B$ = System File
$0040$ = UNIX Block Special
$0041$ = UNIX Character Special
$0042$ = UNIX FIFO
$0043$ = UNIX Network Special
$0044$ = UNIX Socket
$0045$ = UNIX Symbolic Link (bytes 119 + point to the

symbolic link name)

$004F$ = Unknown device (to Thoroughbred Basic)

23 - 24
Number of links to file
25 - 26
User ID of owner
27 - 28
Group ID of owner
29 - 32
Device ID. This entry is valid only for Block and character special devices
33 - 36
File size in bytes
37 - 42
File Status change date/time; SQL format
43 - 48
Last access date/time; SQL format
49 - 54
Last modified date; SQL format
55 - 60
Size in bytes of large files.
61 - 118
Reserved

DSD, FID, and XFD functions

From the Thoroughbred Basic Language Reference, Volume II: F–Q, version 8.9.1. Open this page in the PDF