6100 ADCCP Programming Manual
ADCCP Programming Example Using Transaction Application Language (TAL)
069225 Tandem Computers Incorporated B–15
The second OPEN, asynfnum, will capture asynchronous messages.
 call open(startup^msg.infile,asynfnum,1); !async response read
 if <> then
 begin
 call fileinfo(asynfnum,error);
 call numout(ptr,error,10,3);
 ptr[3] ':=' " on 1st open." -> @ptr;
 call write(outfile,outbuf,@ptr '-' @sbuf);
 call awaitio(outfile);
 call abend^;
 end;
The third OPEN, wfnum, will be used for SENDTEXT requests.
 call open(startup^msg.infile,wfnum,7); !write unit
 if <> then
 begin
 call fileinfo(wfnum,error);
 call numout(ptr,error,10,3);
 ptr[3] ':=' " on 1st open." -> @ptr;
 call write(outfile,outbuf,@ptr '-' @sbuf);
 call awaitio(outfile);
 call abend^;
 end;
 end;
This procedure (which is several pages long) opens $RECEIVE, reads and parses the
startup message, opens the home terminal or other output file, opens the line, starts
the backup process, and initializes the I/O buffers.
?page "STARTUP PROCEDURE"
PROC STARTUP;
 BEGIN
 int t^o,
 status := 0,
 i,
 .wbuf,
 .temp[0:11];
 string .ptr2,
 . ptr3;
 int(32) seconds,
 minutes;
In the startup message, the user specifies PRI for primary or SEC for secondary.
Because the example uses ABM, it does not matter which value is supplied.
 subproc check^startup^for^pri^sec^parms;
 begin
 int .ptr2;
 @ptr := @startup^msg.params;
 startup^pri^sec^parm := false;
 while true do
 begin
 scan ptr while " " -> @ptr;
 if $carry then return;
 if ptr = "p" or ptr ="P" then
 begin !must be the PRI parm
 startup^says^sabm := true;
 startup^pri^sec^parm := true;
 while ptr <> " " and ptr <> 0 do !blank out the parm
 begin
 ptr := " ";
 @ptr := @ptr[1];
 end;










