         << LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION >>     00000001
$CONTROL MAP,CODE,USLINIT,DEFINE,LINES=120                              00005000
$ TITLE "  MPE-V FILE SYSTEM - RECORD OPERATIONS - DECLARATIONS "       00070000
<< Correct Unlocking problem with RFA files. >>                << 2220>>00811000
<< Extra check for LOC'ACB for invalid global file numbers.>>  << 2497>>00812000
$EDIT VOID=03402500                                            <<09843>>03402500
                                                                        04461000
DOUBLE PROCEDURE IOSTATUSX(IOQX);                                       04462000
VALUE IOQX;                                                             04463000
INTEGER IOQX;                                                           04464000
OPTION EXTERNAL, PRIVILEGED, UNCALLABLE;                                04464100
DOUBLE PROCEDURE  RFA'CALLS'ERR (AFTX,P1,P2,P3,P4,P5,P6,P7,    <<09738>>05705721
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05705735
VALUE AFTX,                                                    <<09738>>05705750
   P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;             <<09738>>05705764
INTEGER AFTX;                                                  <<09738>>05705778
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05705792
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05705807
                                                               <<09738>>05705821
DOUBLE PROCEDURE RFA'FREADLABEL (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05705835
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05705850
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05705864
INTEGER AFTX;                                                  <<09738>>05705878
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05705892
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05705907
                                                               <<09738>>05705921
DOUBLE PROCEDURE RFA'FWRITELABEL (AFTX, P1,P2,P3,P4,P5,P6,P7,  <<09738>>05705935
                                  P8,P9,P10,P11,P12,P13,P14);  <<09738>>05705950
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05705964
INTEGER AFTX;                                                  <<09738>>05705978
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05705992
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05706007
                                                               <<09738>>05706021
DOUBLE PROCEDURE  RFA'FREAD (AFTX, P1,P2,P3,P4,P5,P6,P7,       <<09738>>05706035
                             P8,P9,P10,P11,P12,P13,P14);       <<09738>>05706050
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05706064
INTEGER AFTX;                                                  <<09738>>05706078
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05706092
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05706107
                                                               <<09738>>05706121
DOUBLE PROCEDURE  RFA'FWRITE (AFTX, P1,P2,P3,P4,P5,P6,P7,      <<09738>>05706135
                              P8,P9,P10,P11,P12,P13,P14);      <<09738>>05706150
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05706164
INTEGER AFTX;                                                  <<09738>>05706178
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05706192
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05706207
                                                               <<09738>>05706221
DOUBLE PROCEDURE RFA'FFILEINFO (AFTX,ITEM1,ITEM2,ITEM3,ITEM4,  <<09738>>05706235
   ITEM5,ILEN1,ILEN2,ILEN3,ILEN4,ILEN5,FFILEINFOPMASK,         <<09738>>05706250
   ITEMVAL1, ITEMVAL2, ITEMVAL3, ITEMVAL4, ITEMVAL5, CRIT);    <<09738>>05706264
VALUE AFTX,FFILEINFOPMASK,CRIT,                                <<09738>>05706278
  ITEM1,ITEM2,ITEM3,ITEM4,ITEM5,ILEN1,ILEN2,ILEN3,ILEN4,ILEN5; <<09738>>05706292
INTEGER AFTX,ITEM1,ITEM2,ITEM3,ITEM4,ITEM5,                    <<09738>>05706307
   ILEN1,ILEN2,ILEN3,ILEN4,ILEN5;                              <<09738>>05706321
LOGICAL FFILEINFOPMASK, CRIT;                                  <<09738>>05706335
BYTE ARRAY ITEMVAL1,ITEMVAL2,ITEMVAL3,ITEMVAL4,ITEMVAL5;       <<09738>>05706350
OPTION EXTERNAL;                                               <<09738>>05706364
                                                               <<09738>>05706378
DOUBLE PROCEDURE  RFA'FCHECK (AFTX, FCHECKPMASK, ERRORCODE,    <<09738>>05706392
                              TLOG, BLOCKNUM, NUMRECS, CRIT);  <<09738>>05706407
VALUE AFTX,FCHECKPMASK,BLOCKNUM,CRIT;                          <<09738>>05706421
INTEGER AFTX,ERRORCODE,TLOG,NUMRECS;                           <<09738>>05706435
DOUBLE BLOCKNUM;                                               <<09738>>05706450
LOGICAL FCHECKPMASK,CRIT;                                      <<09738>>05706464
OPTION EXTERNAL;                                               <<09738>>05706478
                                                               <<09738>>05706492
DOUBLE PROCEDURE RFA'FGETINFO (AFTX,PMASK1,PMASK2,FOPTIONS,    <<09738>>05706507
   AOPTIONS,RECSIZE,DEVTYPE,LDEVNUM,HARDWAREADDR,FILECODE,     <<09738>>05706521
   RECPTR,EOFPTR,FILELIMIT,LOGCOUNT,PHYSCOUNT,BLOCKSIZE,EXSIZ, <<09738>>05706535
   NEXTS, USLABS, FILENAME, CREATORID, DISKADDR, CRIT);        <<09738>>05706550
VALUE AFTX,PMASK1,PMASK2,CRIT;                                 <<09738>>05706564
INTEGER AFTX,RECSIZE,DEVTYPE,FILECODE,BLOCKSIZE,NEXTS,USLABS;  <<09738>>05706578
LOGICAL PMASK1, PMASK2,FOPTIONS,AOPTIONS,LDEVNUM,              <<09738>>05706592
   HARDWAREADDR,EXSIZ,CRIT;                                    <<09738>>05706607
DOUBLE RECPTR,EOFPTR,FILELIMIT,LOGCOUNT,PHYSCOUNT,DISKADDR;    <<09738>>05706621
BYTE ARRAY FILENAME,CREATORID;                                 <<09738>>05706635
OPTION EXTERNAL;                                               <<09738>>05706650
                                                               <<09738>>05706664
DOUBLE PROCEDURE  RFA'FREADDIR  (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05706678
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05706692
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05706707
INTEGER AFTX;                                                  <<09738>>05706721
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05706735
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05706750
                                                               <<09738>>05706764
DOUBLE PROCEDURE RFA'FREADBACKWARD (AFTX,P1,P2,P3,P4,P5,P6,P7, <<09738>>05706778
                                   P8,P9,P10,P11,P12,P13,P14); <<09738>>05706792
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05706807
INTEGER AFTX;                                                  <<09738>>05706821
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05706835
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05706850
                                                               <<09738>>05706864
DOUBLE PROCEDURE  RFA'FWRITEDIR (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05706878
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05706892
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05706907
INTEGER AFTX;                                                  <<09738>>05706921
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05706935
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05706950
                                                               <<09738>>05706964
DOUBLE PROCEDURE  RFA'FUPDATE   (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05706978
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05706992
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707007
INTEGER AFTX;                                                  <<09738>>05707021
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707035
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707050
                                                               <<09738>>05707064
DOUBLE PROCEDURE  RFA'FCONTROL  (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05707078
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05707092
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707107
INTEGER AFTX;                                                  <<09738>>05707121
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707135
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707150
                                                               <<09738>>05707164
DOUBLE PROCEDURE  RFA'FDELETE   (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05707178
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05707192
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707207
INTEGER AFTX;                                                  <<09738>>05707221
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707235
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707250
                                                               <<09738>>05707264
DOUBLE PROCEDURE  RFA'FLOCK     (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05707278
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05707292
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707307
INTEGER AFTX;                                                  <<09738>>05707321
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707335
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707350
                                                               <<09738>>05707364
DOUBLE PROCEDURE  RFA'FPOINT    (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05707378
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05707392
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707407
INTEGER AFTX;                                                  <<09738>>05707421
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707435
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707450
                                                               <<09738>>05707464
DOUBLE PROCEDURE  RFA'FREADSEEK (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05707478
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05707492
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707507
INTEGER AFTX;                                                  <<09738>>05707521
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707535
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707550
                                                               <<09738>>05707564
DOUBLE PROCEDURE  RFA'FSETMODE  (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05707578
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05707592
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707607
INTEGER AFTX;                                                  <<09738>>05707621
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707635
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707650
                                                               <<09738>>05707664
