Was this helpful?
InquireFile()
Inquires about a file.
Syntax
[returnfield =] [callproc] inquirefile(handle =
    handle
  [, filetype = byref(filetype) ]
  [, filemode = byref(filemode) ]
  [, filename = byref(filename) ]
  [, record = byref(recordno) |,
     offset =byref(offset) ] )
returnfield
Specifies the name of field to which the result is returned. Integer.
handle
Specifies the file identifier used by the 4GL file access functions. Integer.
filetype
Specifies the value can be text, binary, or stream. String.
filemode
Specifies a value: create, update, append or read. String.
filename
Specifies the name of the file. String.
recordno
Specifies the record number of the current location for a binary file. Integer.
offset
Specifies the offset of the current location. Integer.
Description
The inquirefile() built-in function returns the requested information about a file accessed by 4GL. The file must be open and the handle known to 4GL before information can be retrieved. The parameters must be passed by reference so the values can be returned.
The procedure returns 0 if the function completes without error.
Example
Inquires for information about the file identified by the handle specified in the variable fileno. Returns the location of the file pointer to the variable offsetno, and name of the file to the variable filename.
status = callproc inquirefile(handle = fileno, 
    filename = byref(filename), offset=byref(offsetno))
Last modified date: 11/28/2023