DataMuseum.dk

Presents historical artifacts from the history of:

CR80 Wang WCS documentation floppies

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CR80 Wang WCS documentation floppies

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦7aaabc40c⟧ Wang Wps File

    Length: 50482 (0xc532)
    Types: Wang Wps File
    Notes: CPS/SDS/025               
    Names: »1617A «

Derivation

└─⟦11f497f33⟧ Bits:30005812 8" Wang WCS floppy, CR 0119A
    └─ ⟦this⟧ »1617A « 

WangText



,…06…,…07…+…0d…+
+…07……1c……00……1c……01……1b……08……1b……0d……1b……02……1b…
…1b…    …1b……05……1a……0b……1a……0e……1a……0f……1a……05……19……0c……19……00……19……02……19……06……18……09……18……86…1
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    …02… 
     
     
     
     
     …02…
     
    …02… 
     
     
     
    

…02…CPS/SDS/025

…02…850401…02……02…
 
MESSAGE
 MANAGEMENT
DETAILED
 DESIGN
 SPECIFICATION…02…ISSUE
 1…02…CAMPS








4.2.4    C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲ ̲a̲n̲d̲ ̲R̲e̲c̲o̲v̲e̲r̲y̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲



4.2.4.1  F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲ ̲

         Contains the following function groups:

         a)  O̲C̲D̲ ̲M̲a̲n̲a̲g̲e̲m̲e̲n̲t̲

             Maintenance of Online CIF Directory.  Functions
             are supplied to other subpackages and to checkpoint-recovery
             functions.

         b)  R̲e̲c̲o̲v̲e̲r̲y̲

             -   Restores active CIFs during system start, upon
                 request from Message Monitor via RESTORE Command
             -   Activates passive CIFs on request from other
                 subpackages

         c)  C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲i̲n̲g̲

             -   Generates checkpoints for CIFs, requested by
                 application processes via SAVE Command.

             -   Updates existing checkpoints on request from
                 other subpackages.

















































                      Fig. 4.2.4.1-1
            Checkpoint and Recovery Function.


4.2.4.1.1    O̲C̲D̲ ̲M̲a̲n̲a̲g̲e̲m̲e̲n̲t̲



4.2.4.1.1.1 O̲C̲D̲ ̲O̲r̲g̲a̲n̲i̲z̲a̲t̲i̲o̲n̲

         The OCD is organized as a Direct Access File with a
         two level overflow mechanism.  The access key is CIF
         Reference Number.

         The basis for this organization is as follows:

         -   The average number of versions per CIF is between
             1.0 and 1.5.

         -   Only a small fraction of the CIFs will remain online
             for more than 48 hours.



4.2.4.1.1.2 E̲n̲t̲r̲y̲ ̲T̲y̲p̲e̲s̲

         According to this, the OCD will be organized with three
         types of entries:

         a)  Primary Entry.
             This is the entry located by means of CIF Reference
             Number.  The NUMBER OF PRIMARY ENTRIES is the maximum
             number of CIFs which can be produced within 48
             hours.  Primary entries are physically grouped
             in OCD Primary Groups.

         b)  Secondary Entry.
             These entries are used when overflow of primary
             entries occurs.  To each OCD Primary Group corresponds
             a group of secondary entries called an OCD Secondary
             Group.

         c)  Tertiary Entry
             These entries are used when overflow of secondary
             entries occurs.  There is one single OCD Tertiary
             Group.

         The organization is shown on figure 4.2.4.1.1-1 and
         2.  An OCD Block contains an OCD Primary Group and
         the corresponding OCD Secondary Group.





4.2.4.1.1.3 A̲c̲c̲e̲s̲s̲ ̲A̲l̲g̲o̲r̲i̲t̲h̲m̲

         Logically the primary entries are organized as an array
         of size NUMBER OF PRIMARY ENTRIES, indexed by PRIMARY
         INDEX.

         The primary groups are numbered by PRIMARY GROUP INDEX.

         The primary entries within a primary group are numbered
         by BLOCK INDEX.

         To each CIF corresponds the primary entry specified
         by

                 PRIMARY INDEX =
                 CIF REFERENCE NUMBER MODULO NUMBER OF PRIMARY
                 ENTRIES

         The primary group containing this entry is defined
         by

                 PRIMARY GROUP INDEX =
                 PRIMARY INDEX/NUMBER OF ENTRIES PER GROUP+1

         The entry within the block is defined by

                 BLOCK INDEX =
                 PRIMARY INDEX MODULO NUMBER OF ENTRIES PER
                 GROUP +1

         The primary entry so specified shall correspond to
         the latest version of a CIF.



4.2.4.1.1.4 C̲r̲e̲a̲t̲i̲o̲n̲ ̲o̲f̲ ̲E̲n̲t̲r̲i̲e̲s̲

         When an OCD entry shall be created for a CIF, the following
         algorithm is used:

         a)  The primary entry is located as described in 4.2.4.1.1.3

         b)  If this entry is already in use and has a smaller
             CIF ID a secondary or tertiary entry is found,
             and the current contents of the primary entry is
             moved.  If it is in use and has a greater CIF ID,
             the new entry is placed in secondary or tertiary
             group.

         c)  The entry found is initialized corresponding to
             the new CIF.



         The CIF already occupying the entry and having a smaller
         CIF ID as described in b) can either be a previous
         version, or it can belong to a previous 48 hour period.



4.2.4.1.1.5 S̲e̲a̲r̲c̲h̲ ̲o̲f̲ ̲E̲n̲t̲r̲i̲e̲s̲

         When the OCD entry corresponding to a CIF shall be
         searched, the following algorithm is used:

         a)  The primary entry is located as described in 4.2.4.1.1.3.

         b)  If the complete CIF ID of the entry does not match,
             the Secondary Group within the same block is searched.

         c)  If not found in Secondary Group, the complete Tertiary
             Group of the OCD is searched.

         As an OCD Block can be read in one disk access, only
         case c) requires extra disk accesses. By an appropriate
         choice of NUMBER OF ENTRIES IN SECONDARY GROUP/NUMBER
         OF ENTRIES PER GROUP, the occurrence of extra disk
         accesses can be kept very low, say below 0.5%.  The
         current choice of the fraction is 20%.

         The same argument applies to creation of new entries.

















































                    Figure 4.2.4.1.1-1
                Physical OCD Organization

















































                    Figure 4.2.4.1.1-2
                  OCD Block Organization


4.2.4.1.1.6 O̲C̲D̲ ̲R̲e̲c̲o̲v̲e̲r̲y̲

         When an OCD entry must be moved to the Tertiary Group,
         refer 4.2.4.1.1.4 b, two disk accesses are required.
          If a system failure occurs between those two accesses,
         the OCD may become inconsistent, unless special precautions
         are used.  For this reason the Move OCD Entry function
         is saved in the Recovery Block (refer 2.2.2.4) before
         the update is performed.



4.2.4.1.1.7 O̲C̲D̲ ̲I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲

         Upon a dead or cold start OCD is cleared by overwriting
         it with binary zeroes.



4.2.4.1.2    R̲e̲c̲o̲v̲e̲r̲y̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲



4.2.4.1.2.1 R̲e̲s̲t̲o̲r̲e̲

         The Restore Commands are issued in sequence by Message
         Monitor within CSF.  Each Restore Command finds the
         next checkpoint for an Active CIF, activates it by
         restoring CIF Control Block etc. in memory, and returns
         Checkpoint Parameter Block to Message Monitor.  The
         checkpoints are located via OCD, which is read sequentially
         during the restore sequence.

         The Activate CIF function is issued by other subpackages
         when a CIF shall be transferred from passive to active
         state.

         In connection with unload, the unload pointer and current
         time are stored in the OCD block.

         The purpose of storing time is to enable a recovery
         of the most recent value of ITS Unload Pointer without
         additional disk accesses.



4.2.4.1.2.2 S̲t̲a̲r̲t̲

         The Start functions initialize MMS control variables
         depending upon startup type.  The Recovery Block is
         read, and if a function is specified, it is performed.
          Refer 4.2.4.1.3.5.





4.2.4.1.3    C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲i̲n̲g̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲



4.2.4.1.3.1 S̲a̲v̲e̲

         The Save Command generates a checkpoint for a CIF.
          It unloads the CIF if appropriate, and generates an
         OCD Entry, if it was the first checkpoint for the CIF.



