<< LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION>>               00000001
<< LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION>>               00001000
$PAGE "INCLMVTB - MOUNTED VOLUME TABLE INCLUDE FILE"                    00002000
COMMENT                                                                 00003000
<<**********************************************************>>          00004000
<<**                                                      **>>          00005000
<<**              INCLMVTB - Module B9                    **>>          00006000
<<**                                                      **>>          00007000
<<**********************************************************>>          00008000
                                                                        00009000
$IF X8 = OFF                                                            00010000
$CONTROL NOLIST                                                         00011000
$IF                                                                     00012000
                                                                        00013000
MOUNTED VOLUME TABLE (MVTAB)                                            00014000
----------------------------                                            00015000
                                                                        00016000
DST = 53 (%65)                                                          00017000
SIR = 27 (%33)                                                          00018000
                                                                        00019000
                 Zero Entry Format                                      00020000
                 -----------------                                      00021000
                                                                        00022000
    0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                      00023000
  +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                     00024000
 0|    Entry size = %26   |  Max # of entries     | 0                   00025000
  +-----------------------------------------------+                     00026000
 1|       Number of mounted volume sets           | 1                   00027000
  +-----------------------------------------------+                     00028000
 2|      ldev             |    Directory base     | 2                   00029000
  +------------------------                       |                     00030000
 3|           of system volume set                | 3                   00031000
  +-----------------------------------------------+                     00032000
 4|                       0                       | 4                   00033000
  +-----------------------------------------------+                     00034000
  -                       .                       -                     00035000
  -                       .                       -                     00036000
  +-----------------------------------------------+                     00037000
21|                       0                       |25                   00038000
  +-----------------------------------------------+                     00039000
$PAGE                                                                   00040000
                Typical Entry Format                                    00041000
                --------------------                                    00042000
                                                                        00043000
    0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                      00044000
  +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+----                 00045000
 0| U| cycl ptr  |      Directory size / 32       | 0 |                 00046000
  +-----------------------+-----------------------+   |                 00047000
 1| High Vol #| # of vols |///////////////////////| 1 |                 00048000
  +-----------------------+-----------------------+   |                 00049000
 2|  Master volume ldev   |   Directory Base      | 2 | master volume   00050000
  +-----------------------+                       |   | of volume set   00051000
 3|                of Volume Set                  | 3 | /class          00052000
  +-----------------------------------------------+   |                 00053000
 4|          Number of volume set users           | 4 |                 00054000
  +-----------------------------------------------+   |                 00055000
 5|              Generation number                | 5 |                 00056000
  +-----------------------------------------------+----                 00057000
 6|        ldev           |  Volume Table Index   | 6 | volume          00058000
  +-----------------------------------------------+   | entry           00059000
 7|           Number of volume users              | 7 |   0             00060000
  +-----------------------------------------------+----                 00061000
  -                                               -                     00062000
  |     (for up to 8 volumes per volume set)      |                     00063000
  -                                               -                     00064000
  +-----------------------------------------------+----                 00065000
20|        ldev           |  Volume Table Index   |24 | volume          00066000
  +-----------------------------------------------+   | entry           00067000
21|           Number of volume users              |25 |   7             00068000
  +-----------------------------------------------+----                 00069000
                                                                        00070000
Discussion:                                                             00071000
                                                                        00072000
Word 0.(0:1)  -- In use bit.                                            00073000
Word 0.(1:4)  -- Cyclical volume index (volume index within             00074000
                 Mounted Volume Table) for disc space allocation.       00075000
Word 0.(5:11) -- Directory size divided by 32.  It must be a            00076000
                 multiple of 32.                                        00077000
Word 1.(0:4)  -- Highest (ordinal) local volume index of a              00078000
                 mounted member of the volume set (class).              00079000
Word 1.(4:4)  -- Number of volumes mounted for the volume               00080000
                 set (class).                                           00081000
Word 2        -- Number of users having mounted the volume              00082000
                 set (class).                                           00083000
