Guardian Application Conversion Guide

Managing Your Disk Files
Converting Other Parts of an Application
8–10 096047 Tandem Computers Incorporated
In the example below, FILE_GETINFO_ returns the last file-system error for a terminal
I/O operation. Then, FILE_GETINFOLISTBYNAME_ uses the file name to return
information about a disk file.
! Return the last file-system error.
error := FILE_GETINFO_(terminal^file^number,
last^terminal^file^error);
...
! Return information for the file indicated by file^name.
error := FILE_GETINFOLISTBYNAME_(file^name:file^name^length,
item^list,
number^of^items,
results,
maximum^results,
results^length,
error^item);
Getting Lock Information About a Disk File
Your existing program might call the LOCKINFO procedure to get information about
a lock (either held or pending) on a disk volume, disk file, process, or TMF transaction:
error := LOCKINFO (search^id,
search^type,
control^words,
buffer^size,
buffer);
Convert your program to call the FILE_GETLOCKINFO_ procedure to get information
about a lock (either held or pending). Each FILE_GETLOCKINFO_ call returns
information about one lock. To get information about all locks for an object, make
repeated calls to FILE_GETLOCKINFO_.
FILE_GETLOCKINFO_ requires a string for the name rather than the 12-word
internal-format name. If the name specifies a disk volume or disk file,
FILE_GETLOCKINFO_ uses the current settings, including the node name, from the
=_DEFAULTS DEFINE for any unspecified parts. However, if the name specifies a
process or TMF TRANSID, the name must include a volume name.