4.2.4.1.3.2 C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲ ̲U̲p̲d̲a̲t̲e̲

         An existing checkpoint for a CIF can be updated on
         request from other subpackages.  The following updates
         may occur:

         -   Add or remove a Passive Handle for a View

         -   Set Stopped Status for a CIF

         -   Passivate a CIF by setting its CIFCB reference
             to zero.



4.2.4.1.3.3 C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲ ̲C̲o̲n̲t̲e̲n̲t̲s̲

         This section describes the contents of the checkpoint
         generated by the Save Command.  Refer figures 4.2.4.1.3-1
         to 4, and (h) 4.1.6.2.2.

         a)  S̲i̲z̲e̲

             The complete checkpoint, and each part of it begins
             with one word containing the size in bytes of the
             checkpoint or part.

         b)  C̲I̲F̲C̲B̲ ̲R̲e̲f̲

             For an active CIF it is a pointer to CIF Control
             Block in memory.  For a passive CIF it is zero.

         c)  S̲a̲v̲e̲d̲ ̲C̲I̲F̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲

             Contains a copy of CIF Control Block Access Profile
             through Field Group Types.



         d)  H̲a̲n̲d̲l̲e̲ ̲C̲o̲u̲n̲t̲s̲

             Active and Passive Handle Counts for checkpointed
             views.  It is an array containing as many elements
             as MAX ̲VIEW in CIFCB and indexed by View Id.  The
             element corresponding to a view is zero, if the
             view is not included in checkpoint.  PHC is the
             passive Handle Count as found in VCB, and possibly
             later updated by Add Passive Handle or Remove Passive
             Handle.  AHC is the number of Checkpoint Handle
             Records of Checkpoint Handle List, which references
             the view.

         e)  A̲d̲d̲r̲e̲s̲s̲ ̲L̲i̲s̲t̲

             Contains the following part of CIF Address List:

             -   All Block List Elements

             -   All Address Elements for field zero.

             -   All Address Elements for those fields referenced
                 by views included in the checkpoint.

         f)  V̲i̲e̲w̲ ̲L̲i̲s̲t̲

             Copy of View Control Blocks for the views referenced
             by at least one Checkpoint Handle Record of Checkpoint
             Handle List.

         g)  C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲ ̲H̲a̲n̲d̲l̲e̲ ̲L̲i̲s̲t̲ ̲

             The Checkpoint Handle List received from Message
             Monitor in Save Command.  The MMS View Reference
             of each Handle Record is replaced by View Id.

















































                    Figure 4.2.4.1.3-1
                        Checkpoint

























                    Figure 4.2.4.1.3-2
                      Handle Counts























                    Figure 4.2.4.1.3-3
                       Address List

















































                    Figure 4.2.4.1.3-4
                        View List


4.2.4.1.3.4 H̲a̲n̲d̲l̲e̲ ̲C̲o̲u̲n̲t̲s̲ ̲i̲n̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

         Note the possible difference in AHC of a View Control
         Block and AHC of the same view in a checkpoint:

         -   The AHC of the VCB represents all active handles,
             including those which have not yet been checkpointed.

         -   The AHC of the View in the checkpoint only represents
             those handles for which there is a Checkpoint Handle
             Record in the checkpoint.

         Passive Handle Counts are on the contrary equal in
         VCB and in checkpoint.



4.2.4.1.3.5 R̲e̲c̲o̲v̲e̲r̲y̲ ̲B̲l̲o̲c̲k̲

         The recovery block is a disk area used to ensure consistency
         of MMS data even when the system crashes during an
         update of MMS data structures.

         The recovery block is used when some update of disk
         resident data requires more than one disk access, and
         the data are inconsistent in the period between first
         and last disk access.

         There are two cases where this can occur:

         -   Move of an OCD entry to tertiary group, refer 4.2.4.1.1.4

         -   Writing of a checkpoint which can not be held in
             one sector.

         In both cases the following approach is used:

         Data are written in the Recovery Block describing completely
         the update to be performed.  Then the update is performed,
         and Recovery Block is cleared again.

         At a warm start the Recovery Block is inspected, and
         if it shows a pending update, the update is performed
         and Recovery Block cleared before any other recovery
         actions, refer 4.2.4.1.2.2.



         The first word of Recovery Block contains a function
         code with following values:

         -   Unused

         -   Move OCD Entry

         -   Write Checkpoint

         The rest of Recovery Block contains data for update.



4.2.4.2  S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲

         The subpackage consists of a set of procedures, which
         may be called from Command Handler Coroutines, and
         a set of internal procedures as specified in 4.2.4.4.



4.2.4.3  D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲

         Refer 4.1.3



4.2.4.4  M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲



4.2.4.4.1    O̲C̲D̲ ̲S̲e̲a̲r̲c̲h̲ ̲M̲o̲d̲u̲l̲e̲



4.2.4.4.1.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         The module contains functions for search of OCD by
         CIF ID and for sequential read of OCD during Restore.










                     Figure 4.2.4.3-1

        Procedure influence on Disk buffer states




4.2.4.4.1.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲

         a)  S̲e̲a̲r̲c̲h̲ ̲O̲C̲D̲

             Refer 4.2.4.7.4.

         b)  F̲i̲n̲d̲ ̲E̲n̲t̲r̲y̲ ̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             Searches OCD for entry with specified CIF ID. 
             The specified buffer is used.  Block Number and
             Blockposition of entry is delivered if found.

             The buffer is not released and may be updated

             I̲n̲t̲e̲r̲f̲a̲c̲e̲

             FIND ̲ENTRY (CIF:           CIF ̲ID,
                         VERS:          CIF ̲VERSION,
                         BUFFER:        DISK ̲BUFFER)
                         (BLOCK:        OCD ̲BLOCK ̲NUMBER,
                          BLOCK ̲POS:    LOCATION ̲TYPE):ERROR
                     ̲OK

         c)  F̲i̲n̲d̲ ̲P̲r̲i̲m̲a̲r̲y̲ ̲E̲n̲t̲r̲y̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             Determines Block Number and Block Position of the
             primary OCD Entry corresponding to CIF ID. The
             block is read into specified buffer, and the current
             contents of entry is compared with CIF ID. The
             result of this comparison is delivered.

             Buffer is not released, and the block may be updated.

             I̲n̲t̲e̲r̲f̲a̲c̲e̲

             FIND ̲PRIMARY ̲ENTRY(CIF:         CIF ̲ID,
                                VERS:        CIF ̲VERSION,
                                BUFFER:      DISK ̲BUFFER)
                               (BLOCK:       OCD ̲BLOCK ̲NUMBER,
                                BLOCKPOS:    LOCATION ̲TYPE,
                                RESULT:      FREE,
                                             SMALLER,
                                             EQUAL,
                                             GREATER)


         d)  F̲i̲n̲d̲ ̲S̲e̲c̲o̲n̲d̲a̲r̲y̲ ̲E̲n̲t̲r̲y̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             The secondary entries of the OCD Block currently
             in the buffer is searched for an entry with specified
             CIF ID. The Block Position is delivered if found.

             The buffer is not released, and the block may be
             updated.

             I̲n̲t̲e̲r̲f̲a̲c̲e̲

             FIND ̲SECONDARY ̲ENTRY(CIF:        CIF ̲ID,
                                  VERS:       CIF ̲VERSION,
                                  BUFFER:     DISK ̲BUFFER)
                                 (BLOCKPOS:  LOCATION ̲TYPE):ERROR
         ̲OK

         e)  F̲i̲n̲d̲ ̲T̲e̲r̲t̲i̲a̲r̲y̲ ̲E̲n̲t̲r̲y̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             The tertiary entries of OCD are searched for an
             entry with specified CIF ID. Block Number and Block
             Position are delivered, if entry is found.

             Tertiary Blocks will be read into specified Buffer.
              The buffer is not released, and the block may
             be updated.

             I̲n̲t̲e̲r̲f̲a̲c̲e̲

             FIND ̲TERTIARY ̲ENTRY(CIF:         CIF ̲ID,
                                 VERS:        CIF ̲VERSION,
                                 BUFFER:      DISK ̲BUFFER)
                                (BLOCK:       OCD ̲BLOCK ̲NUMBER,
                                 BLOCK ̲POS:   LOCATION ̲TYPE):ERROR
         ̲OK

         f)  F̲i̲n̲d̲ ̲F̲r̲e̲e̲ ̲S̲e̲c̲o̲n̲d̲a̲r̲y̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             The secondary entries of the OCD Block currently
             in buffer are searched for a free entry.  Blockposition
             is returned, if found.

             The buffer is not released, and the block may be
             updated.



             I̲n̲t̲e̲r̲f̲a̲c̲e̲

             FIND ̲FREE ̲SECONDARY(BUFFER:      DISK ̲BUFFER)
                                (BLOCK ̲POS:   LOCATION ̲
                                 TYPE):       ERROR ̲OK

         g)  F̲i̲n̲d̲ ̲F̲r̲e̲e̲ ̲T̲e̲r̲t̲i̲a̲r̲y̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             The tertiary entries of OCD are searched for a
             free entry.  Block Number and Block Position are
             delivered if found.

             Tertiary blocks are read into buffer, which is
             not released.  The block may be updated

             I̲n̲t̲e̲r̲f̲a̲c̲e̲

             FIND ̲FREE ̲TERTIARY(BUFFER:      DISK ̲BUFFER)
                               (BLOCK:       OCD ̲BLOCK ̲NUMBER,
                                BLOCK ̲POS:   LOCATION ̲TYPE):
         
                                             ERROR ̲OK

         h)  N̲e̲x̲t̲ ̲E̲n̲t̲r̲y̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             Refer 4.2.4.4.1.5 h

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             NEXT ̲ENTRY (FIRST:           BOOLEAN)
                        (CIFREF:          CIF ̲REFERENCE):ERROR
             ̲OK



