Table of Contents

DMSLFS Abstract

Statistics

Type ASSEMBLE
Source Lines : 885
Fixes Applied : 2
Most Recent Version : Tuesday, December 12, 1978
Last Fix ID : [R14929DS]

Synopsis

Module

       DMSLFS

Function

       TO FIND A SPECIFIED 40-BYTE  FST ENTRY WITHIN THE FST
       TABLES FOR READ-ONLY OR READ-WRITE DISK(S).

Attributes

       NUCLEUS RESIDENT, REENTRANT

Operation

       DMSLFS  CHECKS  TO ENSURE  THAT  R1  IS NOT  ZERO  (A
       CALLING ERROR), AND INITIALIZES
       TO TEST  FOR EITHER A  READ-ONLY OR  READ-WRITE DISK.
       THEN THE PARAMETER LIST IS CHECKED TO ENSURE THAT THE
       FILENAME AND  FILETYPE ARE PRESENT (CALLING  ERROR IF
       NOT),  AND  CHECKS  TO  SEE  IF  THE  MODE-LETTER  IS
       ALPHABETIC, AND IF SO WHETHER A MODE-NUMBER IS GIVEN.

       IF THE MODE IS ALPHABETIC,  DMSLAD IS CALLED TO CHECK
       FOR A DISK WHOSE MODE-LETTER
       ADTM MATCHES THE PARAMETER LIST.  IF THE MODE IS *-*
       OR EQUIVALENT (NOT ALPHABETIC),  DMSLADN IS CALLED TO
       CHECK FOR ANY  AVAILABLE DISK.  AN ERROR  RETURN FROM
       DMSLAD OR DMSLADN TRIGGERS A  'FILE NOT FOUND' RETURN
       FROM DMSLFS. ON A SUCCESSFUL RETURN, DMSLFS CHECKS TO
       MAKE SURE THE DISK FOUND IS LOGGED IN
       (AS EITHER READ-ONLY OR READ-WRITE OR IF DMSLFS WAS
       CALLED BY DMSSTT, OS READ ONLY). IF NOT, THE
       LOGIC CONTINUES  AS DESCRIBED BELOW, WHERE  THE GIVEN
       FST ENTRY WAS NOT FOUND ON THE DISK.
       IF THE DISK IS AN OS DISK, DMSLFS CALLS ROSSTT IN
       DMSROS TO VERFIY THAT THE DATA SET EXISTS AND THAT THE
       ATTRIBUTES OF THE DATA SET ARE SUPPORTED. UPON RETURN
       FROM DMSROS, A RETURN CODE OF 88 INDICATES THAT
       THE DATA SET WAS NOT FOUND AND DMSLFS INITIATES THE
       SEARCH AGAIN USING THE NEXT DISK IN ORDER. ANY OTHER
       ERRORS SUCH AS RETURN CODE 80 CAUSE DMSLFS TO EXIT
       IMMEDIATELY.

       A RETURN CODE OF 0 FROM DMSROS INDICATES THAT THE DATA
       SET WAS FOUND ON THE SPECIFIED DISK AND DMSLFS CONTINUES
       AS IT DOES WHEN A CMS FST IS FOUND.

       IF THE DISK FOUND BY DMSLAD  OR DMSLADN IS LOGGED IN,
       DMSLFS CHECKS THROUGH THE VARIOUS
       FST HYPERBLOCKS IN CORE TO  FIND A MATCHING FST ENTRY
       FOR THE FILENAME (IF GIVEN IN THE PARAMETER LIST) AND
       FILETYPE (IF  GIVEN).  NOTE -  IF R1 WAS  NEGATIVE AT
       ENTRY TO DMSLFS, SEARCHING FOR THE GIVEN FST RESUMES
       FROM THE POINT LAST SEARCHED, AS INDICATED BY
       THE ADTCHBA (CURRENT HYPERBLOCK  ADDRESS) AND ADTCFST
       (CURRENT  FST  ENTRY  DISPLACMENT)  POINTERS  IN  THE
       ACTIVE DISK TABLE FOR THE GIVEN DISK.

       IF THE FILENAME AND FILETYPE ARE BOTH GIVEN AND MATCH
       EXPLICITLY, THE  FILE IS DEEMED  'FOUND' IRRESPECTIVE
       OF ANY MODE-NUMBER IN THE  PARAMETER LIST.  IF EITHER
       (OR BOTH) WAS '*' IN THE PARAMETER LIST, HOWEVER, AND
       THE MODE-NUMBER  WAS GIVEN,  THEN THE  MODE-NUMBER IN
       THE PARAMETER LIST MUST MATCH  THE MODE-NUMBER IN THE
       FST ENTRY.

       THUS, FOR  EXAMPLE, A CALL  TO DMSLFS FOR  "SOME FILE
       A5" WOULD CONSIDER "SOME FILE A1"
       (ON THE A-DISK)  A MATCH EVEN THOUGH  THE MODE-NUMBER
       IS WRONG.  (THIS LOGIC IS PURPOSELY PROVIDED TO AVOID
       MISLEADING THE USER, SINCE YOU  CANNOT HAVE TWO FILES
       ON THE SAME DISK WITH SAME FILENAME AND FILETYPE, BUT
       DIFFERENT MODE NUMBERS.)   A SEARCH  FOR "* FILE A5",
       HOWEVER, WOULD NOT CONSIDER "SOME  FILE A1" TO MATCH,
       SINCE THE MODE NUMBER DIFFERS.

       (NOTE - THIS LOGIC IS  NOW CONSISTENT THROUGHOUT CMS.
       THAT  IS,   IF  THE   FILENAME  AND   FILETYPE  MATCH
       EXPLICITLY, THE MODE NUMBER NEED NOT BE CORRECT FOR A
       MATCH; BUT IF THE FILENAME AND/OR FILETYPE IS '*' AND
       THE MODE-NUMBER IS GIVEN, THEN  IT MUST EQUAL THE FST
       MODE-NUMBER TO BE CONSIDERED A MATCH.)

       IF DMSLFS FINDS THE MATCHING  FILE ON THE GIVEN DISK,
       IT RETURNS THE ADDRESSES OF THE ACTIVE
       DISK TABLE  (ADT) AND THE FST  ENTRY IN R0 AND  R1 AS
       SHOWN  IN EXIT  CONDITIONS,  AND  REMEMBERS WHERE  IT
       FOUND THE FILE IN THE ADTCHBA AND ADTCFST POINTERS IN
       THE ADT BLOCK.

       FST ENTRY NOT FOUND ON THE DISK

       IF  THE FST  ENTRY WAS  NOT  FOUND ON  THE DISK  JUST
       CHECKED,  DMSLFS  CHECKS  THE MODE  SUPPLIED  IN  THE
       P-LIST.  IF  IT WAS '*'  (OR EQUIVALENT),  DMSLADN IS
       CALLED AND THE NEXT
       DISK (IF  ANY) IS CHECKED  AS ABOVE FOR  THE MATCHING
       FILE.

       IF  THE MODE,  ON  THE  OTHER HAND,  WAS  ALPHABETIC,
       DMSLADN IS CALLED TO DETERMINE IF ANOTHER
       DISK IS  AVAILABLE FOR  CHECKING.  IF  SO, THE  ADTMX
       EXTENSION-MODE-LETTER IS CHECKED TO SEE IF IT MATCHES
       THE MODE GIVEN IN THE PARAMETER LIST.  IF IT MATCHES,
       THIS  INDICATES THAT  THE  NEW  DISK IS  A  READ-ONLY
       EXTENSION  OF THE  ONE  PREVIOUSLY  CHECKED, AND  THE
       GIVEN  FILE IS  LOOKED  UP ON  THIS  DISK. IF  FOUND,
       SUCCESSFUL RETURN IS GIVEN POINTING  TO THIS DISK AND
       THE  FST  ENTRY  FOUND.   IF  NOT,  THIS  PROCESS  IF
       REPEATED UNTIL  A MATCH  IS FOUND,  OR UNTIL  NO MORE
       DISK(S) WITH A MATCHING ADTMX LETTER ARE FOUND.

     DMSLFS    (FSTLKP)

Calls to Other Routines

       DMSLAD, DMSLADN, DMSROS