mme gechek tra 1,qu
MME GECHEK saves a "snapshot" of the program at the time the MME is called. At a later point, the program may "roll itself back" (restore itself to its state at the time this snapshot was taken) by calling MME GEROLL or by initiating a Checkpoint restart.
If your program is using File and Record Control, the Q-register must contain the following before calling MME GECHEK.
MME GECHEK returns to the TRA instruction after the MME call. At this point, the upper half of the Q register will always hold the address of the TRA instruction, so the TRA will go on to the next instruction.
By default, when a MME GEROLL is used to restore a program at the point where the snapshot was taken, it will return to the TRA instruction following the MME GECHEK that took the snapshot. The upper half of the Q register will again hold the address of the TRA instruction so that execution proceeds normally.
However, if the upper half of word 14 in the user's memory area is assigned the address of a user routine before the first call to MME GECHEK, MME GEROLL will return to the specified user routine instead of the TRA instruction after the MME GECHEK. This user routine can then perform any special processing that might be required after the rollback. When MME GEROLL returns to the user routine, the upper half of the Q register will hold the address of the TRA instruction after the MME GECHEK; the user routine can use this address to return to the normal flow of the program.
If the program intends to use MME GERELS to release data files or peripherals immediately after the MME GECHEK, bit 20 in the Q register must be set to 1 before the MME GECHEK is called and the upper half of the A register must contain the address of the MME GERELS list. This list may contain a maximum of 38 files. The format of the list is
zero N,0 bci 1,0000F1 bci 1,0000F2 ... bci 1,0000FNwhere N is the number of files being released and F1 to FN are the file codes of these files.
If a MME GEROLL rolls back to this kind of checkpoint, the files in the list will not be accessed (and do not need to exist), since they are going to be released again immediately. Note that the MME GERELS must follow the MME GECHEK immediately for this construct to work correctly.
MME GECHEK may not be executed inside a courtesy call.
Any number of snapshots may be written to the same file, but only the most recent can be used in a tape rollback operation. After switching tapes on a multi-reel file, the File and Record Control program takes an automatic snapshot on the current snapshot file if the upper half of SPA word 14 is non-zero.
The rollback procedure does not provide file positioning capabilities for files assigned to card readers, punches, or printers.
After a complete file is released, MME GERELS zeroes the flag indicating that a snapshot is present and sets the "No Activity Restart" indicator, unless the MME GECHEK took the pre-GERELS form. This prevents activity restart or rollback until a new snapshot is taken. MME GERELS does not zero the flag if it is just called to change dispositions or access mode.
After a new file is successfully allocated, MME GEMORE also zeroes the flag indicating a snapshot is present. A new MME GECHEK is required before rollback becomes possible. MME GEMORE does not zero the flag if it is just called to grow an existing file.
If desired, snapshots may be directed to the controlling data file itself. However, this can only be done if the data file resides on magnetic tape, is opened for output only, and is closed without the LOCK option.
If a disk snapshot file is big enough to hold two snapshots, MME GECHEK will alternate writing snapshots to the first and last halves of the file. This makes sure that there is one intact snapshot, even if an abort occurs while writing on the other half of the file.
If MME GECHEK encounters an error, the snapshot is not taken and an error code is returned in the lower half of the Q register. The following octal codes are used:
Copyright © 2000, Thinkage Ltd.