4.2.4.4.1.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         The module consists of the procedures

         -   Search OCD

         -   Find Entry

         -   Find Primary Entry



         -   Find Secondary Entry

         -   Find Tertiary Entry

         -   Find Free Secondary

         -   Find Free Tertiary

         -   Next Entry



4.2.4.4.1.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             Refer source list.

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲ ̲

             b1) OCD ̲START

             b2) ITS ̲UNLOAD                 (m)

             b3) ITS ̲BUF                    (m)

             b4) CURRENT ̲CIF ̲REF ̲NO         (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             None





4.2.4.4.1.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

         E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

         -   Read Block               4.2.5.7.1

         -   Release Buffer           4.2.5.7.5

         -   Get Sequential           4.2.5.7.8

         -   Get Random               4.2.5.7.9

         a)  S̲e̲a̲r̲c̲h̲ ̲O̲C̲D̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Searches OCD for an entry specified by CIF ID.
             Error return if not found.  OCD must be reserved
             and ITS buffer available at call.  Buffer is released
             before return.

             Flowgram:    Figure 4.2.4.4.1.5-1

         b)  F̲i̲n̲d̲ ̲E̲n̲t̲r̲y̲

             Refer 4.2.4.4.1.2 b

             Flowgram:   Figure 4.2.4.4.1.5-2

         c)  F̲i̲n̲d̲ ̲P̲r̲i̲m̲a̲r̲y̲ ̲E̲n̲t̲r̲y̲

             Refer 4.2.4.4.1.2.c

             Flowgram:  None

         d)  F̲i̲n̲d̲ ̲S̲e̲c̲o̲n̲d̲a̲r̲y̲ ̲E̲n̲t̲r̲y̲

             Refer 4.2.4.4.1.2.d

             Flowgram:  None

         e)  F̲i̲n̲d̲ ̲T̲e̲r̲t̲i̲a̲r̲y̲ ̲E̲n̲t̲r̲y̲

             Refer 4.2.4.4.1.2.e

             Flowgram:  None



         f)  F̲i̲n̲d̲ ̲F̲r̲e̲e̲ ̲S̲e̲c̲o̲n̲d̲a̲r̲y̲

             Refer 4.2.4.4.1.2 f

             Flowgram:  None

         g)  F̲i̲n̲d̲ ̲F̲r̲e̲e̲ ̲T̲e̲r̲t̲i̲a̲r̲y̲

             Refer 4.2.4.4.1.2.g

             Flowgram:  None

         h)  N̲e̲x̲t̲ ̲E̲n̲t̲r̲y̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The procedure is used during Restore for a sequential
             scan of OCD.  Each call delivers next used OCD
             entry.  All three entry types are scanned.  Error
             return if there are no more used entries.

             The boolean first must be true in first call and
             false in following calls.

             The current CIF Reference Number and the ITS Unload
             Pointer are restored during the scan.  Refer 4.2.3.1.1.4
             a1)

             Flowgram:  Figure 4.2.2.4.1.5-3.


         PROCEDURE SEARCH ̲OCD(CIFID)(ENTRY):ERROR ̲OK

         Case FIND ̲ENTRY(CIFID, ITS ̲BUF)
                         (BLOCK, POS):  ERROR ̲OK

              ERROR?     EXITNO = ERROR

              OK?        GET ̲RANDOM(ITS ̲BUF, ENTRY,
                                    POS, ENTRYSIZE)
                         EXITNO=OK 

         End Case

         RELEASE ̲BUFFER(ITS ̲BUF)

         RETURN(EXITNO)





























                   Figure 4.2.4.4.1.5-1
                   Search OCD Flowgram


 PROCEDURE FIND ̲ENTRY(CIF,VERS,BUFFER)(BLOCK,BLOCK ̲POS):ERROR
 OK



 FIND ̲PRIMARY ̲ENTRY(CIF,VERS,BUFFER)
                   (BLOCK,BLOCK ̲POS,RESULT)

 RESULT EQ EQUAL?

 Case FIND ̲SECONDARY ̲ENTRY(CIF,VERS,BUFFER)
                          (BLOCK ̲POS): ERROR ̲OK

      OK?

 End Case

 RELEASE ̲BUFFER(BUFFER)

 Case FIND ̲TERTIARY ̲ENTRY (CIF,VERS,BUFFER)
                          (BLOCK, BLOCK ̲POS):ERROR ̲OK
        ERROR? RETURN(ERROR)


 End Case

 RETURN (OK)




















               Figure 4.2.4.4.1.5-2
               Find Entry Flowgram


 PROCEDURE NEXT ̲ENTRY(FIRST)(CIFREF) : ERROR ̲OK


 FIRST NE TRUE?

 N = NO ̲OF ̲OCD ̲BLOCKS + NO ̲OF ̲TERTIARY ̲BLOCKS

 BLOCKADDRESS=OCD ̲START

 Read Block from BLOCKADDRESS into ITS ̲BUF

 ENTRY COUNT = PRIMARY ̲PER ̲BLOCK+SECONDARY ̲PER ̲BLOCK
 + 1



 Loop
    DECREMENT (ENTRYCOUNT) NE 0?

    Check Unload Pointer Update

    Release ITS ̲BUF

    DECREMENT (N) EQ 0?    EXITNO=ERROR

                              EXIT

    Add OCD ̲BLOCK ̲SIZE to BLOCKADDRESS

    Read Block from BLOCKADDRESS into ITS ̲BUF

    ENTRY ̲COUNT = PRIMARY ̲PER ̲BLOCK+SECONDARY ̲PER ̲BLOCK

    Get next entry from Block

    ENTRY.CIF ̲ID.CIF ̲REFERENCE ̲NUMBER LE CURRENT ̲CIF
 ̲REF ̲NO?

    CURRENT ̲CIF ̲REF ̲NO = ENTRY.CIF ̲ID.CIF ̲REFERENCE
 ̲NUMBER

    ENTRY.CIF ̲ID NE 0 AND
                                    ?   CIFREF = ENTRY.CIFREF
       ENTRY.STORAGE ̲STATUS EQ STS    
                                        EXITNO = OK

                                            EXIT

 End Loop


 RETURN(EXITNO)
                Fig. 4.2.4.4.1.5-3
               Next Entry FLowgram


4.2.4.4.2    O̲C̲D̲ ̲U̲p̲d̲a̲t̲e̲ ̲M̲o̲d̲u̲l̲e̲



4.2.4.4.2.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         The module contains functions for insertion, deletion
         and update of OCD entries, and for initialization of
         OCD at dead or cold start.



