Guardian Application Conversion Guide

Using Terminal I/O Operations
Converting Other Parts of an Application
8–14 096047 Tandem Computers Incorporated
Displaying File-System Error Numbers
Your existing program might display or print three-digit file-system error numbers.
A D-series file-system error number is an integer variable, which allows a maximum of
five digits. Convert your program to display or print five-digit error numbers (or six
digits if you display the numbers in octal).
Avoiding Subvolume Defaulting for Disk Files
Your existing program might use subvolume defaulting to represent a disk file name
in the form:
volume
.
fileid
The D-series operating system does not support subvolume defaulting for disk files.
The defaulting scheme for partially qualified file names that are passed to Guardian
procedures does not resolve this form of a file name. Also, you cannot use the
FILENAME_RESOLVE_ procedure to resolve a name in this form.
Avoid subvolume defaulting in your program. If a disk file name requires the volume
name, it must also include the subvolume name.
Accepting a Process String From a Terminal
If your existing program accepts a process string in an input buffer entered at a
terminal, you might want to use the PROCESSSTRING_SCAN_ procedure to scan the
buffer to extract the process string. In this example, PROCESSSTRING_SCAN_ scans
the input buffer named
buffer
and returns a process string in
string^name
and the
length of the string in
string^name^length
:
error := PROCESSSTRING_SCAN_(buffer:buffer^length,
string^length,
process^handle,
string^type,
string^name:max^length,
string^name^length,
cpu,
pin);
The format for
string^name
is:
[\
node-name
.]
{}
name
cpu,pin
PROCESSSTRING_SCAN_ includes the node (or system) name if it was entered in the
input buffer. If requested, PROCESSSTRING_SCAN_ also returns other items such as
the process handle and the CPU and PIN values (if they exist).