DOUBLE PROCEDURE  RFA'FSPACE    (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05707678
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05707692
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707707
INTEGER AFTX;                                                  <<09738>>05707721
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707735
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707750
                                                               <<09738>>05707764
DOUBLE PROCEDURE  RFA'FUNLOCK   (AFTX, P1,P2,P3,P4,P5,P6,P7,   <<09738>>05707778
                                 P8,P9,P10,P11,P12,P13,P14);   <<09738>>05707792
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707807
INTEGER AFTX;                                                  <<09738>>05707821
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707835
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707850
                                                               <<09738>>05707864
DOUBLE PROCEDURE RFA'FDEVICECONTROL(AFTX,P1,P2,P3,P4,P5,P6,P7, <<09738>>05707878
                                   P8,P9,P10,P11,P12,P13,P14); <<09738>>05707892
VALUE AFTX, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;    <<09738>>05707907
INTEGER AFTX;                                                  <<09738>>05707921
LOGICAL P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14;        <<09738>>05707935
OPTION VARIABLE,EXTERNAL;                                      <<09738>>05707950
            IF SPCBPTYPE' = NON'CI'PIN AND                              07020000
                  NOT LOGICAL(SPCBSRVE) THEN                            07020500
   << Place everything except CI's and SERVER processes >>              07021000
   << (like advanced ds servers) on the low pri queue   >>              07021500
            IF VT'BREAK AND SPCBPTYPE' = NON'CI'PIN AND                 07160000
                 NOT LOGICAL(SPCBSRVE)                                  07160500
               THEN IMPEDE'ON'LOW'QUEUE  ! Non CI or server in break.   07165000
               ELSE IMPEDE'ON'HIGH'QUEUE;! CI or server or no break.    07170000
   COND'LOCK   =  PMAP.(14:2) = 3#;                                     08535000
$EDIT VOID=08536000                                                     08536000
   OK          =  CCE,                                         << 2497>>08560000
   MAX'GLOBAL'FNUM = -5461; <<A maximum of 5461 AFT entries >> << 2497>>08561000
                            <<can fit into a 32K DST.       >> << 2497>>08562000
