Guardian Application Conversion Guide

Declaring and Using TACL Variables
Converting TACL Programs
7–4 096047 Tandem Computers Incorporated
For details of converting DSM applications, see Section 8, “Converting Other Parts of
an Application.”
Avoiding Subvolume
Defaulting
Your existing program might use subvolume defaulting to represent a Guardian disk
file name in the form
volume.file-id
. For example:
$MYVOL.MYFILE
If you are using the D-series programmatic interface, you must explicitly specify the
subvolume. If a file name requires the volume name, also include the subvolume
name:
$MYVOL.MYSUBVOL.MYFILE
Your existing TACL program might use the #FILEINFO built-in function to obtain the
volume part of the current default values as follows:
#FILEINFO /VOLUME/ [#DEFAULTS]
#FILEINFO now requires a file identifier which is not supplied by the defaults. You
must therefore supply a file ID. Replace the call with:
#FILEINFO /VOLUME/ [#DEFAULTS].X
Converting Between
Process Handles and
Process File Names
A new built-in function, #CONVERTPHANDLE, converts process handles to process
descriptors and process file names to process handles.
Converting Process Handles to Process Descriptors
You can convert a process handle into a process descriptor using
#CONVERTPHANDLE as shown in the following example:
[#DEF process^name STRUCT
BEGIN
CHAR process^file^name(0:46);
END;
]
[#DEF process^handle STRUCT
BEGIN
PHANDLE proc^handle;
END;
]
...
#SET process^name &
[#CONVERTPHANDLE /PROCESSID/ process^handle]
Converting Process File Names to Process Handles
The following example converts a process file name into a process handle using the
same STRUCT definitions as the previous example:
#SET process^handle [#CONVERTPHANDLE /INTEGERS/ process^name]