Table of Contents

Modifying Filing System (MFS)

MFS Introduction

This chapter describes OpenInsight's MFS (Modifying Filing Structure) technology. The use of a MFS is a powerful and innovative means for developers to gain low-level control over file input and output operations. The MFS technology is an outgrowth of OpenInsight's approach to modularized filing systems.

Unlike traditional database management systems, OpenInsight is not bound to specific filing structures. Instead, OpenInsight uses a standard protocol for file access, and a series of base filing systems (BFS) to translate this protocol into the data management requirements of a variety of different structures. The result is that OpenInsight provides to developers a completely open architecture. Programmers are able to control data access all the way from the application (window) level down to the filing system level. This chapter focuses on the ability of developers to add a modifying layer to a base filing structure. In effect, an MFS adds functionality without requiring the developer to change the underlying base filing system.

There are two divisions to this chapter.

MFS Definition

MFS vs BFS

MFS vs BFS

System BFSes in OpenInsight

Modifying Filing System MFS

MFS Applications

MFS Applications

System MFSs in OpenInsight

Programming an MFS

Programming an MFS

MFS Basics

Filing System Access

MFS "Trapping" Mechanism

MFS Subroutine

MFS Dispatch Routine

MFS Dispatch Routine

Using ON GOSUB In an MFS Dispatch Routine

Using CASE Statements in an MFS Dispatch Routine

File Operation Logic

File Operation Logic

Call to Next MFS

BFS Argument

Return from the BFS

BFS/MFS Independence

Installing an MFS

Installing an MFS

Manual MFS Installation

Writing a BASIC+ MFS Installer

Writing a BASIC Plus MFS Installer

Installing an MFS Using a BASIC Plus Program

Dynamically Installing or DeInstalling an MFS

Using MFS Installer

A Simple MFS

A Simple MFS

MFS Programming Notes

MFS Programming Notes

Accessing the MFS

Accessing the MFS

Direct Calls to the MFS

Accessing a File From Within an MFS

Accessing a File From Within An MFS

Accessing the Current File

Accessing Different Files

Disabling a Function From Within an MFS

Passing Data to an MFS

Passing Data to an MFS

Global and Labeled Common Variables

Modifying MFS Arguments

INSTALL and FLUSH Calls

INSTALL Call

FLUSH Call

SELECT and READNEXT Calls

SELECT and READNEXT Calls

SELECT and READNEXT Processing

SELECT and READNEXT Processors

Simple Latent Select

ReadNext MFS Processing

READNEXT Direction

MFS and READNEXT

Extended (Resolved) Select

Indexed-Based SELECT

CLEARSELECT MFS Processing

OPEN FILE Calls and File Handles

OPEN FILE Calls and File Handles

OPEN.FILE Call

BASIC+ Open File Handle

Updating the File Handle

OPEN Failure

Accessing the OpenInsight File Name

Accessing the OpenInsight File Name

Modifying the File Handle

Maintaining a Filename Table

Locks and Unlocks

Locks and Unlocks

Lock Semaphores

Local Lock Table

Locking Within An MFS

UNLOCK ALL Within An MFS

Additional Lock Calls

Media Calls

Media Calls

Media Map

Media Map Access

The %%REVMEDIA%% Record

Media Updates and the Media Handle

MFS Access to Media Calls

OPEN MEDIA and CREATE MEDIA

CREATE FILE

Non-Volume Media Calls

Record Count

SYSVOLUMES and SYSTABLES Files

SYSVOLUMES and SYSTABLES

The SYSVOLUMES File

The SYSTABLES File