IBM SC33-1683-02 Server User Manual


 
As described in “Increasing efficiency single-update and read-only protocols” on
page 271 , if the UERTONLY bit is set (indicating that the resource manager is the
only one to have updated resources) the exit program should cause the resource
manager to perform a single-phase commit. If the commit is successful, the exit
program should return ‘UERFOK’ in register 15; if not, it should return ‘UERFBOUT’,
meaning that the commit was unsuccessful and the resources were backed out. If
the exit program is unsure about the outcome of a single-phase commit, it must
abend the task, having saved or displayed any diagnostic information that it
considers necessary.
Note that “register 15” in this section refers to the syncpoint manager’s register 15,
the fifth word of the area addressed by UEPHMSA.
Similarly, when the UERTELUW bit is set (indicating that the resource manager was
in read-only mode throughout this UOW), the exit program should cause the
resource manager to perform a single-phase commit. There are no return codes for
if UERTFID = UERTSYNC then /* Caller is CICS syncpoint manager */
select; /* Type of syncpoint manager request */
when (UERTONLY) /* ONLY resource manager */
invoke RM for single-phase commit /* Single-phase commit */
if RM single-phase commit succeeded then
give CICS syncpoint manager 'YES' vote (UERFOK)
else /* Single-phase commit failed */
/* If RM completed backout */
if RM single-phase commit failed and backed out
give CICS syncpoint manager 'NO' vote (UERFBOUT)
else /* Don't know what happened */
put out message and issue transaction abend
endif
endif
when (UERTELUW) /* RM read-only for current UOW */
invoke RM for single-phase commit /* Single-phase commit */
when (UERTPREP) /* Not ONLY resource manager, nor read-only */
invoke RM for PREPARE /* Prepare - phase 1 of 2-phase commit */
select (resource manager vote)
when (YES) /* Phase 1 completed */
give CICS syncpoint manager 'YES' vote (UERFPREP)
otherwise
give CICS syncpoint manager 'NO' vote (UERFBACK)
endselect
when (UERTCOMM) /* Commit - phase 2 of 2-phase commit */
invoke RM for commit phase 2
if RM commit succeeded then
tell CICS sync manager OK (UERFDONE)
else
tell CICS sync manager remember could not commit (UERFHOLD)
endif
when (UERTBACK) /* Backout request */
invoke RM for backout
if RM backout succeeded then
tell CICS sync manager OK (UERFDONE)
else
tell CICS sync manager remember could not backout (UERFHOLD)
endif
when (UERTWAIT) /* CICS in-doubt about UOW */
invoke RM to free thread
(but maintain locks for UOW and record UOW is in-doubt)
endselect
endif
Figure 8. Sample pseudocode for a task-related user exit program to be invoked by the CICS
syncpoint manager
the task-related user exit program
Chapter 2. Task-related user exit programs 273