TS/MP Pathsend and Server Programming Manual (H06.05+, J06.03+)
Example 3 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 these:
. 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.
These files are used by BREQ and must exist before running the
program:
INFILE -- each record is one transaction
OUTFILE -- the outcome of the transaction
ERROR LOG -- Entry sequenced; record length 132; not audited.
The physical file name is read from the ASSIGN
'ERROR-LOG-FILE'.
MESSAGE LOG -- Entry sequenced; record length 132; audited.
The physical file name is read from the ASSIGN
'MESSAGE-LOG-FILE'.
TRACE (OPTIONAL) -- Entry sequenced; record length 80; not
audited; may be a terminal, may not be a
spooler location ($S.#SOME.LOC). The physical
file name is read from the ASSIGN 'TRACE-FILE'.
The following ASSIGNS passed in:
130 Examples










