6100 ADCCP Programming Manual
ADCCP Programming Example Using Transaction Application Language (TAL)
069225 Tandem Computers Incorporated B–17
!
!
!<<< BEGIN STARTUP >>>
!
call nonstop^whoami; !no return if backup
Is this the primary process? If so, open $RECEIVE and read the startup message.
CALL OPEN(recname,recfile,1,1);
IF <> THEN CALL ABEND^;
CALL READ(recfile,startup^msg,$len(startup^msg));
CALL AWAITIO(recfile,,count^read);
if <> then call abend^;
startup^msg.params[count^read-41] := 0;
Open the home terminal (or other output file).
call open(startup^msg.outfile,outfile,1,1);
if <> then call abend^;
!
!The infile is the ADCCP line name.
!
call open^line;
Open the ADCCP line.
!
!Obtain the line addresses value from startup message.
!
Get the addresses.
if not get^addrs then
begin
sbuf ':=' "Missing or invalid ADDRESS(x,y) parameter." -> @ptr;
call write(outfile,outbuf,@ptr '-' @sbuf);
call awaitio(outfile);
call abend^;
end;
call check^startup^for^pri^sec^parms;
Find out the station type (doesn't matter for ABM).
!
!Obtain the framesize (words) value from startup message.
!
status := 0; !preset status no error
Get the frame size.
framesize := 128; !preset default to 128 words
scan startup^msg.params while " " -> @ptr;
if not $carry then call numin(ptr,framesize,10,status);
if status then
begin
i := @ptr; !save ptr
sbuf ':=' "Illegal FRAMESIZE value. NUMIN STATUS = " -> @ptr;
call numout(ptr,status,10,4);
framesize := 128; !use default
ptr[4] ':=' ". Using default of 128 words." -> @ptr;
call write(outfile,outbuf,@ptr '-' @sbuf);
call awaitio(outfile);
if <> then call abend^;
@ptr := i; !restore ptr
end;