IF \FILENUM\ > \MAX'GLOBAL'FNUM\   << filenum too big? >>      << 2497>>08926000
   THEN EXIT(BAD'FILENUM);                                     << 2497>>08927000
   IF (ACBM'PACBV'DSTN = 0)                                             09360000
$EDIT VOID=09361000                                                     09361000
   OR ACBM'PORTYPE                                             <<09738>>09370500
   IF READ AND BLOCK >= OLDEOFBLK AND                          <<01276>>13280000
      NOT (ACB'MSGFILE LOR FCB'CIRFILE) AND                    <<01276>>13281000
         IF SPCBPTYPE' = CI'PIN OR LOGICAL(SPCBSRVE) THEN      <<09738>>22310000
            BEGIN   << Server or CI. Ignore break request  >>           22315000
   LOGICAL SPLIT'STACK := FALSE;  << true iff split stack >>   <<H1533>>30520000
   CHECKDB;   << Where's DB? >>                                <<H1533>>30586000
   IF <> THEN SPLIT'STACK := TRUE;                             <<H1533>>30587000
                                                               <<H1533>>30588000
INTEGER REC0 = REC;                                            <<09738>>34987500
INTEGER REC1 = REC+1;                                          <<09738>>34987525
         << -------------------------------------------------- <<09738>>35502525
         << Remote File:                           FTYPE = 9   <<09738>>35502527
         << this is a for ADVNDS RFA where we call RFA'FDELETE <<09738>>35502530
         << an entry point into RFA'CALLS in filesystem code   <<09738>>35502532
         << the call will leave a double a double word on TOS  <<09738>>35502535
         << |--------------------------------|                 <<09738>>35502537
         << | error number                   | S-1             <<09738>>35502540
         << |--------------------------------|                 <<09738>>35502542
         << |                       Cond Code| S               <<09738>>35502545
         << |--------------------------------|                 <<09738>>35502547
         <<    S-0  bits 14:2 have the Condition Code word     <<09738>>35502550
         <<    S-1  ADVNDS error number IF S-0 <> CCE          <<09738>>35502552
         <<  NOTE: above format is chosen because of the way   <<09738>>35502557
         <<        filesystem code exits through ERROREXIT     <<09738>>35502560
         << -------------------------------------------------- <<09738>>35502562
         BEGIN                        << case remote file   >> <<09738>>35502750
            IF NOT ADVNDSRFA THEN                              <<09738>>35502775
            BEGIN                                              <<09738>>35502800
               TOS := INVFN;                                   <<09738>>35502825
               TOS := CCL;                                     <<09738>>35502850
               GO EXIT;                                        <<09738>>35502875
            END;                                               <<09738>>35502900
                                                               <<09738>>35502925
            TOS := RFA'FDELETE (FILENUM,                       <<09738>>35502950
                                REC0,                          <<09738>>35503000
                                REC1,                          <<09738>>35503025
                                PARMMASK,                      <<09738>>35503027
                                CRIT);                         <<09738>>35503037
         END;                         << case remote file   >> <<09738>>35503125
                                                               <<09738>>35503150
      << -------------------------------------------------- >> <<09738>>37017525
      << Remote File:                             FTYPE = 9 >> <<09738>>37017550
      << RFA for FREAD through ADVNDS applications services >> <<09738>>37017552
      << call RFA'FREAD which is an Entry point into        >> <<09738>>37017555
      << RFA'CALLS, it will return a double word on TOS     >> <<09738>>37017557
      << |--------------------------------|                 >> <<09738>>37017560
      << | tcount or error number         | S-1             >> <<09738>>37017562
      << |--------------------------------|                 >> <<09738>>37017565
      << |                       Cond Code| S-0             >> <<09738>>37017567
      << |--------------------------------|                 >> <<09738>>37017570
      <<    S-0  bits 14:2 have the Condition Code          >> <<09738>>37017572
      <<    S-1  ADVNDS error number IF S-0 <> CCE          >> <<09738>>37017575
      << -------------------------------------------------- >> <<09738>>37017577
      BEGIN                            << case remote file  >> <<09738>>37017580
         IF NOT ADVNDSRFA THEN                                 <<09738>>37017582
         BEGIN                                                 <<09738>>37017585
            TOS := INVFN;                                      <<09738>>37017587
            TOS := CCL;                                        <<09738>>37017590
            GO EXIT;                                           <<09738>>37017592
         END;                                                  <<09738>>37017595
         IF FBNDVIOL (@TARGET, TCOUNT, UBND) THEN              <<09738>>37017597
         BEGIN               << if bounds violation >>         <<09738>>37017600
            << post local error in rfa's lfcb entry >>         <<09738>>37017602
            RFA'CALLS'ERR (FILENUM, BNDVIOL);                  <<09738>>37017605
            TOS := BNDVIOL;                                    <<09738>>37017607
            TOS := CCL;                                        <<09738>>37017610
         END                 << if bounds violation >>         <<09738>>37017612
         ELSE IF READBK THEN                                   <<09738>>37017615
         BEGIN               << else if rfa readback>>         <<09738>>37017617
            TOS := RFA'FREADBACKWARD (FILENUM,                 <<09738>>37017620
                                      @TARGET,                 <<09738>>37017625
                                      TCOUNT,                  <<09738>>37017627
                                      CRIT);                   <<09738>>37017628
            FREAD := S1;   << tcount >>                        <<09738>>37017632
         END                 << else if rfa readback>>         <<09738>>37017635
         ELSE BEGIN          << else rfa read >>               <<09738>>37017637
            TOS := RFA'FREAD (FILENUM,                         <<09738>>37017640
                              @TARGET,                         <<09738>>37017645
                              TCOUNT,                          <<09738>>37017647
                              CRIT);                           <<09738>>37017648
            FREAD := S1;   << tcount >>                        <<09738>>37017652
         END;                << else rfa read >>               <<09738>>37017655
                                                               <<09738>>37017657
         GO EXIT;                                              <<09738>>37017660
      END;                             << case remote file  >> <<09738>>37017662
               (ACB'DTYPE=TERMINAL LOR ACB'DTYPE=LPTR          <<*9314>>37365000
                LOR ACB'SPOOLED)) THEN                         <<*9314>>37366000
      << -------------------------------------------------- >> <<09738>>38467525
      << Remote File:                             FTYPE = 9 >> <<09738>>38467527
      << RFA for FWRITE through ADVNDS applications service >> <<09738>>38467530
      << call RFA'FWRITE which is an entry point into       >> <<09738>>38467532
      << RFA'CALLS, it will return a double word on TOS     >> <<09738>>38467535
      << |--------------------------------|                 >> <<09738>>38467537
      << | error number                   | S-1             >> <<09738>>38467540
      << |--------------------------------|                 >> <<09738>>38467542
      << |                       Cond Code| S-0             >> <<09738>>38467545
      << |--------------------------------|                 >> <<09738>>38467547
      <<    S-0  bits 14:2 have the Condition Code          >> <<09738>>38467550
      <<    S-1  ADVNDS error number IF S-0 <> CCE          >> <<09738>>38467552
      << -------------------------------------------------- >> <<09738>>38467555
      BEGIN                            << case remote file  >> <<09738>>38467750
         IF NOT ADVNDSRFA THEN                                 <<09738>>38467775
         BEGIN                                                 <<09738>>38467800
            TOS := INVFN;                                      <<09738>>38467825
            TOS := CCL;                                        <<09738>>38467850
            GO EXIT;                                           <<09738>>38467875
         END;                                                  <<09738>>38467900
         IF FBNDVIOL (@TARGET, TCOUNT, UBND) THEN              <<09738>>38467925
         BEGIN               << if bounds violation >>         <<09738>>38467950
            << post local err in rfa's lfcb >>                 <<09738>>38467975
            RFA'CALLS'ERR (FILENUM, BNDVIOL);                  <<09738>>38468000
            TOS := BNDVIOL;                                    <<09738>>38468025
            TOS := CCL;                                        <<09738>>38468050
         END                 << if bounds violation >>         <<09738>>38468075
         ELSE BEGIN          << else do rfa write   >>         <<09738>>38468100
            TOS := RFA'FWRITE (FILENUM,                        <<09738>>38468125
                               @TARGET,                        <<09738>>38468175
                               TCOUNT,                         <<09738>>38468200
                               CONTROL,                        <<09738>>38468202
                               CRIT);                          <<09738>>38468212
         END;                << else do rfa write   >>         <<09738>>38468250
                                                               <<09738>>38468275
         GO EXIT;                                              <<09738>>38468300
      END;                             << case remote file  >> <<09738>>38468325
      << -------------------------------------------------- >> <<09738>>39812525
      << Remote File:                             FTYPE = 9 >> <<09738>>39812527
      << RFA through ADVNDS applications services will call >> <<09738>>39812530
      << RFA'FWRITEDIR and RFA'FREADDIR which are entry     >> <<09738>>39812532
      << points into RFA'CALLS                              >> <<09738>>39812535
      << a double word will be returned on TOS              >> <<09738>>39812537
      << |--------------------------------|                 >> <<09738>>39812540
      << | error number                   | S-1             >> <<09738>>39812542
      << |--------------------------------|                 >> <<09738>>39812545
      << |                       Cond Code| S-0             >> <<09738>>39812547
      << |--------------------------------|                 >> <<09738>>39812550
      <<    S-0  bits 14:2 have the Condition Code          >> <<09738>>39812552
      <<    S-1  ADVNDS error number IF S-0 <> CCE          >> <<09738>>39812555
      << -------------------------------------------------- >> <<09738>>39812557
      BEGIN                            << case remote file  >> <<09738>>39812750
         IF NOT ADVNDSRFA THEN                                 <<09738>>39812775
         BEGIN                                                 <<09738>>39812800
            TOS := INVFN;                                      <<09738>>39812825
            TOS := CCL;                                        <<09738>>39812850
            GO EXIT;                                           <<09738>>39812875
         END;                                                  <<09738>>39812900
         IF FBNDVIOL (@TARGET, TCOUNT, UBND) THEN              <<09738>>39812925
         BEGIN               << if bounds violation >>         <<09738>>39812950
            << post local error in rfa's lfcb >>               <<09738>>39812975
            RFA'CALLS'ERR (FILENUM, BNDVIOL);                  <<09738>>39813000
            TOS := BNDVIOL;                                    <<09738>>39813025
            TOS := CCL;                                        <<09738>>39813050
         END                 << if bounds violation >>         <<09738>>39813075
         ELSE IF WRITE THEN                                    <<09738>>39813100
         BEGIN               << else if writedir    >>         <<09738>>39813125
            TOS := RFA'FWRITEDIR (FILENUM,                     <<09738>>39813150
                                  @TARGET,                     <<09738>>39813200
                                  TCOUNT,                      <<09738>>39813225
                                  REC0,                        <<09738>>39813250
                                  REC1,                        <<09738>>39813275
                                  CRIT);                       <<09738>>39813285
         END                 << else if writedir    >>         <<09738>>39813350
         ELSE BEGIN          << else readdir        >>         <<09738>>39813375
            TOS := RFA'FREADDIR (FILENUM,                      <<09738>>39813400
                                 @TARGET,                      <<09738>>39813450
                                 TCOUNT,                       <<09738>>39813475
                                 REC0,                         <<09738>>39813500
                                 REC1,                         <<09738>>39813525
                                 CRIT);                        <<09738>>39813535
         END;                << else readdir        >>         <<09738>>39813575
         GO EXIT;                                              <<09738>>39813600
      END;                             << case remote file  >> <<09738>>39813625
      << -------------------------------------------------- >> <<09738>>40712525
      << Remote File:                             FTYPE = 9 >> <<09738>>40712527
      << RFA for FUPDATE through ADVNDS applications service>> <<09738>>40712530
      << call RFA'FUPDATE which is an entry point into      >> <<09738>>40712532
      << RFA'CALLS, it will return a double word on TOS     >> <<09738>>40712535
      << |--------------------------------|                 >> <<09738>>40712537
      << | error number                   | S-1             >> <<09738>>40712540
      << |--------------------------------|                 >> <<09738>>40712542
      << |                       Cond Code| S-0             >> <<09738>>40712545
      << |--------------------------------|                 >> <<09738>>40712547
      << -------------------------------------------------- >> <<09738>>40712555
      BEGIN                            << case remote file  >> <<09738>>40712750
         IF NOT ADVNDSRFA THEN                                 <<09738>>40712775
         BEGIN                                                 <<09738>>40712800
            TOS := INVFN;                                      <<09738>>40712825
            TOS := CCL;                                        <<09738>>40712850
            GO EXIT;                                           <<09738>>40712875
         END;                                                  <<09738>>40712900
         IF FBNDVIOL (@TARGET, TCOUNT, UBND) THEN              <<09738>>40712925
         BEGIN               << if bounds violation >>         <<09738>>40712950
            << post local err in rfa's lfcb >>                 <<09738>>40712975
            RFA'CALLS'ERR (FILENUM, BNDVIOL);                  <<09738>>40713000
            TOS := BNDVIOL;                                    <<09738>>40713025
            TOS := CCL;                                        <<09738>>40713050
         END                 << if bounds violation >>         <<09738>>40713075
         ELSE BEGIN          << else do rfa write   >>         <<09738>>40713100
            TOS := RFA'FUPDATE (FILENUM,                       <<09738>>40713125
                               @TARGET,                        <<09738>>40713175
                               TCOUNT,                         <<09738>>40713200
                               CRIT);                          <<09738>>40713210
         END;                << else do rfa write   >>         <<09738>>40713250
                                                               <<09738>>40713275
         GO EXIT;                                              <<09738>>40713300
      END;                             << case remote file  >> <<09738>>40713325
          PORTENTRY     = ( ENTRYTYPE = 9)#,                   <<09738>>40960000
          ADVNTYPE      = ( PORTENTRY LAND                     <<09738>>40960500
                             (AFTSUBSYS = ADV'S'TYPE))#;       <<09738>>40961000
   LOGICAL MSGFILEREAD;                                        <<02233>>41003000
      IOCOMP'NOBUFSPEC= 2,                                     <<02235>>41047000
$PAGE                                                                   41365000
$PAGE                                                                   41716000
$PAGE                                                                   42245100
LOGICAL SUBROUTINE CHECK'DONTWAIT(IOQX);                                42245200
VALUE IOQX;                                                             42245300
INTEGER IOQX;                                                           42245400
                                                                        42245500