Word n+1      -- Number of users having mounted the volume,             00084000
                 which is a member of a volume set or class.            00085000
                                                                        00086000
   The Mounted Volume Table  is initialized to an  empty state          00087000
 by  INITIAL during system startup.  This state consists of the         00088000
 zero  entry, which contains the entry size, the maximum number         00089000
 of  entries,  number  of mounted volume  sets, and the logical         00090000
 device  number and absolute disc  sector address of the system         00091000
 directory.   Additional entries are made in the table when the         00092000
 first  logical mount, explicit or  implicit, is performed on a         00093000
 volume set or class.  Each entry represents one mounted volume         00094000
 set  and/or combinations of logical  mounts for volume classes         00095000
 of that volume set.                                                    00096000
                                                                        00097000
    The entry contains information regarding the logical device         00098000
 number  and disc address of the  directory base on the mounted         00099000
 master  volume  of the volume set,  the number of users having         00100000
 caused  the volume set to be logically mounted, the generation         00101000
 number  of  the volume set, and  from one to eight descriptors         00102000
 which  contain  information  representing each  mounted member         00103000
 (physical  volume/pack) of the volume set indicating its logi-         00104000
 cal  device  number,  volume table index  corresponding to the         00105000
 system volume table, and the number of users having caused the         00106000
 particular volume to be logically mounted.                             00107000
                                                                        00108000
    An  entry in this table for  a logically mounted volume set         00109000
 can  be  globally  referenced  from the  volume set definition         00110000
 entry  in the directory, since  the Mounted Volume Table index         00111000
 (MVTABX) is placed in the definition entry when the the volume         00112000
 set is logically mounted for the first time.  In addition, the         00113000
 MVTABX  is placed in a group's directory entry if that group's         00114000
 Home  Volume Set (HVS) is logically  mounted on behalf of that         00115000
 group.   This  constitutes the binding of  a group to its HVS.         00116000
 The  MVTABX can also be found in a process' JIT if an explicit         00117000
 mount,  with binding, has been performed for the logon group's         00118000
 HVS.   Finally, a non-zero MVTABX will  be found in the PVINFO         00119000
 word  of FCBs for files opened  for groups if that group's HVS         00120000
 is in the non-system domain.                                           00121000
                                                                        00122000
;                                                                       00123000
$PAGE                                                                   00124000
$IF X8 = OFF                                                            00125000
$CONTROL LIST                                                           00126000
$IF                                                                     00127000
                                                                        00128000
          <<****************************>>                              00129000
          <<                            >>                              00130000
          <<  Declarations start here   >>                              00131000
          <<                            >>                              00132000
          <<****************************>>                              00133000
                                                                        00134000
