Guardian Application Conversion Guide

Managing Your Disk Files
Converting Other Parts of an Application
8–12 096047 Tandem Computers Incorporated
Getting Open Information About a Disk File
Your existing program might call the OPENINFO procedure to get information about
the opens for a disk file or device:
error := OPENINFO (search^name,
previous^tag,
primary^process^id,
backup^process^id,
access^mode,
exclusion^mode,
sync^depth,
file^name,
paid,
valid^info^mask);
Convert your program to call the FILE_GETOPENINFO_ procedure.
FILE_GETOPENINFO_ requires a string rather than the 12-word internal-format name
for the input file name or device name parameter. If a file name is incomplete,
FILE_GETOPENINFO_ uses the current settings, including the node name, from the
=_DEFAULTS DEFINE for the unspecified parts.
FILE_GETOPENINFO_ returns a process handle for the primary and backup opener
processes. If a backup opener process does not exist, the backup process handle
contains a null value (a -1 in each word).
When you are searching for all opens on a disk volume or for all subdevices for a
device, FILE_GETOPENINFO_ returns the output
file^name
parameter. The
file^name
is a variable-length string rather than a 12-word internal-format file
name.
In this example, FILE_GETOPENINFO_ obtains information about an open for a disk
file. The
search^name
parameter contains the name of the file:
! Return information about the last open for a disk file.
error := FILE_GETOPENINFO_(search^name:search^name^length,
previous^tag,
primary^process^handle,
backup^process^handle,
access^mode,
exclusion^mode,
sync^depth,
! file^name:max^buffer^size ! ,
! file^name^length ! ,
paid,
valid^info^mask);