<< Checks the specified IOQX for completion.  If complete >>            42245600
<< a true is returned and IOCB and STATION is filled in   >>            42245700
<< otherwise if not complete, a false is returned         >>            42245800
<< RETURNS: True iff I/O has completed                    >>            42245900
<< PARAMETERS: ioqx (input) - Ioq pointer                 >>            42246000
<< GLOABLS: IOCB (output), STATION (output)               >>            42246100
                                                                        42246200
BEGIN                                                                   42246300
IF MSGENTRY OR PORTENTRY THEN                                           42246400
   BEGIN  << we must treat these specially by calling      >>           42246500
          << setwake' and clearwake' checking for completin>>           42246600
   SETWAKE'(IOQX);                                                      42246700
   IF = THEN << the I/O did not complete >>                             42246800
      BEGIN                                                             42246900
      CHECK'DONTWAIT := FALSE;                                          42247000
      CLEARWAKE'(IOQX);  << clear the wake call >>                      42247100
      END                                                               42247200
   ELSE                                                                 42247300
      BEGIN << the I/O did complete >>                                  42247400
      IOCB := WAITFORIOX'(IOQX);                                        42247500
      STATION := X;                                                     42247600
      CHECK'DONTWAIT := TRUE;                                           42247700
      END;                                                              42247800
   END                                                                  42247900
ELSE  << a normal file system aft and IOQ >>                            42248000
   BEGIN                                                                42248100
   IOCB := IOSTATUSX(IOQX);                                             42248200
   IF = THEN                                                            42248300
      << I/O COMPLETE >>                                                42248400
      CHECK'DONTWAIT := TRUE                                            42248500
   ELSE                                                                 42248600
      CHECK'DONTWAIT := FALSE;                                          42248700
   STATION := X;                                                        42248800
   END;                                                                 42248900
END;  <<  CHECK'DONTWAIT >>                                             42249000
      IF LOGICAL(AFTPRIV) AND ADVNTYPE AND (NOT PRIVMODE) THEN <<09738>>42580625
         IOEXIT(INVFN);                                        <<09738>>42580937
      END;            << specific file >>                      <<02117>>42600000
   DEL;  <<DELETE THE PMAP>>                          <<HM.00>><<02117>>42605000
                                                               <<02117>>42610000
   UNKNOWNENTRY := FALSE;                             <<07399>><<02233>>42615000
                                                               <<02233>>42620000
                                                               <<02233>>42625000
   IF MSGENTRY AND NOBUFSPEC AND NOT PRIVMODE THEN             <<02235>>42630000
      BEGIN                                                    <<02233>>42635000
      EXCHANGEDB(DSTX);                                        <<02233>>42640000
      LOC'ACB(DSTX,ACBMQ,FILENUM,UMODE);                       <<02233>>42645000
      MSGFILEREAD := ACB'READ;                                 <<02233>>42650000
      UNLOC'ACB(ACBMQ,0);                                      <<02233>>42655000
      EXCHANGEDB(0);                                           <<02233>>42660000
      DEL;  <<delete the DSTX that LOC'ACB left on stack.>>    <<02233>>42665000
      IF MSGFILEREAD THEN                                      <<02233>>42670000
         IOEXIT(OMITTEDPARM);                                  <<02233>>42675000
      END;                                                     <<02233>>42680000
                                                               <<02117>>42685000
                                                               <<02117>>42690000
                                                               <<02117>>42695000
                                                               <<02117>>42700000
                                                               <<02233>>42760000
      IF DONTWAIT THEN                                                  42771000
         BEGIN                                                          42772000
         IF NOT CHECK'DONTWAIT(IOQX) THEN  << check to see >>           42773000
            GO AOK;  << ioq has completed                  >>           42774000
         END                                                            42775000
      ELSE  << wait for the I/O to complete >>                          42776000
         BEGIN                                                          42777000
         IOCB := WAITFORIOX'(IOQX);                                     42778000
         STATION := X;                                                  42779000
         END;                                                           42780000
         BEGIN                                        <<HM.00>><<02235>>42975000
         IF NOBUFSPEC THEN                            <<HM.00>><<02235>>42980000
            FCREAD(IOCOMP'NOBUFSPEC,TARGET,0)         <<HM.00>><<02235>>42985000
$EDIT VOID=43005000                                                     42990000
         ELSE                                         <<HM.00>><<02235>>43010000
            FCREAD(IOCOMPLETION,TARGET,0);            <<HM.00>><<02235>>43015000
         END                                          <<HM.00>><<02235>>43020000
   << ----------------------------------------------------- >> <<09738>>44082525
   << Remote File:                                 FTYPE= 9 >> <<09738>>44082532
   << this is a for ADVNDS RFA where we call RFA'FREADSEEK  >> <<09738>>44082540
   << an entry point into RFA'CALLS in filesystem code      >> <<09738>>44082547
   << the call will leave a double a double word on TOS     >> <<09738>>44082555
   << |--------------------------------|                    >> <<09738>>44082562
   << | error number                   | S-1                >> <<09738>>44082570
   << |--------------------------------|                    >> <<09738>>44082577
   << |                       Cond Code| S                  >> <<09738>>44082585
   << |--------------------------------|                    >> <<09738>>44082592
   <<    S-0  bits 14:2 have the Condition Code             >> <<09738>>44082600
   <<    S-1  ADVNDS error number IF S-0 <> CCE             >> <<09738>>44082607
   <<  NOTE: above format is chosen because of the way      >> <<09738>>44082622
   <<        filesystem code exits through ERROREXIT        >> <<09738>>44082630
   << ----------------------------------------------------- >> <<09738>>44082637
   BEGIN                              << case remote file   >> <<09738>>44082750
      IF NOT ADVNDSRFA THEN                                    <<09738>>44082775
      BEGIN                                                    <<09738>>44082800
         TOS := INVFN;                                         <<09738>>44082825
         TOS := CCL;                                           <<09738>>44082850
         GO EXIT;                                              <<09738>>44082875
      END;                                                     <<09738>>44082900
                                                               <<09738>>44082925
      TOS := RFA'FREADSEEK (FILENUM,                           <<09738>>44082950
                            REC0,                              <<09738>>44082952
                            REC1,                              <<09738>>44082975
                            CRIT);                             <<09738>>44082976
                                                               <<09738>>44083000
   END;                               << case remote file   >> <<09738>>44083075
                                                               <<09738>>44083100
   << ----------------------------------------------------- >> <<09738>>45592525
   << Remote File:                                 FTYPE= 9 >> <<09738>>45592532
   << this is a for ADVNDS RFA where we call RFA'FSPACE     >> <<09738>>45592540
   << an entry point into RFA'CALLS in filesystem code      >> <<09738>>45592547
   << the call will leave a double a double word on TOS     >> <<09738>>45592555
   << |--------------------------------|                    >> <<09738>>45592562
   << | error number                   | S-1                >> <<09738>>45592570
   << |--------------------------------|                    >> <<09738>>45592577
   << |                       Cond Code| S                  >> <<09738>>45592585
   << |--------------------------------|                    >> <<09738>>45592592
   <<    S-0  bits 14:2 have the Condition Code             >> <<09738>>45592600
   <<    S-1  ADVNDS error number IF S-0 <> CCE             >> <<09738>>45592607
   <<  NOTE: above format is chosen because of the way      >> <<09738>>45592622
   <<        filesystem code exits through ERROREXIT        >> <<09738>>45592630
   << ----------------------------------------------------- >> <<09738>>45592637
   BEGIN                              << case remote file   >> <<09738>>45592750
      IF NOT ADVNDSRFA THEN                                    <<09738>>45592775
      BEGIN                                                    <<09738>>45592800
         TOS := INVFN;                                         <<09738>>45592825
         TOS := CCL;                                           <<09738>>45592850
         GO EXIT;                                              <<09738>>45592875
      END;                                                     <<09738>>45592900
                                                               <<09738>>45592925
      TOS := RFA'FSPACE (FILENUM,                              <<09738>>45592950
                         DSPL,                                 <<09738>>45592975
                         CRIT);                                <<09738>>45592985
      ASSEMBLE (XCH);                                          <<09738>>45593025
   END;                               << case remote file   >> <<09738>>45593125
                                                               <<09738>>45593150
