GDSX Manual
User Exit Descriptions
Extended General Device Support (GDSX) Manual–134303
9-10
USER^BACKUP
•
Receive control blocks
•
Line control blocks
•
Device control blocks
•
Process control blocks
•
Logical device control blocks
See “Fault Tolerance” in Section 2 for more information on the fault-tolerance
processing at startup time.
After this data is checkpointed, TSCODE’s backup task (task 3) in the primary GDSX
process calls USER^BACKUP, giving you the opportunity to checkpoint your own
global data declared in a named or private global data block.
If at some later time the primary process dies, in the new primary, which was formerly
the backup process, calls USER^TAKEOVER, followed by USER^BACKUP.
The USER^BACKUP procedure is only called once in the life of a GDSX primary
process.
Considerations
•
The TSCODE-supported FAULT procedure should only be called from the
USER^BACKUP exit with its noretn parameter equal to 0. See the description of
the FAULT procedure on page 8-22.
•
Pseudo procedures may be called from this procedure.
Example
Here is an example of USER^BACKUP code that checkpoints data input at a terminal.
Obtaining the checkpoint semaphore is not necessary, because TSCODE is not
checkpointing and no user task exists. Also, calling DO^CP is not necessary, because
after exiting USER^BACKUP a DO^CP is done automatically by the backup task.
BLOCK USER^PRIVATE;
INT AREA[0:11];
END BLOCK;
.
PROC USER^BACKUP;
BEGIN
INT t, flags;
INT TRM1 [0:11];
INT .Buffer;
INT writecnt := 20,
cnt := 0;
TRM1 ':=' ["$SURF ",8 * [" "]];
PROC USER^BACKUP