4.2.4.4.2.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲

         a)  D̲e̲l̲e̲t̲e̲ ̲O̲C̲D̲

             Refer 4.2.4.7.5

         b)  E̲n̲t̲e̲r̲ ̲O̲C̲D̲

             Refer 4.2.4.7.6

         c)  O̲C̲D̲ ̲U̲n̲l̲o̲a̲d̲ ̲U̲p̲d̲a̲t̲e̲

             Refer 4.2.4.7.7

         d)  O̲C̲D̲ ̲L̲o̲n̲g̲ ̲C̲K̲P̲ ̲U̲p̲d̲a̲t̲e̲

             Refer 4.2.4.7.16

         e)  I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲ ̲O̲C̲D̲ ̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             Overwrites the complete OCD with zeroes.  OCD must
             be reserved and ITS Buffer available at call.

             I̲n̲t̲e̲r̲f̲a̲c̲e̲

             INIT ̲OCD



4.2.4.4.2.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         The module contains the following procedures:

         -   Delete OCD



         -   Enter OCD

         -   OCD Update

         -   Initialize OCD

         -   Try Secondary Replacement

         -   Tertiary Replacement

         -   Put Entry

         -   OCD Long ̲CKP ̲update



4.2.4.4.2.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             Refer source list.

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

         b1) ITS Buffer               (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             None



4.2.4.4.2.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

         E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

         -   Get Random               4.2.5.7.9

         -   Put Random               4.2.5.7.11

         -   Write Buffer             4.2.5.7.4

         -   Release Buffer           4.2.5.7.5








                   Figure 4.2.4.4.2.3-2
                 OCD Update Control Flow



         -   Find Entry               4.2.4.4.1.2 b

         -   Find Primary Entry       4.2.4.4.1.2 c

         -   Find Free Secondary      4.2.4.4.1.2 f

         -   Find Free Tertiary       4.2.4.4.1.2 g

         -   Impossible               4.1.5.4

         a)  D̲e̲l̲e̲t̲e̲ ̲O̲C̲D̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The specified entry is deleted by overwriting it
             with zeroes.

             Flowgram:   Figure 4.2.4.4.2.5-1

         b)  E̲n̲t̲e̲r̲ ̲O̲C̲D̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             A new OCD entry is inserted.  Storage status is
             set to STS. The primary entry corresponding to
             CIF ID is found. If it is free, this entry is used.
             Otherwise the processing depends upon the CIF ID
             of the already existing entry, compared to the
             new CIF ID:

                 New is smaller:    Then the new entry must
                                    be replaced in secondary
                                    or tertiary area.

                 New is greater:    Then the existing entry
                                    must be moved to a secondary
                                    or tertiary entry while
                                    the new must be inserted
                                    as primary entry.

                 Equal:             This can not happen.

             Flowgram: None


         c)  O̲C̲D̲ ̲U̲p̲d̲a̲t̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The OCD entry corresponding to CIF ID is updated.
             If func. = UNLOAD ̲UPD then Storage Status is changed
             to ITS, and the new CIF Reference is inserted.
              At the same time OCD unload pointer and current
             time are inserted in the block.

             Flowgram:  None

         d)  I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲ ̲O̲C̲D̲

             Refer 4.2.4.4.2.2 d)

         e)  T̲r̲y̲ ̲S̲e̲c̲o̲n̲d̲a̲r̲y̲ ̲R̲e̲p̲l̲a̲c̲e̲m̲e̲n̲t̲

             Flowgram:  Figure 4.2.4.4.2.5-2

         f)  P̲u̲t̲ ̲E̲n̲t̲r̲y̲

             Flowgram:  Figure 4.2.4.4.2.5-3

         g)  T̲e̲r̲t̲i̲a̲r̲y̲ ̲R̲e̲p̲l̲a̲c̲e̲m̲e̲n̲t̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Tertiary replacement means that an entry must be
             moved from a primary to a tertiary entry.  This
             implies that two OCD blocks must be updated con-
             currently. This requires use of the Recovery Block
             with function MOVE OCD ENTRY.

             Flowgram:  Figure 4.2.4.4.2.5-4

         h)  O̲C̲D̲ ̲L̲o̲n̲g̲ ̲C̲K̲P̲ ̲U̲p̲d̲a̲t̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The OCD entry corresponding to CIF ID is updated
             with new CIF reference.

             Flowgram: None


 PROCEDURE DELETE ̲OCD (CIFID,VERS)


 CASE FIND ̲ENTRY (CIFID, VERS, ITS ̲BUF)
                     (BLOCK, ENTRY):  ERROR ̲OK

      ERROR?

      OK?   PUT ̲RANDOM(ITS ̲BUF, ZEROES, ENTRY, ENTRYSIZE)

              CASE WRITE ̲BUFFER (ITS ̲BUF)(CC) : ERROR
 ̲OK

                  ERROR?  IMPOSSIBLE (CC)

              End Case



 End Case

 RELEASE ̲BUFFER (ITS ̲BUF)

 RETURN
























               Figure 4.2.4.4.2.5-1
               Delete OCD Flowgram


 PROCEDURE TRY ̲SECONDARY ̲REPLACEMENT : ERROR ̲OK


 Case FIND ̲FREE ̲SECONDARY (ITS ̲BUF)(OLDPOS) : ERROR
 ̲OK

    ERROR?  RETURN (ERROR)

    OK?  GET ̲RANDOM (ITS ̲BUF, OLDENTRY, NEWPOS, ENTRYSIZE)

         PUT ̲RANDOM (ITS ̲BUF, OLDENTRY, OLDPOS, ENTRYSIZE)

         PUT ̲ENTRY

 End Case

 RETURN (OK)


Figure 4.2.4.4.2.5-2  Try Secondary Replacement Flowgram








 PROCEDURE PUT ̲ENTRY


 PUT ̲RANDOM (ITS ̲BUF, NEWENTRY, NEWPOS, ENTRYSIZE)

 Case WRITE ̲BUFFER (ITS ̲BUF)(CC) : ERROR ̲OK

        ERROR?  IMPOSSIBLE (CC)

 End Case

 RETURN






                Fig. 4.2.4.4.2.5-5
                Put Entry Flowgram


 PROCEDURE TERTIARY ̲REPLACEMENT


 GET ̲RANDOM (ITS ̲BUF, OLDENTRY, NEWPOS, ENTRYSIZE)

 RELEASE ̲BUFFER (ITS ̲BUF)

 Case FIND ̲FREE ̲TERTIARY (ITS ̲BUF)(OLDBLOCK, OLDPOS)
 : ERROR ̲OK
      ERROR?  IMPOSSIBLE (CC)
 End case

 RELEASE ̲BUFFER (ITS ̲BUF)

 Write Recovery Block using ITS ̲BUF with
      RECOVERY ̲FUNCTION = MOVE ̲OCD ̲ENTRY, 
      Entries = OLDENTRY, OLDBLOCK, OLDPOS
      and       NEWENTRY, NEWBLOCK, NEWPOS

 Update using ITS ̲BUF : NEWBLOCK, NEWPOS with NEWENTRY

 Update using ITS ̲BUF : OLDBLOCK, OLDPOS with OLDENTRY

 Clear Recovery Block using ITS ̲BUF, without release
 of buffer

 RETURN























                Fig. 4.2.4.4.2.5-4
          Tertiary Replacement Flowgram.


4.2.4.4.3    R̲e̲s̲t̲o̲r̲e̲ ̲M̲o̲d̲u̲l̲e̲



4.2.4.4.3.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         The module performs the RESTORE Command and contains
         the Activate CIF function used by other subpackages.
          Both functions use a checkpoint to restore the memory
         resident data structure of a CIF.



4.2.4.4.3.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         a)  R̲e̲s̲t̲o̲r̲e̲

             Refer 4.2.4.7.1

         b)  A̲c̲t̲i̲v̲a̲t̲e̲ ̲C̲I̲F̲

             Refer 4.2.4.7.8



4.2.4.4.3.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         The module consists of the following procedures

         -   Restore

         -   Activate CIF

         -   Send Restore Parameters

         -   Get Long Checkpoint

         -   Insert Address Elements

         -   Insert View Control Blocks

         -   Adjust PBM