INTEGER REC0 = RECNUM;                                         <<09738>>45692500
INTEGER REC1 = RECNUM+1;                                       <<09738>>45692525
   << ----------------------------------------------------- >> <<09738>>46382525
   << Remote File:                                 FTYPE= 9 >> <<09738>>46382532
   << this is a for ADVNDS RFA where we call RFA'FPOINT     >> <<09738>>46382540
   << an entry point into RFA'CALLS in filesystem code      >> <<09738>>46382547
   << the call will leave a double a double word on TOS     >> <<09738>>46382555
   << |--------------------------------|                    >> <<09738>>46382562
   << | error number                   | S-1                >> <<09738>>46382570
   << |--------------------------------|                    >> <<09738>>46382577
   << |                       Cond Code| S                  >> <<09738>>46382585
   << |--------------------------------|                    >> <<09738>>46382592
   <<    S-0  bits 14:2 have the Condition Code             >> <<09738>>46382600
   <<    S-1  ADVNDS error number IF S-0 <> CCE             >> <<09738>>46382607
   <<  NOTE: above format is chosen because of the way      >> <<09738>>46382622
   <<        filesystem code exits through ERROREXIT        >> <<09738>>46382630
   << ----------------------------------------------------- >> <<09738>>46382637
   BEGIN                              << case remote file   >> <<09738>>46382750
      IF NOT ADVNDSRFA THEN                                    <<09738>>46382775
      BEGIN                                                    <<09738>>46382800
         TOS := INVFN;                                         <<09738>>46382825
         TOS := CCL;                                           <<09738>>46382850
         GO EXIT;                                              <<09738>>46382875
      END;                                                     <<09738>>46382900
                                                               <<09738>>46382925
      TOS := RFA'FPOINT (FILENUM,                              <<09738>>46382950
                         REC0,                                 <<09738>>46383000
                         REC1,                                 <<09738>>46383025
                         CRIT);                                <<09738>>46383125
   END;                               << case remote file   >> <<09738>>46383150
                                                               <<09738>>46383175
           49 - Enable/Disable CI read/write, reserved for HPE          46701000
   << ----------------------------------------------------- >> <<09738>>50657525
   << Remote File:                                 FTYPE= 9 >> <<09738>>50657527
   << This is for ADVNDS RFA using RFA'FCONTROL which is    >> <<09738>>50657530
   << an entry point into RFA'CALLS in filesystem code      >> <<09738>>50657532
   << the call will leave a double a double word on TOS     >> <<09738>>50657535
   << |--------------------------------|                    >> <<09738>>50657540
   << | PARAM or error code            | S-1                >> <<09738>>50657542
   << |--------------------------------|                    >> <<09738>>50657545
   << |                       Cond Code| S                  >> <<09738>>50657547
   << |--------------------------------|                    >> <<09738>>50657550
   <<    S-0  bits 14:2 have the Condition Code             >> <<09738>>50657552
   <<    S-1  ADVNDS error number IF S-0 <> CCE else PARAM  >> <<09738>>50657555
   <<  NOTE: above format is chosen because of the way      >> <<09738>>50657560
   <<        filesystem code exits through ERROREXIT        >> <<09738>>50657562
   << ----------------------------------------------------- >> <<09738>>50657565
   BEGIN                              << case remote file   >> <<09738>>50657750
      IF NOT ADVNDSRFA THEN                                    <<09738>>50657775
      BEGIN                                                    <<09738>>50657800
         TOS := INVFN;                                         <<09738>>50657825
         TOS := CCL;                                           <<09738>>50657850
         GO GETOUT;                                            <<09738>>50657875
      END;                                                     <<09738>>50657900
      TOS := RFA'FCONTROL (FILENUM,                            <<09738>>50657925
                           CODE,                               <<09738>>50657975
                           PARAM,                              <<09738>>50657980
                           CRIT);                              <<09738>>50657990
      CONDCODE := TOS;                                         <<09738>>50658000
      PARAM := TOS;                                            <<09738>>50658025
      IF CONDCODE <> CCE THEN                                  <<09738>>50658052
         CTLA := PARAM                                         <<09738>>50658055
      ELSE                                                     <<09738>>50658057
         CTLA := 0;                                            <<09738>>50658060
      GO GETOUT;                                               <<09738>>50658062
   END;                               << case remote file   >> <<09738>>50658075
   IF (FTYPE>REMOTE'FILE) AND NOT ADVNDSRFA THEN               <<09738>>52070000
         ASSEMBLE(DDUP);  << target for data coming back>>     <<01489>>54325000
      << dummy for 2 >>;                                       <<09738>>54410250
      << dummy for 3 >>;                                       <<09738>>54410500
      << dummy for 4 >>;                                       <<09738>>54410750
      << dummy for 5 >>;                                       <<09738>>54411000
      << dummy for 6 >>;                                       <<09738>>54411250
      << dummy for 7 >>;                                       <<09738>>54411500
      << dummy for 8 >>;                                       <<09738>>54411750
   << ----------------------------------------------------- >> <<09738>>54412525
   << Remote File:                                 FTYPE= 9 >> <<09738>>54412532
   << This is a for ADVNDS RFA where we call RFA'DEVICECONT->> <<09738>>54412540
   << ROL, an entry point into RFA'CALLS in filesystem code.>> <<09738>>54412547
   << The call will leave a double a double word on TOS     >> <<09738>>54412555
   << |--------------------------------|                    >> <<09738>>54412562
   << | ERRNUM                         | S-1                >> <<09738>>54412570
   << |--------------------------------|                    >> <<09738>>54412577
   << |                       Cond Code| S                  >> <<09738>>54412585
   << |--------------------------------|                    >> <<09738>>54412592
   <<    S-0  bits 14:2 have the Condition Code             >> <<09738>>54412600
   <<    S-1  ADVNDS error number IF S-0 <> CCE             >> <<09738>>54412607
   <<  NOTE: above format is chosen because of the way      >> <<09738>>54412622
   <<        filesystem code exits through ERROREXIT        >> <<09738>>54412630
   << ----------------------------------------------------- >> <<09738>>54412637
   BEGIN                              << case remote file   >> <<09738>>54412750
      IF NOT ADVNDSRFA THEN                                    <<09738>>54412775
      BEGIN                                                    <<09738>>54412800
         TOS := INVFN;                                         <<09738>>54412825
         TOS := CCL;                                           <<09738>>54412850
         GO EXIT;                                              <<09738>>54412875
      END;                                                     <<09738>>54412900
                                                               <<09738>>54412925
      IF (LOCAL'FAILURE := GET'ERROR) <> 0 THEN                <<09738>>54412950
      BEGIN                                                    <<09738>>54412975
         << post local error in rfa's lfcb entry >>            <<09738>>54413000
         RFA'CALLS'ERR (FILENO, LOCAL'FAILURE);                <<09738>>54413025
         TOS := LOCAL'FAILURE;                                 <<09738>>54413050
         TOS := CCL;                                           <<09738>>54413075
         GO EXIT;                                              <<09738>>54413100
      END;                                                     <<09738>>54413125
                                                               <<09738>>54413150
      TOS := RFA'FDEVICECONTROL (FILENO,                       <<09738>>54413175
                                @TARGET,                       <<09738>>54413200
                                TCOUNT,                        <<09738>>54413225
                                CTRL,                          <<09738>>54413250
                                P1,                            <<09738>>54413275
                                P2,                            <<09738>>54413300
                                CRIT);                                  54413310
                                                               <<09738>>54413325
      ERRNUM := S1; << from remote fdevicecontrol >>           <<09738>>54413350
   END;                               << case remote file   >> <<09738>>54413425
                                                               <<09738>>54413450
   << ----------------------------------------------------- >> <<09738>>55182525
   << Remote File:                                 FTYPE= 9 >> <<09738>>55182532
   << this is a for ADVNDS RFA where we call RFA'FSETMODE   >> <<09738>>55182540
   << an entry point into RFA'CALLS in filesystem code      >> <<09738>>55182547
   << the call will leave a double a double word on TOS     >> <<09738>>55182555
   << |--------------------------------|                    >> <<09738>>55182562
   << | error number                   | S-1                >> <<09738>>55182570
   << |--------------------------------|                    >> <<09738>>55182577
   << |                       Cond Code| S                  >> <<09738>>55182585
   << |--------------------------------|                    >> <<09738>>55182592
   <<    S-0  bits 14:2 have the Condition Code             >> <<09738>>55182600
   <<    S-1  ADVNDS error number IF S-0 <> CCE             >> <<09738>>55182607
   <<                    remote system                      >> <<09738>>55182615
   <<  NOTE: above format is chosen because of the way      >> <<09738>>55182622
   <<        filesystem code exits through ERROREXIT        >> <<09738>>55182630
   << ----------------------------------------------------- >> <<09738>>55182637
   BEGIN                              << case remote file   >> <<09738>>55182750
      IF NOT ADVNDSRFA THEN                                    <<09738>>55182775
      BEGIN                                                    <<09738>>55182800
         TOS := INVFN;                                         <<09738>>55182825
         TOS := CCL;                                           <<09738>>55182850
         GO EXIT;                                              <<09738>>55182875
      END;                                                     <<09738>>55182900
                                                               <<09738>>55182925
      TOS := RFA'FSETMODE (FN, FLAGS, CRIT);                   <<09738>>55182950
                                                               <<09738>>55183025
   END;                               << case remote file   >> <<09738>>55183100
                                                               <<09738>>55183125
      IF KSTYPE OR ADVNDSRFA THEN                              <<09738>>55470000
$EDIT VOID=55944500                                                     55941000
$EDIT VOID=56063000                                                     56062000
$EDIT VOID=56119000                                                     56117000
      << -------------------------------------------------- >> <<09738>>56527525
      << Remote File:                             FTYPE = 9 >> <<09738>>56527532
      << RFA for FCHECK through ADVNDS applications services>> <<09738>>56527540
      << call RFA'FCHECK which is an Entry point into       >> <<09738>>56527547
      << RFA'CALLS, it will return a double word on TOS     >> <<09738>>56527555
      << |--------------------------------|                 >> <<09738>>56527562
      << | ADVNDS    error                | S-1             >> <<09738>>56527570
      << |--------------------------------|                 >> <<09738>>56527577
      << |                       Cond Code| S-0             >> <<09738>>56527585
      << |--------------------------------|                 >> <<09738>>56527592
      <<    S-0  bits 14:2 have the Condition Code          >> <<09738>>56527600
      <<    S-1  ADVNDS error number IF S-0 <> CCE          >> <<09738>>56527607
      << -------------------------------------------------- >> <<09738>>56527615
      BEGIN                            << case remote file  >> <<09738>>56527750
                                                               <<09738>>56527775
         IF NOT ADVNDSRFA THEN                                 <<09738>>56527800
         BEGIN                                                 <<09738>>56527825
            ERR := INVFN;                                      <<09738>>56527850
            GO CCLEX;                                          <<09738>>56527875
         END;                                                  <<09738>>56527900
         DSTX := EXCHANGEDB (0);                               <<09738>>56527925
         TOS := RFA'FCHECK (FILENUM,                           <<09738>>56527950
                            PMAP,                              <<09738>>56527975
                            EC,                                <<09738>>56528000
                            TL,                                <<09738>>56528025
                            BN,                                <<09738>>56528050
                            NR,                                <<09738>>56528075
                            CRIT);                             <<09738>>56528085
         IF DSTX <> 0 THEN                                     <<09738>>56528100
            EXCHANGEDB (DSTX);                                 <<09738>>56528125
                                                               <<09738>>56528150
         << we still have double word put on TOS by ADVNDS >>  <<09738>>56528175
         ASSEMBLE (DELB);    << we don't care for this one >>  <<09738>>56528200
         IF TOS = CCL THEN                                     <<09738>>56528225
         BEGIN                                                 <<09738>>56528250
            ERR := EC;                                         <<09738>>56528275
            GO CCLEX;                                          <<09738>>56528300
         END;                                                  <<09738>>56528325
                                                               <<09738>>56528350
      END;                             << case remote file  >> <<09738>>56528375
                                                               <<09738>>56528400
                                                               <<G1155>>57432000
