Record integrity checking

When File Manager is operating in a shared environment, it enables record integrity checking. This means that, before rewriting the contents of a record to a file, File Manager first checks if the record has been updated (by another user) since the record was retrieved. File Manager performs this check by comparing the contents of the record at the time that it retrieved it with the contents of the current record as it exists on the file.

With a heavily shared file it is possible that, between the time the record was first fetched from the file and the time that you issued a SAVE command (or a save was automatically issued due to the value of the Autosave frequency option, see Saving a file after a given number of updates (Autosave frequency option)), another user updated the same record that you are trying to update.

Saving of records for a file occurs when:
  • You issue a SAVE primary command (applies to all records in the file).
  • You issue an SV or SVV prefix command (applies to specific records in the file).
  • You issue an SV primary command while in SNGL display format (applies to the specific record being viewed).
  • The value of the AUTOSAVE frequency option triggers a file-wide SAVE.
  • The value of the CHANGE ALL autosave frequency option triggers a file-wide SAVE during the CHANGE command process.

When File Manager detects that a record has been changed by another user, it is called an integrity check.

File Manager recognizes three variations of integrity check:
  • You are attempting to update a record but, in the meantime, the record content has been deleted by another user.
  • You are attempting to delete a record but, in the meantime, another user has updated it.
  • You are attempting to update a record but, in the meantime, the record content has been updated by another user.
In each of the saving scenarios mentioned previously, when an integrity check occurs, File Manager displays one of the integrity check panels shown on the following pages (according to the three variations listed above).
Note: In the case of the saving scenario where the value of the CHANGE ALL autosave frequency option (see CHANGE ALL, automatic saving and retry) has triggered a file-wide SAVE during the CHANGE command process, File Manager only displays an integrity check panel if the Auto retry for CHANGE ALL option (see CHANGE ALL, automatic saving and retry) is set to OFF.
Figure 1. Integrity check variation 1: (Update attempted but record updated by another user)
 ┌─────────────────────────────────────────────────────────────────────────────────┐
 │  File Manager           Record Updated by other user                            │
 │  Command ===>                                                       Scroll CSR  │
 │                                                                     Format CHAR │
 │  Between the time the record was retrieved and the time a save was issued,      │
 │  another user has updated the record that you are attempting to update. The     │
 │  records are shown below and changes highlighted.                               │
 │                                                                                 │
 │  Enter  SAVE   to save this record anyway.                                      │
 │  Enter  CONTINUE  Save anyway and don't ask again for other records.            │
 │  Enter  CANCEL to skip this update.                                             │
 │  Enter  ABORT  to skip this update and halt performing other updates.           │
 │                                                                                 │
 │  Col 1                                                                          │
 │  Offset      Pending record contents:            Record contents as on file:    │
 │         <----+----1----+----2----+----3-->   <----+----1----+----2----+----3--> │
 │  000000 00000001A This is my change AAAAAA | 00000001AAAAAAAA meanwhile, user 2 │
 │  000034 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |  updated this record AAAAAAAAAAAAA │
 │  000068 AAAAAAAAAAAA                       | AAAAAAAAAAAA                       │
 └─────────────────────────────────────────────────────────────────────────────────┘
Figure 2. Integrity check variation 2: (Update attempted but record deleted by another user)
 ┌─────────────────────────────────────────────────────────────────────────────────┐
 │  File Manager           Record Deleted by other user                            │
 │  Command ===>                                                       Scroll CSR  │
 │                                                                     Format CHAR │
 │  Between the time the record was retrieved and the time a save was issued,      │
 │  another user has deleted the record that you are attempting to update. The     │
 │  record you are updating is shown below.                                        │
 │                                                                                 │
 │  Enter  SAVE   to save this record anyway.                                      │
 │  Enter  CONTINUE  Save anyway and don't ask again for other records.            │
 │  Enter  CANCEL to skip this update.                                             │
 │  Enter  ABORT  to skip this update and halt performing other updates.           │
 │                                                                                 │
 │  Col 1                                                                          │
 │  Offset      Pending record contents:                  Record deleted           │
 │         <----+----1----+----2----+----3-->                                      │
 │  000000 00000001AAMaking a change to a rec |                                    │
 │  000034 ord that someone else deleted AAAA |                                    │
 │  000068 AAAAAAAAAAAA                       |                                    │
 └─────────────────────────────────────────────────────────────────────────────────┘
Figure 3. Integrity check variation 3: (Delete attempted but record updated by another user)
 ┌─────────────────────────────────────────────────────────────────────────────────┐
 │  File Manager           Record Updated by other user                            │
 │  Command ===>                                                       Scroll CSR  │
 │                                                                     Format CHAR │
 │  Between the time the record was retrieved and the time a save was issued,      │
 │  another user has updated the record that you are attempting to delete. The     │
 │  records are shown below and changes highlighted.                               │
 │                                                                                 │
 │  Enter  SAVE   to save this record anyway.                                      │
 │  Enter  CONTINUE  Save anyway and don't ask again for other records.            │
 │  Enter  CANCEL to skip this update.                                             │
 │  Enter  ABORT  to skip this update and halt performing other updates.           │
 │                                                                                 │
 │  Col 1                                                                          │
 │  Offset           Record deleted                 Record contents as on file:    │
 │         <----+----1----+----2----+----3-->   <----+----1----+----2----+----3--> │
 │  000000 00000001AAAAAAAAAAAAAAAAAAAAAAAAAA | 00000001AAA Another user happily u │
 │  000034 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | pdates the record AAAAAAAAAAAAAAAA │
 │  000068 AAAAAAAAAAAA                       | AAAAAAAAAAAA                       │
 └─────────────────────────────────────────────────────────────────────────────────┘
In each integrity check panel, you have four options that are selectable by tabbing to the keyword and pressing Enter. The options are:
SAVE
Ignores the other update and applies your update. Use this option when you are sure that the record should be set the way you have indicated (or deleted).
CONTINUE
Ignores the other update and applies your update. Use this when you are sure that the record should be set the way you have indicated (or deleted). By using CONTINUE, you are instructing File Manager to also automatically SAVE any further records which encounter an integrity check.
Cancel this individual update (PF12 or CANCEL command)
Ignores your update to an individual record element. If you are changing a record, this leaves your changes in your session and marks the record element as having an integrity check.
Abort this and any following updates (ABORT command)
Operates like the Cancel option, but halts the process of the current command so that you can correct or inspect an individual condition. For instance, if integrity checks occur during the End process of an Edit session, and an integrity check panel is displayed, entering ABORT stops the saving process and re-enters the Edit to allow you to inspect records before ending your session again.

Related topics