4.2.4.4.3.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲









                   Figure 4.2.4.4.3.3-1
                   Restore Control Flow



         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             Refer source list.

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             b1) CIF ̲CONTROL ̲BLOCK               (m)

             b2) VIEW ̲CONTROL ̲BLOCK              (m)

             b3) ADDRESS ̲ELEMENT                 (m)

             b4) IO ̲BUF                          (m)

             b5) FREE ̲BLOCK ̲MAP                  (m)

             b6) PURGE ̲BLOCK ̲MAP                 (m)

             b7) CC                              (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             c1  F̲i̲r̲s̲t̲ ̲R̲e̲s̲t̲o̲r̲e̲

                 A boolean defining if a Restore command is
                 the first one in the sequence.

                 VAR FIRST ̲RESTORE:      BOOLEAN

                 INIT FIRST ̲RESTORE=     TRUE





4.2.4.4.3.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

         E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲ ̲

         -   Read Block               4.2.5.7.1

         -   Init Write Block         4.2.5.7.2

         -   Write Buffer             4.2.5.7.4

         -   Get Random               4.2.5.7.9

         -   Get Sequential           4.2.5.7.8

         -   Release Buffer           4.2.5.7.5

         -   MMS ̲SEND ̲WORDS           4.1.5.11

         -   Allocate                 4.2.2.7.17

         -   Next Entry               4.2.4.4.1.2 h

         -   Terminate Restore

         -   Impossible               4.1.5.4

         a)  R̲e̲s̲t̲o̲r̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Requests next OCD entry and reads the referenced
             checkpoint.  If the checkpoint represents an active
             CIF it is activated, and restore parameters are
             returned to Calling Message Monitor.  Otherwise
             the CIFCB ref of the checkpoint is set to zero,
             indicating that the CIF is passive, and next entry
             is requested.

             Flowgram:  Figure 4.2.4.4.3.5-1

         b)  A̲c̲t̲i̲v̲a̲t̲e̲ ̲C̲I̲F̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Restores CIFCB, VCBs and Address Elements of a
             CIF from the checkpoint, the first sector of which
             has already been read into IO Buffer.  The Checkpoint
             is updated with a reference to the created CIFCB.

             If allocate = true then the CIFCB can be allocated
             in any segment.

             Flowgram:  Figure 4.2.4.4.3.5-2


         c)  S̲e̲n̲d̲ ̲R̲e̲s̲t̲o̲r̲e̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Sends the Restore Parameter Block of checkpoint
             in IO ̲Buffer to calling application. First the
             header of the block consisting of Handle Count,
             CIF ID, Stopped Status and Profile is send by calling
             Put Trailer.  Then for each Handle Record in the
             Handle List, the View ID is replaced by View Control
             Block Index of the VCB with that View ID. Finally
             the complete Handle List is sent by calling the
             procedure Get Random. If the Checkpoint List is
             empty, the Checkpoint is marked passive, no Restore
             Parameter Block is sent and the error exit is taken.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲ ̲

             SEND ̲RESTORE ̲PARAMETERS (CIFCB:   CIF ̲CONTROL ̲
                                          BLOCK): ERROR ̲OK;

             Flowgram:  None

         d)  G̲e̲t̲ ̲L̲o̲n̲g̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The procedure is used to read a checkpoint consisting
             of more than one sector into IO Buffer. The first
             sector of the checkpoint must already be in IO
             Buffer at call.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             GET ̲LONG ̲CHECKPOINT (CIFCB:    CIF ̲CONTROL ̲BLOCK)

             Flowgram: None


         e)  I̲n̲s̲e̲r̲t̲ ̲A̲d̲d̲r̲e̲s̲s̲ ̲E̲l̲e̲m̲e̲n̲t̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The Address Elements of the checkpoint in IO Buffer
             are inserted into Address Blocks and chained to
             the CIFCB Address List.  For each Field Descriptor,
             the Reference Count is set to zero.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             INSERT ̲ADDRESS ̲ELEMENTS (CIFCB:   CIF ̲CONTROL ̲BLOCK)

             Flowgram:  None

         f)  I̲n̲s̲e̲r̲t̲ ̲V̲i̲e̲w̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The saved View Control Blocks of the checkpoint
             in IO Buffer are restored in memory. For each saved
             VCB, a View Control Block is allocated and chained
             to CIFCB . VIEW ̲LIST. The saved VCB is copied.
             For each nonzero Field Reference of the VCB, the
             Reference Count of Corresponding Field Descriptor
             is incremented.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             INSERT ̲VIEW ̲CONTROL ̲BLOCKS (CIFCB: CIF ̲CONTROL
             ̲BLOCK)

             Flowgram:  None

         g)  A̲d̲j̲u̲s̲t̲ ̲P̲B̲M̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             For each Block List Element of the Address List
             presently in IO ̲BUFFER, the bits in PBM corresponding
             to the occupied blocks, are cleared

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             ADJUST ̲PBM

             Flowgram: None



 PROCEDURE RESTORE

 RESTORE LOOP

     RESERVE OCD

     Case NEXT ̲ENTRY (FIRST ̲RESTORE)(CIFREF) : ERROR
     ̲OK

          ERROR?     CC = END ̲RESTORE

                     TERMINATE ̲RESTORE

                        EXIT

     End Case

     FIRST ̲RESTORE = FALSE
             
     Case INIT ̲UPDATE ̲BLOCK (CIFREF, 1)(IO ̲BUF, CC):
      ERROR ̲OK

            ERROR?      IMPOSSIBLE(CC)

     END Case

     ADJUST ̲PBM 

     Checkpoint. CIFCB ̲REF EQ 0?    RELEASE ̲BUFFER(IO
     ̲BUF)

     ACTIVATE ̲CIF(  )(CIFCB)

     CASE SEND ̲RESTORE ̲PARAMETERS (CIFCB): ERROR ̲OK

         OK?     RELEASE ̲BUFFER(IO ̲BUF)

                 CC = OK

                     EXIT

         ERROR?  RELEASE ̲BUFFER(IO ̲BUF)

     END CASE

 End RESTORE LOOP

 Release OCD

 RETURN

               Figure 4.2.4.4.3.5-1
                 Restore Flowgram


     PROCEDURE ACTIVATE ̲CIF(ALLOCATE)(CIFCB)




     ALLOCATE(CIFCB ̲POOL,ALLOCATE)(CIFCB)

     COMPUTE ̲OBJ ̲REF(CIFCB ̲POOL)

     Copy Saved CIFCB from Checkpoint in IO ̲BUF

            to CIFCB

     Put Address of CIFCB into CHECKPOINT.CIF ̲REF

     WRITE ̲BUFFER (IO ̲BUF)

     Checkpoint SIZE GT 512? GET ̲LONG ̲CHECKPOINT (CIFCB)



     INSERT ̲ADDRESS ̲ELEMENTS (CIFCB)

     INSERT ̲VIEW ̲CONTROL ̲BLOCKS (CIFCB)

     RETURN





















    Figure 4.2.4.4.3.5-2…01…Activate CIF Flowgram


4.2.4.4.4    S̲a̲v̲e̲ ̲M̲o̲d̲u̲l̲e̲



4.2.4.4.4.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         The module performs the SAVE Command.



4.2.4.4.4.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         a)  S̲a̲v̲e̲

         Refer 4.2.4.7.2



4.2.4.4.4.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         The module contains the following components.

         -   Save
         -   Init Save
         -   Write Checkpoint
         -   Init Views
         -   Determine Checkpoint Size
         -   Check Field Zero
         -   Prepare Recovery Block
         -   Put CIF Control Block
         -   Put Views
         -   Write the Checkpoint
         -   Check Remove Handles
         -   Mark Dummy VCB



