TRANSFER Programming Manual
Error Handling
Designing and Writing a Client
069138, Update 1 to 040970 Tandem Computers Incorporated 9–11
In your program, you group UOWs into an interprocess communication (IPC) that is
forwarded to TISERV by the SEND statement or WRITEREAD call. One IPC exists for
each SEND statement or WRITEREAD call; one UOW exists for each operation
requested. The TRANSFER delivery system processes the UOWs in the order in which
they appear in the IPC.
The more UOWs you can pack into one IPC (SEND or WRITEREAD request) and the
fewer IPCs in your program, the better. For applications running under PATHWAY,
reducing the number of SEND operations between screen presentations is particularly
important. Both the TRANSFER delivery system and PATHWAY operate far more
efficiently with fewer IPCs. Excessive communication slows the system down, and the
processing overhead associated with each request further contributes to this
slowdown.
Fewer IPCs offer several advantages:
Result in fewer input/output operations by TISERV as well as fewer interprocess
messages
Minimize the points of interaction between your client and TISERV, potentially
simplifying error recovery
Provide an easy way for sequences of operations to control the execution of later
operations if an early operation fails
Error Handling To facilitate the coding of several UOWs within the same IPC, you can use the
RQST-CODE field of the IPC header to specify whether or not to continue processing
all UOWs in an IPC in the event of an error or a warning regarding a particular UOW
within that IPC. If the RQST-CODE field contains STOP-ON-ERROR, an error
condition in a UOW prevents succeeding UOWs in the IPC from being processed. If
the RQST-CODE field contains DO-ALL-UOWS, however, an error or a warning will
not terminate processing of the remaining UOWs in the IPC.
If you abort a transaction because of an error in an IPC, changes to the TRANSFER
database caused by this IPC are backed out. All other changes made in this
transaction are also backed out.
If successful completion of one UOW is necessary for later UOWs, place the dependent
UOWs in the same IPC and specify STOP-ON-ERROR.
Suppose, for example, you wish to discard an item in a folder, but before discarding it,
you want to save it in the WASTEBASKET folder so that it will remain available until
the end of the current session. You can take the following steps:
1. Save the item (with a SAVE-ITEM UOW).
2. Remove the item from the originating folder (with the UNSAVE-ITEM UOW) in
the same IPC.
If the SAVE-ITEM UOW fails, the UNSAVE-ITEM UOW will not even be attempted
and you will still retain the item.