<< * * * Main Procdure Body * * * >>                           <<G1155>>57433000
   << -------------------------------------------------- >>    <<09738>>58572525
   << Remote File:                             FTYPE = 9 >>    <<09738>>58572527
   << RFA for FGETINFO through ADVNDS applications ser-  >>    <<09738>>58572530
   << vices call RFA'FGETINFO which is Entry point into  >>    <<09738>>58572532
   << RFA'CALLS, it will return a double word on TOS     >>    <<09738>>58572535
   << |--------------------------------|                 >>    <<09738>>58572537
   << | ADVNDS Error num               | S-1             >>    <<09738>>58572540
   << |--------------------------------|                 >>    <<09738>>58572542
   << |                       Cond Code| S-0             >>    <<09738>>58572545
   << |--------------------------------|                 >>    <<09738>>58572547
   <<    S-0  bits 14:2 have the Condition Code          >>    <<09738>>58572550
   <<    S-1  ADVNDS error number IF S-0 <> CCE          >>    <<09738>>58572552
   << -------------------------------------------------- >>    <<09738>>58572555
   BEGIN                     << case ADVNDS remote file  >>    <<09738>>58572750
      IF NOT ADVNDSRFA THEN                                    <<09738>>58572775
      BEGIN                                                    <<09738>>58572777
         TOS := INVFN;                                         <<09738>>58572780
         GO ERR;                                               <<09738>>58572782
      END;                                                     <<09738>>58572785
      TOS := RFA'FGETINFO (FILENUM,                            <<09738>>58572800
                           PMAP1,                              <<09738>>58572825
                           PMAP2,                              <<09738>>58572827
                           FOPT,                               <<09738>>58572850
                           AOPT,                               <<09738>>58572875
                           RECSI,                              <<09738>>58572900
                           DEVT,                               <<09738>>58572925
                           LDN,                                <<09738>>58572950
                           HDADDR,                             <<09738>>58572975
                           FC,                                 <<09738>>58573000
                           RPTR,                               <<09738>>58573025
                           ENDF,                               <<09738>>58573050
                           FL,                                 <<09738>>58573075
                           LCT,                                <<09738>>58573100
                           PCT,                                <<09738>>58573125
                           BLKSI,                              <<09738>>58573150
                           EXTSI,                              <<09738>>58573175
                           NE,                                 <<09738>>58573200
                           UL,                                 <<09738>>58573225
                           FILENAME,                           <<09738>>58573250
                           CREATORID,                          <<09738>>58573275
                           DISKADR,                            <<09738>>58573300
                           CRIT);                              <<09738>>58573310
                                                               <<09738>>58573325
      IF < THEN     << bounds violation >>                     <<09738>>58573350
         GO BERR;                                              <<09738>>58573375
                                                               <<09738>>58573400
      IF TOS <> CCE AND S1 <> 0 THEN                           <<09738>>58573425
      BEGIN       << ADVNDS transmission error >>              <<09738>>58573450
         ASSEMBLE (DEL); << remote status is meaningless >>    <<09738>>58573475
         GO ERR;                                               <<09738>>58573500
      END;        << ADVNDS transmission error >>              <<09738>>58573525
                                                               <<09738>>58573550
      << if filename, creatorid, diskadr, and/or hardwareaddr>><<09738>>58573575
      << was specified, RFA'FGETINFO has already put them    >><<09738>>58573600
      << into user's stack so zap out its pmap bits          >><<09738>>58573625
      PMAP1.(13:1) := 0;  << filename >>                       <<09738>>58573650
      PMAP2.(14:1) := 0;  << creatorid >>                      <<09738>>58573675
      PMAP2.( 3:1) := 0;  << hardware addr >>                  <<09738>>58573700
      PMAP2.(15:1) := 0;  << disk addr >>                      <<09738>>58573725
                                                               <<09738>>58573750
   END;                         << case ADVNDS remote file  >> <<09738>>58573775
      ELSE                                                     <<09738>>59050000
         IF RFTYPE OR ADVNDSRFA THEN                           <<09738>>59050250
            TOS := FC;                                         <<09738>>59050500