4.2.4.4.4.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             Refer source list.










               Figure 4.2.4.4.4.3-1
                Save Control Flow



         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

         b1)     Operation
         b2)     CC                    (m)
         b3)     CIF ̲CONTROL ̲BLOCK     (m)
         b4)     VIEW ̲CONTROL ̲BLOCK    (m)
         65)     ADDRESS ̲ELEMENT       (m)
         b6)     IO ̲BUF                (m)
         b7)     ITS ̲BUF               (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             None



4.2.4.4.4.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

         E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

         -   Init Write Block        4.2.5.7.2
         -   Write Buffer            4.2.5.7.4
         -   Release Buffer          4.2.5.7.5
         -   Move Buffer             4.2.5.7.14
         -   Put Sequential          4.2.5.7.10
         -   Put Random              4.2.5.7.11
         -   Enter OCD               4.2.4.7.6
         -   Impossible              4.1.5.4
         -   Get CIF                 4.1.5.1
         -   Open CIF                4.1.5.2
         -   Close CIF               4.1.5.3
         -   MMS ̲RECEIVE ̲WORDS       4.1.5.11
         -   Unload                  4.2.3.7.7
         -   Remove CIFCB            4.2.2.4.3.2 c
         -   Delete CIF from STS     4.2.2.4.3.2 d
         -   Delete View             4.2.2.7.14


         a)  S̲a̲v̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             It is checked, if the CIF shall be unloaded because
             all handles are removed. In that case, the CIF
             is unloaded and deleted from STS. It is also checked
             if the CIF becomes passive because the last active
             handle is removed. If the CIF shall not be unloaded
             a checkpoint is generated. The CIFCB is finally
             removed if appropriate.

             Flowgram: Figure 4.2.4.4.4.5-1.

         b)  I̲n̲i̲t̲ ̲S̲a̲v̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Determines initial control variables for save.
             Goes through all View Control Blocks of the CIF.
             Accumulates the Active and Passive Handle Counts
             into AHC and PHC and sets Checkpoint Status false
             in all VCB's except those referencing passive views
             and those with storage status equal true, which
             are set true.

             Set C = AHC - SAVE ̲BUFFER.REMOVE ̲HANDLE ̲COUNT.

             If C EQ O and PHC NE O, Set B ̲UNLOAD = FALSE and
             B ̲PASSIVATE = TRUE.

             If C EQ O and PHC EQ O, set B ̲UNLOAD = TRUE and
             B ̲PASSIVATE = FALSE.

             If C NE 0, set B ̲UNLOAD = FALSE and B ̲PASSIVATE
             = FALSE.

             Go through all Field Descriptors in CIFCB.ADDRESS
             ̲LIST. For Field Group zero the Checkpoint Status
             is set true. For all other Field Descriptors the
             Checkpoint Status is set false, except for those
             that are not referenced.

             Set FIRST ̲CHECKPOINT = CIFCB.CHECKPOINT ̲STATUS
             Set CIFCB.CHECKPOINT ̲STATUS = TRUE

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             INIT ̲SAVE(CIFCB:             CIF ̲CONTROL ̲BLOCK)
                     (B ̲UNLOAD,
                      B ̲PASSIVATE,
                      EMPTY ̲CKP,
                      FIRST ̲CHECKPOINT:   BOOLEAN)

             Flowgram: None


         c)  W̲r̲i̲t̲e̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Generates checkpoint for specified CIF.
             If size of the checkpoint is greater than
             one sector, the Recovery Block must be
             used. If it was first checkpoint for the
             CIF, a new OCD entry is created.


             Flowgram:  Figure 4.2.4.4.4.5-2

         d)  I̲n̲i̲t̲ ̲V̲i̲e̲w̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             For each Checkpoint Handle Record in Save
             Buffer, the following is done:

             -   Use MMS View Ref to locate VCB.
             -   Replace MMS View Ref with VCB.VIEW
                 ̲ID.
             -   VCB.CHECKPOINT ̲STATUS = TRUE

             For all fields referenced by VCB's with
             CKP ̲status = TRUE set Checkpoint Status
             = TRUE. 

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             INIT ̲VIEWS(CIFCB:         CIF ̲CONTROL ̲BLOCK)

             Flowgram: None

         e)  D̲e̲t̲e̲r̲m̲i̲n̲e̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲ ̲S̲i̲z̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Determine size of the checkpoint as sum
             of:
             -   Saved CIF Control Block size
             -   Handle Counts Size = CIFCB.MAX ̲VIEW
                 ̲ID
             -   Number of Address Elements with Checkpoint
                 Status = true times Address Element
                 Size
             -   Number of View Control Blocks with
                 Checkpoint status = true times Saved
                 VCB Size
             -   Length of Checkpoint Handle List
             -   Length Fields for the parts of Checkpoint.

             The size of the part of the checkpoint
             are stored in dedicated module variables.



             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             DETERMINE ̲CP ̲SIZE(CIFCB:     CIF ̲CONTROL
                                          ̲BLOCK)
                              (SIZE:      INTEGER)

             Flowgram:                    None

         f)  C̲h̲e̲c̲k̲ ̲F̲i̲e̲l̲d̲ ̲Z̲e̲r̲o̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Check, if allocated length of field zero
             is greater than or equal to SIZE. If not,
             call Extend Field in order to ajust allocated
             length. Field length of field zero is set
             to zero.
             Get Sector Address of first sector of field
             zero.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             CHECK ̲FIELD ̲ZERO(CIFCB:      CIF ̲CONTROL
                                          ̲BLOCK,
                              SIZE:       INTEGER)
                             (ADDRESS:    SECTOR ̲NUMBER)

             Flowgram:  None

         g)  P̲r̲e̲p̲a̲r̲e̲ ̲R̲e̲c̲o̲v̲e̲r̲y̲ ̲B̲l̲o̲c̲k̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Prepares for write of checkpoint in Recovery
             Block by an Init Write Block in IO Buf
             with as many sectors as required for checkpoint
             plus Recovery Header. Put Recovery Header
             into buffer.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             PREPARE ̲RECOVERY ̲BLOCK(CIFCB:  CIF ̲CONTROL
             ̲BLOCK,
                                      SIZE:   INTEGER)

             Flowgram: None.

         h)  P̲u̲t̲ ̲C̲I̲F̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Insert CIFCB reference into checkpoint.

             If B ̲PASSIVATE = TRUE, set reference to
             zero, otherwise pointer to CIFCB.


             Move CIF Control Block to checkpoint. Initialize
             Handle Counts to all zeroes.
             Put those address elements into checkpoint
             for which checkpoint status is true.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             PUT ̲CIFCB(CIFCB:             CIF ̲CONTROL
                                          ̲BLOCK,
                     B ̲PASSIVATE:         BOOLEAN)

             Flowgram: None

         i)  P̲u̲t̲ ̲V̲i̲e̲w̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Put into checkpoint all VCBs with checkpoint
             status = true. For each VCB set PHC into
             Handle Count (VCB.VIEW ID). Set AHC = number
             of Checkpoint Handle Records referencing
             this view. Finally move Handle Counts to
             checkpoint.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             PUT ̲VIEWS(CIFCB:             CIF ̲CONTROL
                                          ̲BLOCK)

             Flowgram: None

         j)  W̲r̲i̲t̲e̲ ̲t̲h̲e̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             This procedure writes the checkpoint into
             field zero of the CIF in the case where
             the checkpoint is greater than one sector.
             ITS Buffer is used. The contents of IO
             ̲BUFFER is moved to ITS ̲BUF by means of
             move buffer. ITS ̲BUF is then written and
             released. Recovery function UNUSED is put
             into IO ̲BUFFER, which is then written.



             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             WRITE ̲THE ̲CHECKPOINT(CIFCB:  CIF ̲CONTROL
                                          ̲BLOCK)


             Flowgram: None



         k)  C̲h̲e̲c̲k̲ ̲R̲e̲m̲o̲v̲e̲ ̲H̲a̲n̲d̲l̲e̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Goes through the Remove Handle List of
             Save Buffer. For each element locate corresponding
             VCB and decrement its AHC. If PHC+AHC =
             O and Storage Status = False, call Delete
             View.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             CHECK ̲REMOVE ̲HANDLES(CIFCB:  CIF ̲CONTROL
                                          ̲BLOCK)

             Flowgram: None

         l)  M̲a̲r̲k̲ ̲D̲u̲m̲m̲y̲ ̲V̲C̲B̲

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             MARK ̲DUMMY ̲VCB(CIFCB:CIF ̲CONTROL ̲BLOCK)

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             In order to assure that at least one VCB
             is included in the checkpoint first VCB
             in the view list of the CIFCB is marked
             with checkpoint status equal true.

             F̲l̲o̲w̲g̲r̲a̲m̲: None


 PROCEDURE SAVE


 Case GET ̲CIF( )(CIFCB, VCB, CC) : ERROR ̲OK

     ERROR?

 End Case

 Case OPEN ̲CIF(CIFCB, TRUE)(LOCK,CC): ERROR ̲OK

     ERROR?

 End Case

 CIF not Permanent? CC = NOT ̲PERMANENT

 MMS ̲RECEIVE ̲WORDS(SAVE ̲BUFFER, OPERATION,SIZE)

 INIT ̲SAVE(CIFCB)(B ̲UNLOAD, B ̲PASSIVATE, EMPTY ̲CKP,FIRST
 ̲CHECKPOINT)

 B ̲UNLOAD EQ TRUE?  -                     UNLOAD(CIFCB)

                                          DELETE ̲CIF
                                          ̲FROM ̲STS(CIFCB)

 CHECK ̲REMOVE ̲HANDLES(CIFCB)

 EMPTY ̲CKP = TRUE ?  MARK DUMMY ̲VCB(CIFCB)

 WRITE ̲CHECKPOINT(CIFCB, 

                  B ̲PASSIVATE

                  FIRST ̲CHECKPOINT)

 B ̲UNLOAD EQ TRUE OR
                        ?     REMOVE ̲CIFCB(LOCK)
 B ̲PASSIVATE EQ TRUE  

 CC = OK

 CLOSE ̲CIF(LOCK)

 RETURN







        Figure 4.2.4.4.4.5-1…01…Save Flowgram


 PROCEDURE WRITE ̲CHECKPOINT(CIFCB, B ̲PASSIVATE, FIRST
 ̲CHECKP)

 INIT ̲VIEWS (CIFCB)

 DETERMINE ̲CP ̲SIZE(CIFCB)(S)

 CHECK ̲FIELD ̲ZERO(CIFCB, S)(CHECKP ̲SECTOR, CC)

 S GT SECTOR SIZE?   PREPARE ̲RECOVERY ̲BLOCK(CIFCB, S)

 INIT ̲WRITE ̲BLOCK(CHECKP ̲SECTOR, 1)(IO ̲BUF,CC) : ERROR
 ̲OK


 PUT ̲CIFCB(CIFCB, B ̲PASSIVATE)

 PUT ̲VIEWS(CIFCB)

 WRITE ̲BUFFER(IO ̲BUF)

 S GT SECTORSIZE?    WRITE ̲THE ̲CHECKPOINT(CIFCB)


 RELEASE ̲BUFFER(IO ̲BUF)

 FIRST ̲CHECKP NE TRUE?

 ENTER ̲OCD(CIFCB.CIF ̲ID, CHECKP ̲SECTOR)

 CIFCB.CHECKPOINT ̲STATUS = TRUE

 CC NE MMS ̲ADDRESS ̲BLOCK ̲ADJUSTED ?

 OCD ̲LONG ̲CKP ̲UPDATE (CIFCB.CIF ̲ID, CHECKP ̲SECTOR)

 RETURN














  Figure 4.2.4.4.4.5-2…01…Write Checkpoint Flowgram


