         << LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION >>     00000001
$PAGE "MPE TABLE ACCESS       FMAVT INCLUDE FILE"                       00005000
<<********************************************************************>>00010000
<<*                                                                  *>>00015000
<<*                  INCFMAVT - FMAVT Include File                   *>>00020000
<<*                           MPE V                                  *>>00025000
<<*                                                                  *>>00030000
<<********************************************************************>>00035000
$IF X8 = OFF                                                            00040000
$CONTROL NOLIST                                                         00045000
$IF                                                                     00050000
COMMENT                                                                 00055000
                                                                        00060000
3.4  File Multi-Access Vector Table (FMAVT)  DST(%54)                   00065000
-------------------------------------------                             00070000
                                                                        00075000
The  FMAVT  is  used  to  locate  shared PACB's for files opened  multi-00080000
access.  When  an  old  disc  file  has  been multi-access, the FMAVT is00085000
searched to determine if the file has been previously opened. The JITDST00090000
the  DADDR  found in the FMAVT are compared to the JITDST of the job and00095000
the DADDR of the device or  disc  file being opened multi-access.  If an00100000
entry exists for the file, than  the PACB can be easily located for that00105000
file.  If  this  is the first process opening the file, than an entry is00110000
created and inserted into the FMAVT for the file.                       00115000
                                                                        00120000
Spoolfiles  are  opened  multi-access, therefore, they will have entries00125000
in the FMAVT.   $STDIN and $STDLIST also have entries in the FMAVT since00130000
they too are always opened multi-access.                                00135000
opened multi-access.                                                    00140000
                                                                        00145000
                                                                        00150000
                  Zero Entry Format                                     00155000
                  -----------------                                     00160000
                                                                        00165000
 -----------------------------------------------------                  00170000
 |               Current Table Size                  | 0 FM'CURR'SIZE   00175000
 |---------------------------------------------------|                  00180000
 |                 Entry Size = 6                    | 1 FM'ENTRY'SIZE  00185000
 |---------------------------------------------------|                  00190000
 |               Maximum Table Size                  | 2 FM'MAX'SIZE    00195000
 |---------------------------------------------------|                  00200000
 |                        0                          | 3                00205000
 |---------------------------------------------------|                  00210000
 |                        0                          | 4                00215000
 |---------------------------------------------------|                  00220000
 |                        0                          | 5                00225000
 -----------------------------------------------------                  00230000
                                                                        00235000
Descriptions:                                                           00240000
                                                                        00245000
FM'CURR'SIZE  The  current  size  of the FMAVT in words.  This value in-00250000
              creases  in  increments of %200 words until FM'MAX'SIZE is00255000
              reached.                                                  00260000
                                                                        00265000
FM'MAX'SIZE   The  maximum allowable size in words that the FM'CURR'SIZE00270000
              can get. The current  value of this is %4000.  FM'MAX'SIZE00275000
              can be changed only  by changing the code in Initial.  The00280000
              FOPEN failes when the maximum is reached.                 00285000
                                                                        00290000
FM'ENTRY'SIZE Size in words of an FMAVT entry, 6 words at present.      00295000
                                                                        00300000
                                                                        00305000
           Typical Entry Format for Discs                               00310000
           ------------------------------                               00315000
                                                                        00320000
   0   1   2   3     6   7   8        12  13  14  15                    00325000
 -----------------------------------------------------                  00330000
 | 1 | G | D |                                       | 0 FM'TESTW       00335000
 |---------------------------------------------------|                  00340000
 |                  JIT DST                          | 1 FM'JITDST      00345000
 |---------------------------------------------------|                  00350000
 |     Logical Device      |                         | 2 FM'LDEV'HODA   00355000
 |--------------------------                         |                  00360000
 |                  Disk Address                     | 3 FM'LODA        00365000
 |---------------------------------------------------|                  00370000
 |                   PACB DST                        | 4 FM'PACBV       00375000
 |                                                   |                  00380000
 |              PACB vector table entry              | 5                00385000
 -----------------------------------------------------                  00390000
                                                                        00395000
                                                                        00400000
           Typical Entry Format for Device Files                        00405000
           -------------------------------------                        00410000
                                                                        00415000
  0   1   2   3     6   7   8                                           00420000
------------------------------------------------------                  00425000
| 1 | G | D |                                        | 0  FM'TESTW      00430000
|----------------------------------------------------|                  00435000
|                    JIT  DST                        | 1  FM'JITDST     00440000
|----------------------------------------------------|                  00445000
|                  Logical Device                    | 2  FM'LDEV'HODA  00450000
|----------------------------------------------------|                  00455000
|                    unused                          | 3                00460000
|----------------------------------------------------|                  00465000
|                    PACB DST                        | 4  FM'PACBV      00470000
|                                                    |                  00475000
|                PACB Vector table entry             | 5                00480000
------------------------------------------------------                  00485000
                                                                        00490000
                                                                        00495000