FVERSION := 4;      << This is U-MIT >>                        <<01421>>59900000
   EQUATE                                                      <<01421>>60805000
      MPEV5'FVERSION = 1,  << MPEV/E File system version >>    <<01421>>60810000
      UMIT'FVERSION  = 4;  << UMIT FS version, includes 62 >>  <<01421>>60811000
      MAXITEMNUM = 62,                                         <<09740>>61025000
      <<062>> 8,       [8/FLABTABLE,  8/08], << file lockword>><<09740>>61596000
      <<063>>          << Unique File ID, reserved for HPE >>  <<01421>>61596100
      <<064>>          << Virtual adddress, reserved for HPE >><<01421>>61596200
      <<065>>          << Max Priv level, reserved for HPE >>  <<01421>>61596300
      <<066>>          << Global Unique File Descriptor, HPE >><<01421>>61596400
      <<9>> BEGIN   << ADVNDS remote file >>                   <<09738>>62502500
                << check for subsys and subtype >>             <<09738>>62502525
               IF NOT ADVNDSRFA THEN                           <<09738>>62502550
               BEGIN                                           <<09738>>62502575
                  TOS := INVFN;                                <<09738>>62502600
                  TOS := CCL;                                  <<09738>>62502625
                  GO EXIT;                                     <<09738>>62502650
               END;                                            <<09738>>62502675
            END;                                               <<09738>>62502700
   IF SPOOLED THEN                                             <<09739>>62580000
      BEGIN                                                    <<09739>>62581000
      << LDEVTOTYPE and LDEVTOSUBTYPE don't work for spool- >> <<09739>>62581100
      << files.  Won't worry about subtype for spoolfiles   >> <<09739>>62581200
      << being wrong here, since no one accesses it.        >> <<09739>>62581300
      @XDDEP := ACB'SPXDDX;                                    <<09739>>62581400
      LDT'DEVTYPE := ACB'SPTYPE;                               <<09739>>62581500
      END                                                      <<09739>>62581600
   ELSE                                                        <<09739>>62581700
      LDT'DEVTYPE := LDEVTOTYPE(LDEV);                         <<09739>>62585000
<< unpacked below.  Trap out other unsupported FFILEINFO     >><<01421>>63700000
<< codes for remote files by checking FVERSION.              >><<01421>>63701000
         IF INFODESC(I)=62 AND REMOTE'VERSION < UMIT'FVERSION  <<01421>>63711000
            THEN GO NOTSUP;                                    <<01421>>63712000
NOTSUP:        BEGIN                                           <<01421>>63755000
   << -------------------------------------------------- >>    <<09738>>64087525
   << Remote File:                             FTYPE = 9 >>    <<09738>>64087527
   << RFA for FFILEINFO through ADVNDS applications ser- >>    <<09738>>64087530
   << vices call RFA'FFILEINFO which is Entry point into >>    <<09738>>64087532
   << RFA'CALLS, it will return a double word on TOS     >>    <<09738>>64087535
   << |--------------------------------|                 >>    <<09738>>64087537
   << | ADVNDS    error                | S-1             >>    <<09738>>64087540
   << |--------------------------------|                 >>    <<09738>>64087542
   << |                       Cond Code| S-0             >>    <<09738>>64087545
   << |--------------------------------|                 >>    <<09738>>64087547
   <<    S-0  bits 14:2 have the Condition Code          >>    <<09738>>64087550
   <<    S-1  ADVNDS error number IF S-0 <> CCE          >>    <<09738>>64087552
   << -------------------------------------------------- >>    <<09738>>64087555
   IF FTYPE = 9 <<RFA'FTYPE>> THEN                             <<09738>>64087725
   BEGIN                     << if ADVNDS remote file  >>      <<09738>>64087750
      << have to make a new pamp because q-4 pmap may be >>    <<09738>>64087775
      << messed up by  pre-processing                    >>    <<09738>>64087800
      << assume that all parameters are specified >>           <<09738>>64087825
      RFA'PARMMASK := %177777;                                 <<09738>>64087850
      I := INFOSIZE*5;        << start from last until   >>    <<09738>>64087875
      WHILE I > INFOLIMIT DO                                   <<09738>>64087900
      BEGIN                                                    <<09738>>64087905
         RFA'PARMMASK := RFA'PARMMASK&LSL(2);                  <<09738>>64087925
         I := I-INFOSIZE;                                      <<09738>>64087935
      END;                                                     <<09738>>64087937
                                                               <<09738>>64087950
      << now RFA'PARMMASK has all bits turned on except  >>    <<09738>>64087975
      << the item and itemval pair parameter mask, this  >>    <<09738>>64088000
      << is to be AND'ed to a pmap that which has all the>>    <<09738>>64088025
      << parameter flags turned on                       >>    <<09738>>64088050
      RFA'PARMMASK := LOGICAL(RFA'PARMMASK) LAND %003777;      <<09738>>64088075
                                                               <<09738>>64088100
      TOS := RFA'FFILEINFO (FILENUM,                           <<09738>>64088125
                            ITEMNUM1,                          <<09738>>64088150
                            ITEMNUM2,                          <<09738>>64088175
                            ITEMNUM3,                          <<09738>>64088200
                            ITEMNUM4,                          <<09738>>64088225
                            ITEMNUM5,                          <<09738>>64088250
                            INFODESC(4), <<X:=4>>              <<09738>>64088275
                            INFODESC(X:=X+INFOSIZE),           <<09738>>64088300
                            INFODESC(X:=X+INFOSIZE),           <<09738>>64088325
                            INFODESC(X:=X+INFOSIZE),           <<09738>>64088350
                            INFODESC(X:=X+INFOSIZE),           <<09738>>64088375
                            RFA'PARMMASK,                      <<09738>>64088400
                            ITEMVAL1,                          <<09738>>64088425
                            ITEMVAL2,                          <<09738>>64088450
                            ITEMVAL3,                          <<09738>>64088475
                            ITEMVAL4,                          <<09738>>64088500
                            ITEMVAL5,                          <<09738>>64088525
                            CRIT);                                      64088535
      GO EXIT;                                                 <<09738>>64088600
                                                               <<09738>>64088625
   END;                         << if ADVNDS remote file  >>   <<09738>>64088650
             IF AQ0(QINFOINDEX + 5) = 6 AND <<itemnum=6,<>50>> <<09435>>64916000
                LDEV > 255 THEN LDEV := 0;                     <<09435>>64916100
             IF FTYPE = MSG'TYPE THEN                          <<G1155>>64936000
                BEGIN  << Special message file handling. >>    <<G1155>>64937000
                IF ACB'READ THEN  << Read rec ptr always 0, >> <<G1155>>64938000
                   TOS := 0D      << write rec ptr is eof   >> <<G1155>>64939000
                ELSE              << minus open/close       >> <<G1155>>64940000
                   BEGIN          << records.               >> <<G1155>>64940500
                   TOS := FCRETURNINFO(0,ACBMQ);               <<G1155>>64941000
                   <<FCRETURNINFO leaves recsz & eof on stack>><<G1155>>64941300
                   DEL; << Delete recsize from stack. >>       <<G1155>>64941500
                   END; << Tos contains adjusted eof. >>       <<G1155>>64942000
                END                                            <<G1155>>64942500
             ELSE   << Non-message files >>                    <<G1155>>64943000
                TOS := ACB'FPTR;                               <<G1155>>64944000
             AQ0(QINFOPTR) := IF SPOOLED THEN LOGICAL(         << 1390>>65115000
$EDIT VOID=65119000                                                     65116000
               XDDSPOOLINFO(0D, %4000, XDDEP)) ELSE 0;         << 1390>>65120000
$EDIT VOID=65122000                                                     65121000
      <<00>> BEGIN     << End-Of-File >>                                65375000
             IF FTYPE = MSG'TYPE THEN  << Message Files >>     <<G1155>>65378000
                BEGIN << Use ACB and check for FCONTROL 46. >> <<G1155>>65379000
                TOS := FCRETURNINFO(0,ACBMQ);                  <<G1155>>65380000
                <<FCRETURNINFO leaves recsize & eof on stack.>><<G1155>>65380500
                DEL; << Delete recsize; tos contains eof.>>    <<G1155>>65381000
                END                                            <<G1155>>65382000
             ELSE   << Non-Message Files >>                    <<G1155>>65383000
                TOS := FCBEOF;                                 <<G1155>>65384000
      <<08>> BEGIN                                             <<09740>>65931000
             IF PRIVMODE THEN <<must have PM to get lockword>> <<09740>>65931100
                MOVE AQ0(QINFOPTR) := FLLOCKWORD, (4)          <<09740>>65931200
             ELSE                                              <<09740>>65931300
                BEGIN                                          <<09740>>65931310
                MOVE AQ0(QINFOPTR) := "        ";              <<09740>>65931400
                TOS := SEXVIOL;                                <<09740>>65931410
                GOTO NFG;                                      <<09740>>65931420
                END;                                           <<09740>>65931430
             END;                                              <<09740>>65931500
