TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Examples
NonStop TS/MP Pathsend and Server Programming Manual–132500
B-12
Pathsend Requester Example
INT .my^processid[0:3]; ! used to preface error msgs with my pid
! Define a global array to hold error msgs that aren't PATHSEND send
! errors. For example, reference parameter errors, AWAITIOX timeout
! errors, and validation errors.
STR .global^non^pathsend^error^msg [0:77] := [78 * [" "]];
LIT max^assigns = 56;
STRUCT .assign^table (ci^assign) [0:max^assigns - 1];
INT assign^count := 0; ! count of assigns in table
INT max^retries := -1; ! #times to retry Pathsend failures
INT .edit^control^block[0: (40 + (1024 / 2)) - 1];
! We use GETPOOL and PUTPOOL to manage memory in the upper 32K.
! Here are some vars used by these procedures.
!
LIT HeadSize = 38D; ! 19 words
LIT PoolAddr = %200000D; ! upper 32K
INT .EXT PoolHead := PoolAddr; ! room for the header
INT .EXT pool := PoolAddr + HeadSize; ! start of pool
LIT PoolSize = 32D*1024D; ! 32K bytes
?LIST,PAGE
?PAGE "BREQ PROGRAM EXTDECS"
?PAGE "PROCESS THE ASSIGN MSGS"
PROC assign^proc (rucb, passthru, assign^msg, msg^len, match) VARIABLE;
INT .rucb,
.passthru,
.assign^msg,
msg^len,
match;
EXTERNAL;
?PAGE "RETURN AN ENTRY FROM THE ASSIGN TABLE"
INT PROC get^assign (logical^name, len);
STR .logical^name;
INT len;
EXTERNAL;
?PAGE "READ THE STARTUP AND ASSIGN MSGS, AND OPEN THE LOG FILE"
PROC initialize;
EXTERNAL;