XCF invokes a member's status user routine by scheduling a local
SRB to the member's primary address space. You are responsible for
writing the status user routine, which can do the following:
- Determine if the member's initialization is complete. A member
might issue IXCJOIN and its status user routine could get control
before IXCJOIN returns to the caller. To determine if the member's
initialization is complete, the status user routine might examine
a bit that the member sets on or off. The member might want its status
user routine to automatically set a return code indicating that the
member is operating normally, until the routine determines that initialization
is complete.
- Determine whether XCF was checking for a status update missing
(first call to the status user routine) or a status update resumed
(subsequent call to the status user routine). The status user routine
determines this by checking the SEPLSTCH field in IXCYSEPL. SEPLSTCH=SEUPDMIS
means checking for status update missing; SEPLSTCH=SEUPDRES means
checking for status update resumed.
- If this is the first call, determine if the member is no longer
operating normally and whether XCF should broadcast a status change
to the other members of the group. If this was not the first call,
determine if the member is now operating normally. The status user
routine might do one of the following to make this determination:
- Access the member data value provided through IXCJOIN (SEPLMDAT
in IXCYSEPL). The member data might contain addresses of control
structures. The status user routine could check the control structures
to determine if they are damaged. The control structures might also
contain an indication of the member state or user state value for
the member.
- Examine a work queue to determine if the member missed its status
update because there was no work to do.
- Take an appropriate action, such as:
- Keep a count of how many times XCF invokes the status user routine
within a particular time interval (for example, within one hour).
From this, determine whether the member's status-checking interval
should be modified.
- If the status user routine determines that the member is not operating
normally, it can post a task to do recovery for the member.
- If the status user routine determines that the member is not operating
normally, it can issue the SYMREC macro to create a symptom record
with diagnostic data.
- If recovery is not possible, the status user routine might insure
that the member is stopped in the event other members are resuming
the member's work.
- Issue IXCMSGOX to provide another member with recovery data.
- Set the appropriate return code. The following summarizes what
effect each return code has:
- A return code of SEUPDRES indicates that the member is operating
normally.
- A return code of SEUPDMIS indicates that the member missed its
status update.
- A return code that matches the value in SEPLSTCH causes XCF to
schedule the group user routines and notify them of a status change
for that member (either a status update missing or a status update
resumed).
See Using a Status User Routine and Figure 1 and Figure 2for a complete explanation
of how XCF interacts with the status user routine.