Descriptions:                                                           00500000
                                                                        00505000
FM'LDEV'HODA  For  disc  files,  this is the LDEV of the FLAB address in00510000
              upper  8 bits and the HODA in the lower.  For device files00515000
              this contains the LDEV of the device in the complete word.00520000
              Note: LDEV number for discs will be <= 256 always.        00525000
                                                                        00530000
FM'DEVICE     This bit is 1 for device files and 0 for disc files.      00535000
                                                                        00540000
FM'LODA       For disc files only, the LODA of the FLAB disk address.   00545000
                                                                        00550000
FM'JITDST     The  DST  number  of the JIT for the job that has the file00555000
              open.  If  this  field is non-zero, than only processes in00560000
              the family tree of this  particular job can open the file.00565000
              This field is zero for files opened global multi-access.  00570000
                                                                        00575000
FM'GLOBAL     This  bit is 1 if the file was opened global multi-access,00580000
              this allows multi-access to the file between jobs.        00585000
                                                                        00590000
FM'PACBV      The  PACB  vector  for  this  multi-access  file.  Used to00595000
              easily  find  the  Physcial Access Control Block for files00600000
              opened multi-access.                                      00605000
                                                                        00610000
END OF COMMENT;                                                         00615000
                                                                        00620000
$IF X8 = OFF                                                            00625000
$CONTROL LIST                                                           00630000
$IF                                                                     00635000
                                                                        00640000
<<-------------------------------------------------------------------->>00645000
<<                                                                    >>00650000
<<                     FMAVT  Definitions                             >>00655000
<<                                                                    >>00660000
<<-------------------------------------------------------------------->>00665000
                                                                        00670000
EQUATE                                                                  00675000
                                                                        00680000
FMAVTDST        =  44,                                                  00685000
FMAVTSIR        =  16;                                                  00690000
                                                                        00695000
<<********************************************************************>>00700000
<< To access the FMAVT, an integer array called FMAVT is used.  This  >>00705000
<< array is set to DB+0 and all accesses to the FMAVT are done with   >>00710000
<< DB set to the FMAVT DST.  INDEX must contain the word offset to    >>00715000
<< the current entry to use the DEFINE's below.                       >>00720000
<<********************************************************************>>00725000
                                                                        00730000
INTEGER ARRAY FMAVT(*)=DB+0;                                            00735000
DOUBLE  ARRAY FMAVT'D(*) = FMAVT;                                       00740000
                                                                        00745000
DEFINE                                                                  00750000
                                                                        00755000
FM'CURR'SIZE    =  FMAVT(0)#,                                           00760000
FM'ENTRY'SIZE   =  FMAVT(1)#,                                           00765000
FM'MAX'SIZE     =  FMAVT(2)#,                                           00770000
                                                                        00775000
FM'TESTW        =  FMAVT(INDEX + 0)#,                                   00780000
FM'GLOB'DEV     =  FMTESTW.(1:2)#,                                      00785000
FM'GLOBAL       =  FM'TESTW.(1:1)#,                                     00790000
FM'DEVICE       =  FM'TESTW.(2:1)#,                                     00795000
FM'JITDST       =  FMAVT(INDEX + 1)#,                                   00800000
FM'LDEV'HODA    =  FMAVT(INDEX + 2)#,                                   00805000
FM'LODA         =  FMAVT(INDEX + 3)#,                                   00810000
FM'PACBV        =  FMAVT'D(INDEX/2 + 2)#,                               00815000
                                                                        00820000
<<********************************************************************>>00825000
<< These defines are used to find the correct FMAVT entry. The double >>00830000
<< word TEST and single integers TEST0 and TEST1 are declared inside  >>00835000
<< SCANFMAVT.  FLAG is sent as a parm to SCANFMAVT.                   >>00840000
<<********************************************************************>>00845000
                                                                        00850000
FM'TEST'VALID   =  TEST0.(0:1)#,                                        00855000
FM'TEST'GLOB'DEV=  TEST0.(1:2)#,                                        00860000
FM'TEST'GLOBAL  =  TEST0.(1:1)#,                                        00865000
FM'TEST'DEVICE  =  TEST0.(2:1)#,                                        00870000
FM'TEST'JITDST  =  TEST1#,                                              00875000
                                                                        00880000
FM'FLAG'GLOB'DEV=  FLAG.(12:2)#,                                        00885000
FM'FLAG'JOB     =  FLAG.(12:1)=0#,                                      00890000
FM'FLAG'SYSTEM  =  FLAG.(12:1)=1#,                                      00895000
FM'FLAG'MODE    =  FLAG.(14:2)#;                                        00900000
                                                                        00905000
<<********************************************************************>>00910000
<<*                                                                  *>>00915000
<<*                     End of INCFMAVT                              *>>00920000
<<*                                                                  *>>00925000
<<********************************************************************>>00930000
