Subroutine MFS_SHELL2(CODE, BFS, HANDLE, NAME, FMC, RECORD, STATUS)

****************************************************************
* MFS shell for making Modified Filing Systems
*
* this program is similar to MFS.SHELL1, except it uses CASE logic to
* dispatch according to the value of the CODE argument.
*
* use this logic as the basis for your MFS.  Insert the appropriate code
* under the correct case below.  For example, if your MFS traps READs to
* a file, insert your trap code underneath the statement
*
*        CASE CODE = READ.RECORD
*
* and with correct relationship (before or after) the statement:
*
*        GOSUB NEXT.MFS
*
****************************************************************

EQU TRUE$ TO 1
EQU FALSE$ TO 0

$Insert FILE.SYSTEM.EQUATES


*-------------------
BEGIN CASE
  CASE CODE = READ.RECORD
    GOSUB NEXT.MFS
*
  CASE CODE = READO.RECORD
    GOSUB NEXT.MFS
*
  CASE CODE = WRITE.RECORD
    GOSUB NEXT.MFS
*
  CASE CODE = DELETE.RECORD
    GOSUB NEXT.MFS
*
  CASE CODE = LOCK.RECORD
    GOSUB NEXT.MFS
*
  CASE CODE = UNLOCK.RECORD
    GOSUB NEXT.MFS
*
  CASE CODE = SELECT
    GOSUB NEXT.MFS
*
  CASE CODE = READNEXT
    GOSUB NEXT.MFS
*
  CASE CODE = CLEARSELECT
    GOSUB NEXT.MFS
*
  CASE CODE = CLEARFILE
    GOSUB NEXT.MFS
*
  CASE CODE = OPEN.FILE
    GOSUB NEXT.MFS
*
  CASE CODE = CREATE.FILE
    GOSUB NEXT.MFS
*
  CASE CODE = RENAME.FILE
    GOSUB NEXT.MFS
*
  CASE CODE = MOVE.FILE
    GOSUB NEXT.MFS
*
  CASE CODE = DELETE.FILE
    GOSUB NEXT.MFS
*
  CASE CODE = OPEN.MEDIA
    GOSUB NEXT.MFS
*
  CASE CODE = CREATE.MEDIA
    GOSUB NEXT.MFS
*
  CASE CODE = READ.MEDIA
    GOSUB NEXT.MFS
*
  CASE CODE = WRITE.MEDIA
    GOSUB NEXT.MFS
*
  CASE CODE = UNLOCK.ALL
    STATUS = TRUE$
*
  CASE CODE = FLUSH
    STATUS = TRUE$
*
  CASE CODE = INSTALL
    STATUS = TRUE$
*
  CASE CODE = RECORD.COUNT
    GOSUB NEXT.MFS
*
  CASE CODE = REMAKE.FILE
    GOSUB NEXT.MFS
*
  CASE CODE = CLOSE.MEDIA
    GOSUB NEXT.MFS
*
  CASE CODE = OMNI.SCRIPT
    GOSUB NEXT.MFS
*
  CASE CODE = CREATE.INDEX
    GOSUB NEXT.MFS
*
  CASE CODE = DELETE.INDEX
    GOSUB NEXT.MFS
*
  CASE CODE = UPDATE.INDEX
    GOSUB NEXT.MFS
*
  CASE CODE = SELECT.INDEX
    GOSUB NEXT.MFS
*
  CASE CODE = READNEXT.INDEX
    GOSUB NEXT.MFS
*
END CASE

RETURN ''

* ------------------
NEXT.MFS:
  FS = DELETE(BFS,1,1,1)
  NEXTFS = FS<1,1,1>
  CALL @NEXTFS(CODE, FS, HANDLE, NAME, FMC, RECORD, STATUS)
  
RETURN