IF NOT PMAP THEN LBL := 0; <<default label no. >>              <<j2133>>67771000
   << -------------------------------------------------- >>    <<09738>>67822525
   << Remote File:                             FTYPE = 9 >>    <<09738>>67822527
   << RFA for FREADLABEL and FWRITELABEL through applica->>    <<09738>>67822530
   << tion services procedures.  We will call RFA'FREAD- >>    <<09738>>67822532
   << LABEL and RFA'FWRITELABEL which are entry points to>>    <<09738>>67822535
   << RFA'CALLS, which will return a double word on TOS  >>    <<09738>>67822537
   << |--------------------------------|                 >>    <<09738>>67822540
   << | error number                   | S-1             >>    <<09738>>67822542
   << |--------------------------------|                 >>    <<09738>>67822545
   << |                       Cond Code| S-0             >>    <<09738>>67822547
   << |--------------------------------|                 >>    <<09738>>67822550
   << remote status = 1st half of the status register    >>    <<09738>>67822552
   <<                 after  executed at remote          >>    <<09738>>67822555
   << -------------------------------------------------- >>    <<09738>>67822557
   BEGIN                            << case remote file  >>    <<09738>>67822750
      IF NOT ADVNDSRFA THEN                                    <<09738>>67822752
      BEGIN                                                    <<09738>>67822755
         TOS := INVFN;                                         <<09738>>67822757
         TOS := CCL;                                           <<09738>>67822760
         GO EXIT;                                              <<09738>>67822762
      END;                                                     <<09738>>67822765
      IF FBNDVIOL (@TARGET, TCOUNT, UBND) OR TCOUNT > 128 THEN <<09738>>67822775
      BEGIN                   << if bounds violation >>        <<09738>>67822800
         TOS := BNDVIOL;                                       <<09738>>67822825
         TOS := CCL;                                           <<09738>>67822850
      END                     << if bounds violation >>        <<09738>>67822875
      ELSE IF TCOUNT = 0 THEN << else check tcount=0>>         <<09738>>67822925
      BEGIN                                                    <<09738>>67822950
         TOS := 0;                                             <<09738>>67822975
         TOS := CCE;                                           <<09738>>67823000
      END                     << else check tcount=0>>         <<09738>>67823025
      ELSE BEGIN              << else do rfa >>                <<09738>>67823075
         IF WRITE THEN                                         <<09738>>67823100
            TOS := RFA'FWRITELABEL (FN,                        <<09738>>67823125
                                    @TARGET,                   <<09738>>67823175
                                    TCOUNT,                    <<09738>>67823200
                                    LBL,                       <<09738>>67823225
                                    PMAP,                      <<09738>>67823250
                                    CRIT)                      <<09738>>67823260
         ELSE                                                  <<09738>>67823300
            TOS := RFA'FREADLABEL (FN,                         <<09738>>67823325
                                   @TARGET,                    <<09738>>67823375
                                   TCOUNT,                     <<09738>>67823400
                                   LBL,                        <<09738>>67823425
                                   PMAP,                       <<09738>>67823450
                                   CRIT);                      <<09738>>67823460
      END;                    << else do rfa >>                <<09738>>67823500
                                                               <<09738>>67823525
      GO EXIT;                                                 <<09738>>67823550
   END;                             << case remote file  >>    <<09738>>67823575
   << ----------------------------------------------------- >> <<09738>>68622525
   << Remote File:                                 FTYPE= 9 >> <<09738>>68622527
   << This is for ADVNDS RFA using RFA'FLOCK which is       >> <<09738>>68622530
   << an entry point into RFA'CALLS in filesystem code      >> <<09738>>68622532
   << the call will leave a double a double word on TOS     >> <<09738>>68622535
   << |--------------------------------|                    >> <<09738>>68622537
   << | error number                   | S-1                >> <<09738>>68622540
   << |--------------------------------|                    >> <<09738>>68622542
   << |                       Cond Code| S                  >> <<09738>>68622545
   << |--------------------------------|                    >> <<09738>>68622547
   <<    S-0  bits 14:2 have the Condition Code             >> <<09738>>68622550
   <<    S-1  ADVNDS error number IF S-0 <> CCE             >> <<09738>>68622552
   <<  NOTE: above format is chosen because of the way      >> <<09738>>68622557
   <<        filesystem code exits through ERROREXIT        >> <<09738>>68622560
   << ----------------------------------------------------- >> <<09738>>68622562
   BEGIN                              << case remote file   >> <<09738>>68622750
      IF NOT ADVNDSRFA THEN                                    <<09738>>68622775
      BEGIN                                                    <<09738>>68622800
         TOS := INVFN;                                         <<09738>>68622825
         TOS := CCL;                                           <<09738>>68622850
         GO EXIT;                                              <<09738>>68622875
      END;                                                     <<09738>>68622900
      IF NOT MRCAPOK (TRUE) THEN                               <<09738>>68622902
      BEGIN                                                    <<09738>>68622905
          << post local error to remote ACB >>                 <<09738>>68622925
          RFA'CALLS'ERR (FILENUM, MRIN);                       <<09738>>68622927
          TOS := MRIN;                                         <<09738>>68622950
          TOS := CCL;                                          <<09738>>68622955
          GO EXIT;                                             <<09738>>68622960
      END;                                                     <<09738>>68622965
                                                               <<09738>>68622975
      TOS := RFA'FLOCK (FILENUM, T, CRIT);                     <<09738>>68622980
                                                               <<09738>>68623000
      IF S0 = CCL THEN                                         <<09738>>68623027
         MRCAPOK (FALSE);                                      <<09738>>68623030
                                                               <<09738>>68623032
   END;                               << case remote file   >> <<09738>>68623050
                                                               <<09738>>68623075
   << ----------------------------------------------------- >> <<09738>>69247525
   << Remote File:                                 FTYPE= 9 >> <<09738>>69247527
   << this is a for ADVNDS RFA where we call RFA'FUNLOCK    >> <<09738>>69247530
   << an entry point into RFA'CALLS in filesystem code      >> <<09738>>69247532
   << the call will leave a double a double word on TOS     >> <<09738>>69247535
   << |--------------------------------|                    >> <<09738>>69247537
   << | error number                   | S-1                >> <<09738>>69247540
   << |--------------------------------|                    >> <<09738>>69247542
   << |                       Cond Code| S                  >> <<09738>>69247545
   << |--------------------------------|                    >> <<09738>>69247547
   <<    S-0  bits 14:2 have the Condition Code             >> <<09738>>69247550
   <<    S-1  ADVNDS error number IF S-0 <> CCE             >> <<09738>>69247552
   <<  NOTE: above format is chosen because of the way      >> <<09738>>69247557
   <<        filesystem code exits through ERROREXIT        >> <<09738>>69247560
   << ----------------------------------------------------- >> <<09738>>69247562
   BEGIN                              << case remote file   >> <<09738>>69247750
      IF NOT ADVNDSRFA THEN                                    <<09738>>69247775
      BEGIN                                                    <<09738>>69247800
         TOS := INVFN;                                         <<09738>>69247825
         TOS := CCL;                                           <<09738>>69247850
         GO EXIT;                                              <<09738>>69247875
      END;                                                     <<09738>>69247900
                                                               <<09738>>69248075
      TOS := RFA'FUNLOCK (FILENUM, CRIT);                      <<09738>>69248100
                                                               <<09738>>69248175
      IF S0 = CCE THEN                                         << 2220>>69248200
         MRCAPOK (FALSE);   << Reset Global RIN flag >>        << 2220>>69248225
   END;                               << case remote file   >> <<09738>>69248325
                                                               <<09738>>69248350
