TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Designing Your Application
NonStop TS/MP Pathsend and Server Programming Manual–132500
2-27
Designing Applications for Batch Processing
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, thus 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.
 PROCESS-REQUEST SECTION.            Contains logic that reads
 PERFORM GET-MSG IN RCV-MGR.          requests in $RECEIVE, services 
 IF NOT last-requester-close         requests, and replies to
 PERFORM DO-REQUEST.            requests.
 DO-REQUEST.
 IF   function-code OF
      order-check-msg = ORDER-CHECK
     PERFORM DO-ORDER-CHECK
 ELSE IF function-code OF
      order-check-msg = ORDER-COMIT
     PERFORM DO-ORDER-COMIT
 ELSE  PERFORM BAD-REQUEST IN ERROR-MGR.
 DO-ORDER CHECK.
   .
   .
   .
 RCV-MGR SECTION.
               Provides $RECEIVE I/O
                      services.
 DB-MGR SECTION.
               Provides disk-file I/O
                      services.
 ERROR-MGR SECTION.
              Provides error-processing
                      services.
 STOP SECTION.
                Contains logic that closes
 CLOSE msg-in.                all files used by server.
 CLOSE msg-out.
 CLOSE last-id.
  .
  .
  .
Example 2-2. COBOL85 Server Program Example (page 3 of 3)










