Guardian Application Conversion Guide

Being Opened by and Communicating With a High-PIN Requester
Converting Pascal Applications
6–24 096047 Tandem Computers Incorporated
Defining an Opener Table
If your server tracks its openers, it might define an opener table that uses a process ID
to identify an opener (primary process opener and backup process opener):
TYPE opener = RECORD
primary_process_id: ARRAY [1..4] OF INTEGER;
primary_file_number: INTEGER;
backup_process_id: ARRAY [1..4] OF INTEGER;
backup-file_number: INTEGER;
END;
TYPE opener_table = RECORD
current_count: INTEGER;
opener_list: ARRAY [1..max_openers] OF opener;
END;
Convert your opener table to identify an opener using a process handle rather than a
process ID. To use the OPENER_LOST_ procedure (which is described later in this
subsection) to manage your opener table, define the table as follows:
Use a process handle to identify both a primary-process and backup-process
opener.
Declare the process-handle field for the backup-process opener immediately after
the process-handle field for the primary-process opener (that is, the fields must be
stored in a 20-word contiguous part of an entry).
Declare table entries as fixed length and contiguous.
Do not store variable-length items in the table. If necessary, save a pointer in the
table to a variable-length item.
Set the process handles for primary and backup openers in unused entries to null
values (all -1s).
An example of an opener table that the OPENER_LOST_ procedure can process is:
TYPE opener = RECORD
primary_process_handle:
ARRAY [1..ZSYS_VAL_PHANDLE_WLEN] OF INTEGER;
backup_process_handle:
ARRAY [1..ZSYS_VAL_PHANDLE_WLEN] OF INTEGER;
primary_file_number: INTEGER;
backup_file_number: INTEGER;
END;
TYPE opener_table = RECORD
current_count: INTEGER;
opener_list: ARRAY [1..max_openers] OF opener;
END;