Guardian Programmer's Guide

Table Of Contents
Communicating With a TACL Process
Guardian Programmer’s Guide 421922-014
8 - 16
Setting a Timeout Value for INITIALIZER
Setting a Timeout Value for INITIALIZER
Normally, INITIALIZER waits 60 seconds for a startup sequence message to arrive on
$RECEIVE. If no message is received in that time, INITIALIZER times out, assuming
that the sending process has either terminated or is not going to send a startup
sequence. For most purposes, the 60-second default value is appropriate; however,
depending on expected system load, you might prefer to set the timeout interval to
some other value.
You use the timeout parameter to the INITIALIZER procedure to set the timeout
value. The supplied value is in units of 0.01 second. Choose the value carefully: small
values time out often, and large values cause INITIALIZER to wait for long periods of
time in cases where the sending process has terminated or does not send the
appropriate startup messages.
The following example sets the timeout interval to 120 seconds:
INT(32) TIMELIMIT;
.
.
TIMELIMIT := 12000D;
CALL INITIALIZER(!rucb!,
!passthru!,
!startupproc!,
!paramproc!,
!assignproc!,
!flags!,
TIMELIMIT);
Reading the Startup Sequence Without
INITIALIZER
To read the standard startup sequence of messages without using the INITIALIZER
procedure, your program must do the following:
1. Open $RECEIVE with a receive depth of 1 or more, to allow replies to be made to
the startup messages.
2. Read the Open message from $RECEIVE and reply to it with a reply code of 0.
3. Read the Startup message and process it (for example, by copying it into a global
area). Once you have processed the Startup message, you must take one of the
following actions if you want to receive the remaining messages (Assign and
Param messages) of the startup sequence:
Reply to the Startup message with a reply code of 70, which instructs the TACL
process to continue sending the startup sequence of messages.
Reply to the Startup message with a reply code of 0, but with a reply length
of four bytes. To receive Assign messages, bit 0 of the first byte must be 1.