Guardian Application Conversion Guide

New Guardian Procedures
Conversion Concepts
096047 Tandem Computers Incorporated 2–5
To set a process handle parameter to a null value, set each word to -1. An example of a
TAL null process handle is:
process^handle ':=' [ZSYS^VAL^PHANDLE^WLEN * [-1]];
However, when you check a process handle output parameter, you need check only
the first word for a -1. If the first word of a process handle output parameter is -1, the
parameter contains a -1 in each word and is a null process handle.
Error-Return Conventions The D-series procedures do not use the condition code (CC) setting to indicate an
error. Each procedure returns an integer error or status value. If an error condition
contains more information than the procedure can return in an integer parameter, the
procedure returns additional information in an integer
error-detail
parameter.
This hypothetical TAL example shows the
error
value and the
error-detail
parameter:
...
INT error;
INT error^detail;
...
error := PROC_CALL_ (parameter-1,
parameter-2,
parameter-3,
error^detail);
...
Depending on the procedure you call, the
error
value contains either a file-system
error number or one of the following values:
0 The procedure was successful.
1 A file-system error occurred;
error-detail
contains the file-system
error number.
2 A parameter error occurred. For example, a required parameter is
missing.
3 A bounds error occurred on a reference parameter.
4 through
n
Another error occurred; in some cases
error-detail
contains
additional information. The value and interpretation of
n
depend on the
procedure you are calling.
To avoid problems in future releases, your application should treat
error
values
other than the ones currently defined for each procedure as undefined rather than
invalid. Always include an OTHERWISE (or equivalent) clause in your application
when checking error values.
If a procedure has more than one input parameter, a parameter error (
error
= 2) or a
bounds error on a reference parameter (
error
= 3) can occur on more than one
parameter. In this case, the
error-detail
parameter contains the ordinal number of