Guardian Application Conversion Guide

New Guardian Procedures
Conversion Concepts
2–4 096047 Tandem Computers Incorporated
Specifying the String Parameter Length. You specify the length of a string parameter
depending on whether the string is being used as an input-only, output-only, or
input/output parameter as described below and as shown in the hypothetical
procedure calls:
Input only The string parameter is followed by a colon (:) and an integer input
parameter that specifies the actual length in bytes of the string.
Passing the string length as zero is equivalent to omitting the string
parameter. For example:
error := PROC_CALL_ (file^name:file^name^length); ! i:i
Output only The string parameter is followed by a colon (:) and an integer input
parameter that specifies the maximum length in bytes of your return
buffer. Passing the return buffer length as zero is equivalent to
omitting the string parameter.
The system returns the actual length of the string in a separate
integer output parameter. For example:
error := PROC_CALL_ (file^name:max^buffer^length, ! o:i
file^name^length); ! o
Input/output The string parameter is followed by a colon (:) and an integer input
parameter that specifies the maximum length in bytes of your return
buffer. Passing the return buffer length as zero is equivalent to
omitting the string parameter.
A separate integer parameter contains the current string length. You
set this parameter to the input parameter string length in bytes, and
the system returns the length of the output parameter string. For
example:
error := PROC_CALL_ (file^name:max^buffer^length, ! i,o:i
file^name^length); ! i,o
Process-Handle Parameters
In process-control procedures such as PROCESS_ACTIVATE_ or PROCESS_STOP_ , a
20-byte process handle identifies the target process. Declare a process handle as a
reference parameter. The ZSYSTAL, ZSYSCOB, ZSYSC, and ZSYSPAS files contain
declarations that you can use to declare process-handle parameters. An example of a
TAL declaration is:
INT .process^handle[0:ZSYS^VAL^PHANDLE^WLEN-1];
Null Process Handle. Some procedures accept or return a null process handle, which has
a -1 in each word. For example, a process can obtain information about itself by
calling the PROCESS_GETINFO_ procedure with a null process handle input
parameter. The PROCESS_GETPAIRINFO_ procedure returns a null process handle
output parameter for the backup process if one does not exist.