TS/MP Pathsend and Server Programming Manual (H06.05+, J06.03+)
Contains logic that reads requests in
$RECEIVE, services requests, and replies
to requests.
PROCESS-REQUEST SECTION.
PERFORM GET-MSG IN RCV-MGR.
IF NOT last-requester-close
PERFORM DO-REQUEST.
DO-REQUEST.
IF function-code OF
order-check-msg = ORDER-CHECK
nl
PERFORM DO-ORDER-CHECK
ELSE IF function-code OF
nl
order-check-msg = ORDER-COMIT
nl
PERFORM DO-ORDER-COMIT
ELSE PERFORM BAD-REQUEST IN
ERROR-MGR.
DO-ORDER CHECK.
.
.
.
Provides $RECEIVE I/O
services.
RCV-MGR SECTION.
Provides disk-file I/O services.DB-MGR SECTION.
Provides error-processing
services.
ERROR-MGR SECTION.
Contains logic that closes all
files used by server.
STOP SECTION.
CLOSE msg-in.
CLOSE msg-out.
CLOSE last-id.
.
.
.
Designing Applications for Batch Processing
If your Pathway application includes batch processing, consider the different needs of this type of
processing in your design.
For example, you might code a Pathsend program that takes its input from a file rather than from
a terminal, then sends requests to a server to make updates to a database. This program could be
configured as a server, therefore operating as a nested server. Its input file might be TMF protected,
and the Pathsend program might make updates to it.
An application that does several updates to a database, with each update coded as a separate
TMF transaction, could be slow when it performs these updates as a batch job rather than performing
them online. For batch processing, it is usually faster to group a number of updates in a single
transaction. However, if your batch jobs are very large, note that you should not try to group more
than about one thousand updates in one TMF transaction.
50 Designing Your Application