4.2.4.4.5 C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲ ̲U̲p̲d̲a̲t̲e̲ ̲M̲o̲d̲u̲l̲e̲



4.2.4.4.5.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         The module contains functions for update of
         existing checkpoints.



4.2.4.4.5.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         a)  A̲d̲d̲ ̲P̲a̲s̲s̲i̲v̲e̲ ̲H̲a̲n̲d̲l̲e̲

             Refer 4.2.4.7.9

         b)  R̲e̲m̲o̲v̲e̲ ̲P̲a̲s̲s̲i̲v̲e̲ ̲H̲a̲n̲d̲l̲e̲s̲

             Refer 4.2.4.7.10

         c)  P̲a̲s̲s̲i̲v̲a̲t̲e̲

             Refer 4.2.4.7.11

         d)  S̲e̲t̲ ̲S̲t̲o̲p̲p̲e̲d̲ ̲S̲t̲a̲t̲u̲s̲ ̲ 

             R̲e̲f̲e̲r̲ ̲4̲.̲2̲.̲4̲.̲7̲.̲1̲2̲

         e)  R̲e̲a̲d̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

             Refer 4.2.4.7.13

         f)  C̲h̲e̲c̲k̲ ̲V̲i̲e̲w̲ ̲i̲n̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

             Refer 4.2.4.7.14

         g)  C̲h̲e̲c̲k̲ ̲C̲I̲F̲ ̲S̲t̲a̲t̲u̲s̲

             Refer 4.2.4.7.15


4.2.4.4.5.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         The module consists of the following procedures:

         -   Add Passive Handle
         -   Remove Passive Handle
         -   Passivate
         -   Set Stopped Status
         -   Read Checkpoint
         -   Check View in Checkpoint
         -   Check CIF Status
         -   Init Update Checkpoint
         -   Update Profiles



4.2.4.4.5.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             Refer source list.

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             b1) IO ̲BUF                   (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             None



4.2.4.4.5.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

         E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

         -   Init Write Block             4.2.5.7.2
         -   Get Random                   4.2.5.7.9
         -   Put Random                   4.2.5.7.11
         -   Release Buffer               4.2.5.7.5
         -   Write Buffer                 4.2.5.7.4
         -   IMPOSSIBLE                   4.1.5.4
         -   Write ̲and ̲Release ̲Buffer     4.2.5.7.4.a

         a)  A̲d̲d̲ ̲P̲a̲s̲s̲i̲v̲e̲ ̲H̲a̲n̲d̲l̲e̲

             Refer 4.2.4.7.9

             Flowgram: None



         b)  R̲e̲m̲o̲v̲e̲ ̲P̲a̲s̲s̲i̲v̲e̲ ̲H̲a̲n̲d̲l̲e̲

             Refer 4.2.4.7.10

             Flowgram: None

         c)  P̲a̲s̲s̲i̲v̲a̲t̲e̲

             Refer 4.2.4.7.11

             Flowgram: None

         d)  S̲e̲t̲ ̲S̲t̲o̲p̲p̲e̲d̲ ̲S̲t̲a̲t̲u̲s̲

             Refer 4.2.4.7.12

             Flowgram: None

         e)  R̲e̲a̲d̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

             Refer 4.2.4.7.13

             Flowgram: None

         f)  C̲h̲e̲c̲k̲ ̲V̲i̲e̲w̲ ̲i̲n̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

             Refer 4.2.4.7.14

             Flowgram: None

         g)  C̲h̲e̲c̲k̲ ̲C̲I̲F̲ ̲S̲t̲a̲t̲u̲s̲

             Refer 4.2.4.7.15

             Flowgram: None

         h)  I̲n̲i̲t̲ ̲U̲p̲d̲a̲t̲e̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The first sector of field zero of the CIF
             is read into IO ̲BUF, and made ready for
             update.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             INIT ̲UPDATE ̲CHECKPOINT(CIFCB:  CIF ̲CONTROL
             ̲BLOCK)
                                   (IO ̲BUF: DISC ̲BUFFER)

             Flowgram: None



         i)  U̲p̲d̲a̲t̲e̲ ̲P̲r̲o̲f̲i̲l̲e̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Updates the CKP of specified CIF with new
             profiles from CIFCB.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             UPDATE ̲PROFILES (CIFCB: CIF ̲CONTROL ̲BLOCK)

             Flowgram: None



4.2.4.4.6  S̲t̲a̲r̲t̲ ̲M̲o̲d̲u̲l̲e̲



4.2.4.4.6.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             The module performs the initializations
             connected with startup and recovery. It
             performs the START command and contains
             the functions to be performed after the
             Restore sequence.



4.2.4.4.6.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         a)  S̲t̲a̲r̲t̲

             Refer 4.2.4.7.3

         b)  T̲e̲r̲m̲i̲n̲a̲t̲e̲ ̲R̲e̲s̲t̲o̲r̲e̲

             F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             Performs the last initializations after
             restore and sets the Running State to Running.

             C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

             TERMINATE ̲RESTORE



4.2.4.4.6.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         The module contains two procedures:

         -   Start
         -   Terminate Restore





4.2.4.4.6.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             Refer source list.

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             CIF Control Block

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             None