<<---------------------------------------------------------->>          00135000
<<-                                                        ->>          00136000
<<- Addressing conventions:                                ->>          00137000
<<-                                                        ->>          00138000
<<- If an EXCHANGEDB to the MVTAB DST has been done:       ->>          00139000
<<-                                                        ->>          00140000
<<-   LOGICAL ARRAY MVHEAD (*) = DB+0;                     ->>          00141000
<<-   DOUBLE ARRAY MVHEADD (*) = MVHEAD;                   ->>          00142000
<<-   LOGICAL POINTER MVTAB;                               ->>          00143000
<<-   DOUBLE POINTER MVTABD;                               ->>          00144000
<<-                                                        ->>          00145000
<<- If using the MFDS and MTDS instructions:               ->>          00146000
<<-                                                        ->>          00147000
<<-   LOGICAL ARAY MVTAB (0:SIZE'OF'MVTAB'ENTRY);          ->>          00148000
<<-   DOUBLE ARRAY MVTABD (*) = MVTAB;                     ->>          00149000
<<-   LOGICAL ARRAY MVHEAD (0:SIZE'OF'MVTAB'ENTRY          ->>          00150000
<<-   DOUBLE ARRAY MVHEADD (*) = MVHEAD;                   ->>          00151000
<<-                                                        ->>          00152000
<<- Also:                                                  ->>          00153000
<<-                                                        ->>          00154000
<<-   INTEGER VOL'INDEX;                                   ->>          00155000
<<-                                                        ->>          00156000
<<- Which must be initialized as:                          ->>          00157000
<<-                                                        ->>          00158000
<<-   VOL'INDEX := SIZE'OF'MVTAB'VS'HEAD +                 ->>          00159000
<<-                (V * SIZE'OF'VOL'ENTRY);                ->>          00160000
<<-   (If using MVTAB)                                     ->>          00161000
<<-                                                        ->>          00162000
<<-   VOL'INDEX ;= SIZE'D'OF'MVTAB'VS'HEAD + V;            ->>          00163000
<<-   (If using MVTABD)                                    ->>          00164000
<<-                                                        ->>          00165000
<<- V is the index of the volume within the volume set.    ->>          00166000
<<-                                                        ->>          00167000
<<---------------------------------------------------------->>          00168000
                                                                        00169000
$PAGE                                                                   00170000
                                                                        00171000
EQUATE                                                                  00172000
MVTAB'DST    = 53,            << Mounted Volume Table DST   >>          00173000
MVTAB'SIR    = 27,            << Mounted Volume Table Sir   >>          00174000
SIZE'OF'MVTAB'ENTRY = 22,     << MVTAB entry size           >>          00175000
SIZE'OF'MVTAB'VS'HEAD = 6,    << MVTAB volume set hdr size  >>          00176000
SIZE'D'OF'MVTAB'VS'HEAD = 3,  << Equiv. of above for DOUBLE >>          00177000
SIZE'OF'VOL'ENTRY = 2;        << Volume entry size          >>          00178000
                                                                        00179000
<< Mounted Volume Table Header                              >>          00180000
                                                                        00181000
DEFINE                                                                  00182000
MVTABH'ENT'SIZE       = MVHEAD(0).(0:8)#, << entry size     >>          00183000
MVTABH'MAX'ENTRIES    = MVHEAD(0).(8:8)#, << max num entries>>          00184000
MVTABH'NUM'MOUNTED'VS = MVHEAD(1)#,       <<# mnted vol sets>>          00185000
MVTABH'SYS'LDEV       = MVHEAD(2).(0:8)#, <<sys dirbase ldev>>          00186000
MVTABHD'SYS'DIRBASE   = MVHEADD(1)#,      << sys dirbase    >>          00187000
                                                                        00188000
<< Mounted Volume Table Entry, volume set header            >>          00189000
                                                                        00190000
MVTAB'VS'INUSE    = MVTAB(0).(0:1)#,  << entry in use?      >>          00191000
MVTAB'VS'CYCL     = MVTAB(0).(1:4)#, << cyclical alloc ptr  >>          00192000
MVTAB'VS'DIRSIZE  = MVTAB(0).(5:11)#, << PV direc size / 32 >>          00193000
MVTAB'VS'HVOL     = MVTAB(1).(0:4)#, <<highest vol # mounted>>          00194000
MVTAB'VS'NVOL     = MVTAB(1).(4:4)#, << # of volumes mounted>>          00195000
MVTAB'VS'LDEV     = MVTAB(2).(0:8)#, << PV dirbase ldev #   >>          00196000
MVTAB'VS'LODA     = MVTAB(3)#,       << PV dirbase LODA     >>          00197000
MVTABD'VS'DIRBASE = MVTABD(1)#,      << PV dirbase          >>          00198000
MVTAB'VS'USECNT   = MVTAB(4)#,       << # users mounting VS >>          00199000
MVTAB'VS'GENNUM   = MVTAB(5)#,       << generation number   >>          00200000
                                                                        00201000
<< Volume entry                                             >>          00202000
                                                                        00203000
MVTAB'VOL'LDEV   = MVTAB(VOL'INDEX).(0:8)#, << ldev of vol  >>          00204000
MVTAB'VOL'VTABX  = MVTAB(VOL'INDEX).(8:8)#, << Vol Table x. >>          00205000
MVTAB'VOL'VCNT   = MVTAB(VOL'INDEX+1)#,   << # of vol users >>          00206000
MVTABD'VOL'ENTRY = MVTABD(VOL'INDEX)#;   << entire vol entry>>          00207000
                                                                        00208000
<<**********************************************************>>          00209000
<<**                                                      **>>          00210000
<<**       End of Mounted Volume Table Include File       **>>          00211000
<<**                                                      **>>          00212000
<<**********************************************************>>          00213000
