6100 ADCCP Programming Manual
ADCCP Programming Example Using Transaction Application Language (TAL)
069225 Tandem Computers Incorporated B–21
?PAGE "I/O FORMATTING"
This procedure completes the requests associated with starting up the link:
FETCH CONFIGURATION
SET CONFIGURATION
DEFINELIST
START
MODE SET
int proc check^awaitio(time,CMD) variable; !function procedure
 INT CMD; !VALUE PARAMETER
 int(32) time; !value parameter
 begin
 int any^file ;
 restart:
 any^file := -1;
 tag := "junk";
 call awaitio(any^file,,count^trans,tag,time);
 call fileinfo(any^file,error);
 IF NOT $PARAM(CMD) THEN CMD := 0;
 Serror := CMD;
Timeout.
 if error = 40 then goto restart;
Asynchronous response received.
 if any^file = asynfnum and count^trans > 0
 then begin
 error := 500;
 sbuf[9] ':=' "ASYNC RESP" -> @ptr;
Call procedure to print error message on terminal. In this case, the message
consists of a timestamp, the words "ASYNC RESP," and the error number (500).
 call write^err^msg;
 error := 0;
! @ptr := @startup^msg.infile '<<' 1;
 call sblank(rbuf,30);
Immediately post another READ to replace the one that completed.
 call read(asynfnum,rbuf,$LEN(d.command^response));
 goto restart;
 end; !end of then loop
These lines check for the successful completion of the specified request (CMD,
passed by the caller). If an error occurred or the wrong request completed, the
procedure notifies the caller.
 IF NOT ERROR THEN
 BEGIN
 IF NOT (D.COMMAND^RESPONSE.RSP = CMD AND
 D.COMMAND^RESPONSE.MOD = LTM^OK AND
 D.COMMAND^RESPONSE.REQ^ID = CMD)
 THEN BEGIN
 ERROR := 300;
 ERROR.<8:15> := ERROR.<8:15> + D.COMMAND^RESPONSE.MOD;
 END;
 END;