4.2.4.4.6.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

         E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

         -   Init OCD                      4.2.4.4.2.2
                                          d
         -   Init Write Block              4.2.5.7.2
         -   Get Random                    4.2.5.7.9
         -   Put Random                    4.2.5.7.11
         -   Write Buffer                  4.2.5.7.4
         -   Release Buffer                4.2.5.7.5

         a)  S̲t̲a̲r̲t̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Find MMS File and file start. CC = MMS
             File not open, if not found.
             Set values of the following MMS Control
             Variables:

             -   STS ̲START
             -   OCD ̲START
             -   ITS ̲FIRST
             -   ITS ̲LAST
             -   ITS ̲CONTROL ̲BLOCK ̲ADDRESS
             -   RECOVERY ̲BLOCK ̲ADDRESS
             -   PBM set to all ones
             -   FBM set to all reserved

             Reset COMMAND ̲STATISTICS.IDLE ̲TIME

             If start type is dead or cold:

             -   Init OCD
             -   WRITE ITS ̲CLEAR to ITS Control Block
             -   Call Terminate Restore
             -   Set Recovery Block Function to Unused



             If start type is warm:

             -   Read ITS Clear from ITS Control Block
             -   Check Recovery Block and perform the
                 function.
             -   Set running state to AWAIT ̲RESTORE

             Flowgram: None.

         b)  T̲e̲r̲m̲i̲n̲a̲t̲e̲ ̲R̲e̲s̲t̲o̲r̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             -   Set Running State to running
             -   Signal Purge Sem as many times as there
                 are bits set in PBM.

             If that number is less than STS warning
             threshold, set STS warning pending.

             Flowgram: None.



4.2.4.5  C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲

         None



4.2.4.6  C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲

         None



4.2.4.7  S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲



4.2.4.7.1    R̲e̲s̲t̲o̲r̲e̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Perform the RESTORE command. Operation must
         contain parameters at call. Reply and CC are
         updated. OCD is reserved during processing.
         Disk accesses for read of OCD and Checkpoint.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         RESTORE



         C̲o̲m̲p̲l̲e̲t̲i̲o̲n̲ ̲C̲o̲d̲e̲s̲

         End restore



4.2.4.7.2    S̲a̲v̲e̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Performs the SAVE command. Operation must contain
         parameters at call. Reply and CC are updated.
         Referenced CIF and OCD are reserved during
         processing. Disk accesses to OCD and checkpoint.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         SAVE

         C̲o̲m̲p̲l̲e̲t̲i̲o̲n̲ ̲C̲o̲d̲e̲s̲

         illegal view reference
         none existing CIF
         not permanent



4.2.4.7.3    S̲t̲a̲r̲t̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Performs the START command. Operation must
         contain parameters at call. Reply and CC are
         updated.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         START

         C̲o̲m̲p̲l̲e̲t̲i̲o̲n̲ ̲C̲o̲d̲e̲s̲

         MMS file not open



4.2.4.7.4    S̲e̲a̲r̲c̲h̲ ̲O̲C̲D̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Searches OCD for entry specified by CIF ̲ID.
         OCD must be reserved and ITS Buffer available
         at call. Error return if not found.



         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         SEARCH ̲OCD (CIF:                 CIF ̲ID)
                     (ENTRY:              OCD ̲ENTRY):
                                           ERROR ̲OK



4.2.4.7.5    D̲e̲l̲e̲t̲e̲ ̲O̲C̲D̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Deletes an OCD entry specified by CIF ̲ID. OCD
         must be reserved and ITS Buffer available at
         call. If entry is not found, nothing is done.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         DELETE ̲OCD (CIF:                 CIF ̲ID,
                     VERS:                CIF ̲VERSION)



4.2.4.7.6    E̲n̲t̲e̲r̲ ̲O̲C̲D̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Inserts a new entry in OCD with specified CIF
         ̲ID and CIF Reference. Storage Status is set
         to STS. OCD must be reserved and ITS Buffer
         available at call.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         ENTER ̲OCD (CIF:                  CIF ̲ID,
                    VERS:                 CIF ̲VERSION,
                     REF:                 CIF ̲REFERENCE)



4.2.4.7.7    O̲C̲D̲ ̲U̲n̲l̲o̲a̲d̲ ̲U̲p̲d̲a̲t̲e̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Updates the OCD entry specified by CIF ̲ID.
         Storage Status is changed to ITS and CIF Reference
         to the value specified. The OCD Block containing
         the entry is updated with specified Unload
         Pointer for recovery purposes. OCD must be
         reserved and ITS Buffer available at call.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         OCD ̲UNLOAD ̲UPDATE (CIF:          CIF ̲ID,
                      REF:                CIF ̲REFERENCE,
                      UNLOADPTR:          SECTOR ̲NUMBER)





4.2.4.7.8    A̲c̲t̲i̲v̲a̲t̲e̲ ̲C̲I̲F̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Activates a CIF from a checkpoint. The first
         sector of the checkpoint must have been read
         into IO Buffer before call. IO Buffer is released.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         ACTIVATE ̲CIF (  ) (CIFCB:        CIF ̲CONTROL
                                          ̲BLOCK)



4.2.4.7.9    A̲d̲d̲ ̲P̲a̲s̲s̲i̲v̲e̲ ̲H̲a̲n̲d̲l̲e̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Updates checkpoint for specified CIF by incrementing
         Passive Handle Count for specified View. OCD
         must be reserved, and IO Buffer available at
         call.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         ADD ̲PASSIVE ̲HANDLE (CIFCB:       CIF ̲CONTROL
                                          ̲BLOCK,
                            VIEW:         VIEW ̲ID)



4.2.4.7.10   R̲e̲m̲o̲v̲e̲ ̲P̲a̲s̲s̲i̲v̲e̲ ̲H̲a̲n̲d̲l̲e̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         As Add Passive Handle, except that Passive
         Handle Count is decremented.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         REMOVE ̲PASSIVE ̲HANDLE (CIFCB:    CIF ̲CONTROL
                                          ̲BLOCK,
                               VIEW:      VIEW ̲ID)





4.2.4.7.11   P̲a̲s̲s̲i̲v̲a̲t̲e̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Updates the checkpoint of specified CIF by
         setting CIFCB Reference to zero. OCD must be
         reserved, and IO Buffer available at call.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         PASSIVATE (CIFCB:                CIF ̲CONTROL
                                          ̲BLOCK)



4.2.4.7.12   S̲e̲t̲ ̲S̲t̲o̲p̲p̲e̲d̲ ̲S̲t̲a̲t̲u̲s̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Updates checkpoint for specified CIF by setting
         Stopped Status to true in saved CIFCB. OCD
         must be reserved, and IO Buffer available at
         call.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         SET ̲STOPPED ̲STATUS (CIFCB:       CIF ̲CONTROL
                                          ̲BLOCK)



4.2.4.7.13   R̲e̲a̲d̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         The first sector of a checkpoint specified
         by a CIF ̲REF in specified OCD entry is read
         into specified buffer. OCD must be reserved
         and Buffer available at call. The buffer is
         not released, and will be ready for update.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         READ ̲CHECKPOINT (ENTRY:          OCD ̲ENTRY)
                         (BUFFER:         DISK ̲BUFFER)





4.2.4.7.14   C̲h̲e̲c̲k̲ ̲V̲i̲e̲w̲ ̲i̲n̲ ̲C̲h̲e̲c̲k̲p̲o̲i̲n̲t̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Check, if checkpoint in specified buffer contains
         specified view. The Handle Counts of the View
         are then returned.Error return if view not
         contained.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         CHECK ̲VIEW ̲IN ̲CHECKPOINT (BUFFER:   DISK ̲BUFFER,
                                   VIEW:     VIEW ̲ID)
                                  (AHC:      HANDLE
                                          ̲COUNT,
                                   PHC:      HANDLE
                                          ̲COUNT):

                                   ERROR ̲OK



4.2.4.7.15   C̲h̲e̲c̲k̲ ̲C̲I̲F̲ ̲S̲T̲A̲T̲U̲S̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Checks if the checkpoint in specified buffer
         represents an active or a passive CIF by checking
         CIFCB reference in checkpoint.

         Error return:                    CIF is passive
         OK return:                       CIF is active.CIFCB
                                          reference
                                          is returned.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         CHECK ̲CIF ̲STATUS (BUFFER:        DISK ̲BUFFER)
                          (CIFCB:         CIF ̲CONTROL
                                          ̲BLOCK):
                                          ERROR ̲OK



4.2.4.7.16   O̲C̲D̲ ̲L̲O̲N̲G̲ ̲C̲K̲P̲ ̲U̲P̲D̲A̲T̲E̲

         F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Updates the OCD entry specified by CIF ̲ID with
         the specified CIF ̲reference.

         OCD must be reserved and ITS buffer available
         at call.

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         OCD ̲LONG ̲CKP ̲UPDATE   (CIF:      CIF ̲ID,
                                REF:      CIF ̲REFERENCE)