| Introduction | MTB Statements | File System | Compiler | Applications | Reference Guide | Index |
| Language Structure | Data Division | I/O Format Division | Procedure Division | Mnemonics |
| Syntax: | FSTAT(filename[,DIR=directory][,EXCP=statement-label]) |
| Discussion: | The FSTAT function returns file status information. The filename may be a string constant, a single-element string variable, a string array element, a string expression, or a string function. |
| Return values: |
Position Length Description/Values
===================================================================
1 1 File type
K = keyed file
D = sequential file
T = text file
O = MTB object program
Q = QICBASIC object program
2 1 Locked status
"P" = locked
"" or "@00@" = unlocked
3 3 Directory name
6 3 Open count (decimal)
9 3 Extract count (decimal)
12 3 Record size (# of bytes, decimal)
15 4 Size of data file (# of bytes, hex)
19 6 Create date (MMDDYY)
25 6 Update date (MMDDYY)
31 2 Key length
(# of bytes, decimal, key files only)
33 2 Unused
35 11 Next file name in directory
bytes 1-8 = file name
bytes 9-11 = reserved
46 4 Record size (# of bytes, decimal, 4 digits)
50 12 Whole file name after the conversion from Qantel
characters to DOS characters, in the form:
filename (8 characters with blanks appended),
period (if extension is supplied), and
extension (3 characters)
62 * 8 Full create date (MMDDYYYY)
70 * 8 Full update date (MMDDYYYY)
129 2 Time of last update (seconds, 2 digits)
131 4 Time of last update HHMM
135 4 File length of I00 file (# of bytes, hex)
139 8 Library file name (if object file is bound)
147 4 Position of object in library file (if object
file is bound)
* Full create date and update date added in Comet 504.239 and
Comet98 Build 239.
|
| Example: |
LENGTH 150 & LOCAL VALUE$
.
VALUE$ = FSTAT("C1A",EXCP=9999)
This example shows how the FSTAT function can be used to obtain
file status information for a file named "C1A".
|