TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)

Examples
NonStop TS/MP Pathsend and Server Programming Manual132500
B-2
Pathsend Requester Example
Example B-1. Context-Free Pathsend Requester Program
?PAGE "BROADCAST REQUESTER (BREQ) OVERVIEW"
! @@@ START COPYRIGHT @@@
! Tandem Confidential: Need to Know only
! Copyright (c) 1980-1985, 1987-1995, Tandem Computers Incorporated
! Protected as an unpublished work.
! All Rights Reserved.
!
! The computer program listings, specifications, and documentation
! herein are the property of Tandem Computers Incorporated and shall
! not be reproduced, copied, disclosed, or used in whole or in part
! for any reason without the prior express written permission of
! Tandem Computers Incorporated.
! @@@ END COPYRIGHT @@@
?SETTOG 1
?IFNOT 1
BREQ is a single-threaded program. It gets its input from the input
file, which contains data used to make two Pathsend sends. In
addition to doing the two sends, BREQ writes the input record to the
message log file. The two sends and the write are treated as one
logical transaction.
The processing flow is like this: read one record from the input file,
initiate the I/O nowaited, complete the I/O, and write the reply from
the two servers to the output file before reading the next record from
the input file.
An input record is made up of the following data for each Pathsend
send: either a PATHMON ASSIGN name or a PATHMON system and process
name, followed by a server class name.
The PATHMON ASSIGN names get passed to BREQ at startup. If a trace
file ASSIGN is present, then BREQ outputs a msg after it does any of
the following:
. READs one record from the input file
. Initiates a SERVERCLASS SEND
. Initiates a WRITE to the msg log file
. Executes BEGINTRANSACTION
. Executes ENDTRANSACTION
. Executes ABORTTRANSACTION
. CANCELs outstanding I/O
. After an I/O completes successfully
. After an I/O times out
. After an I/O fails
. When a transaction is retried
. When max-retries is exceeded
BREQ does a SERVERCLASS_SEND_ to the first server, a WRITE to the
message log file, and a SERVERCLASS_SEND_ to the second server. All
three I/O's are NOWAIT and initiated in this sequence.
The reply from each server named in the request msg is simply its
process id. BREQ puts together the reply for each server and writes
it to the output file.