You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

A series of MFS calls -- examples include CREATE.MEDIA, OPEN.MEDIA, and WRITE.MEDIA -- provide MFS programmers with access to media-related file functions.  Media calls are defined as those that access the media map for a volume when executing.

Media Map

The media map is the "directory" that maintains the relationship between OpenInsight file names and their actual physical locations (for example, their DOS file names). There is a media map for each subdirectory or drive that contains an OpenInsight volume.

Each BFS maintains its own media maps. As a result, it is possible to have more than one media map on a DOS subdirectory. If more than one filing system (BFS) is storing files on a subdirectory, there will be more than one media map.

For example, if both Linear Hash (RTP57) and ROS (RTP51) are storing files on a subdirectory, each will have its own media map on that subdirectory.  Neither filing system will "know" about the other's files; by extension, neither will be able to access data from the other's files.

In addition to the basic function of mapping OpenInsight files to their actual location, filing systems can use media maps for a variety of additional purposes. For example, most filing systems use media maps to maintain information about what MFSs are installed for a file (see the topic Manual MFS Installation in the chapter Installing an MFS earlier in this chapter.) However, this is a function of the BFS itself, and restrictions may apply for individual filing systems.

The structure of a media map varies depending on the BFS that maintains it. Most BFSs maintain the media map as a file in their own filing structure. For example, Linear Hash (RTP57) maintains media maps as Linear Hash files, ROS (RTP51) as a ROS file (this is reflected in the DOS name of the media map -- REVMEDIA.LK for RTP57, REVMEDIA.000 for ROS).

Some BFSs use a media map structure that is not their default filing structure. The Revelation G BFS (RTP59) uses a media map structure that is not a ROS or LINK file. Another example is provided by Environmental Bonds. Although these BFSs may access data in ASCII, dBASE, or other filing structures, they may at the same time maintain Linear Hash (or other) media map structures.

Media Map Access

From the BASIC+ or the System Monitor, a media map is accessible via the logical file name REVMEDIA. This name is used for all media maps, regardless of volume or filing structure.

To access the media map, a user attaches the logical file name REVMEDIA for the volume being accessed. For example, to attach the media map for the default (DATAVOL) volume, execute this System Monitor command:

RUN ATTACH_TABLE  "DATAVOL", "REVMEDIA"

The output from a successful ATTACH_TABLE is shown below:

From this point, the media map can be accessed using any file or record-oriented command.  For example, rows in the REVMEDIA table can be edited using the System Editor, as shown below:

  • No labels