Guardian Programmer's Guide

Table Of Contents
Communicating With a TACL Process
Guardian Programmer’s Guide 421922-014
8 - 13
Processing Assign Messages
6. INITIALIZER returns control to the main procedure.
? INSPECT, SYMBOLS
!Global variables:
INT SERVER1[0:11]; !Names of two server
INT SERVER2[0:11]; ! processes
? NOLIST
? SOURCE $SYSTEM.SYSTEM.EXTDECS0(INITIALIZER)
? DATAPAGES = 2
? LIST
PROC ASSIGN^NAME(RUCB,
ASSIGN^DATA,
MESSAGE,
LENGTH,
MATCH) VARIABLE;
INT .RUCB,
.ASSIGN^DATA,
.MESSAGE,
LENGTH,
MATCH;
BEGIN
STRING .SMESSAGE := @MESSAGE '<<' 1; !Byte pointer to
! Assign message
! If the logical file in the message is "SERVER1," then
! the SERVER1 file name is set equal to the Tandem file
! name provided in the message:
IF (SMESSAGE[35] = "SERVER1") AND (SMESSAGE[34] = 7)
THEN SERVER1 ':=' MESSAGE[35] FOR 12;
! If the logical file is "SERVER2," then the SERVER2
! file name is set equal to the Tandem file name provided
! in the message:
IF (SMESSAGE[35] = "SERVER2") AND (SMESSAGE[34] = 7) THEN
SERVER2 ':=' MESSAGE[35] FOR 12;
END;
PROC INITIAL MAIN;
BEGIN
CALL INITIALIZER(!rucb!,
!passthru!,
!startupproc!,
!paramsproc!,
ASSIGN^NAME);
END;