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

Compare with Current View Page History

Version 1 Next »

In order to keep track of available volumes and files, OpenInsight maintains two system "files" -- SYSVOLUMES and SYSTABLES. As their names imply, these files contain information about currently available volumes and tables (files), respectively.

In fact, these files are simply system variables (@VOLUMES for data in SYSVOLUMES and @TABLES for data in SYSTABLES). However, to provide standard access to the information in these variables, they are accessible via the BFS RTP50 (memory resident files) as normal OpenInsight files. Because they are not true files, they cannot be updated by users.

Information in the SYSVOLUMES and SYSTABLES files is maintained by processes such as Attach_Table, Create_Table, Delete_Table, and others. For example, the Attach_Table process builds a SYSVOLUMES file entry for the volume being attached, and creates a series of SYSTABLES entries, one for each file being attached.

The SYSVOLUMES File

There is one entry in the SYSVOLUMES file for every volume (logical or physical) that has been attached during the current session. This includes several system volumes such as REVBOOT (the logical name for the current default drive), DOS (the logical DOS file), MEMORY.RESIDENT (RTP50, the BFS for SYSVOLUMES and SYSTABLES), and INDEXING.  The information is stored at run time in the @VOLUMES array.

Entries in the SYSVOLUMES file have five fields. These are:

Field Number

Description

0 (key)

Volume Name.  This is the name under which the volume was attached.  For example, if a user has attached the volume \TEMP\, the name \TEMP\ will be the key to a record in the SYSVOLUMES file.

1

Media Name. The internal media name for the volume.  This name is used to ensure the uniqueness of data file names. The media name guarantees that a user cannot attach the same volume using two different names such as \TEMP\ and C:\TEMP.

2

Qualifier. Usually used for the DOS path name of the media map for the volume. However, each BFS can use the qualifier in any manner it finds suitable.

3

File List. A list of files currently available (attached) on that volume (delimited with @VM).

4

Filing System(s). The MFS/BFS list for that volume (delimited with @VM). This is normally only the BFS name (for example, RTP57). However, if an MFS has been installed using a volume pointer, its name will appear in this field.

5

Media Handle. The handle used to access the media map for the volume. This handle is created by the OPEN.MEDIA call, and is passed in subsequent READ.MEDIA and WRITE.MEDIA calls.

The SYSTABLES File

Each file that is attached has an entry in the SYSTABLES file and stored in the @TABLES array. The field layout of these entries is:

Field Number

Description

0 (key)

File Name. The name by which a user accesses the file

1

Volume name. The volume from which this file was attached. This is the volume name as found as an entry in the SYSVOLUMES file.

2

True file name. This is different from the key only if this is an aliased table, as set by Alias_Table().

3

Application. The application name to which this file belongs.

4

Filing System(s). The MFS/BFS list for that volume (delimited with @VM).

5

File Handle. If the file has been opened during this session, the file handle is stored in this field. If the file has not been opened, the next BASIC+ OPEN statement will generate a filing system OPEN.FILE call.

  • No labels