Name_Volume subroutine

Initializes or renames a location (typically a folder). It assigns a label to the location and builds a location directory, creating a media map in the folder.

Name_Volume(location, identifier)

ParameterDescription
locationThe location (fully qualified path name, or relative path from the location of OINSIGHT.EXE).
identifierThe name to be given to the location. The identifier cannot contain spaces or quotes. If omitted, returns the current identifier for the location.
Media MapName_Volume creates a REVMEDIA file (REVMEDIA.LK and REVMEDIA.OV) in the specified location, if it does not exist. The volume identifier is stored in field 2 of the REVMEDIA record. Field 1 of the REVMEDIA record contains the revmedia name to assign to the next file to be created.

Note: You cannot rename a location that contains tables that have been indexed.

Caution: It is important that each location created in OpenInsight have a unique name. This is especially important in environments where users may have access to network drives but can also attach locations from local drives. Failure to ensure uniqueness of locations can result in incorrect updates of indexes.

From the System Monitor, running the following command:

RUN NAME_VOLUME 'C:\DATAFOLDER', 'MYDATA'

will initialize the location C:\DATAFOLDER with a media map named MYDATA, if no media map exists. If a media map exists in C:\DATAFOLDER, its identifier is renamed to MYDATA. The System Monitor output will be:

C:\DATAFOLDER, MYDATA,

BASIC+ code example:

/* associating C:\DATAFOLDER with the identifier MYDATA from code */

declare subroutine name_volume

name_volume ('C:\datafolder', 'MYDATA')
  • guides/programming/programmers_reference_manual/name_volume.txt
  • Last modified: 2024/10/14 18:18
  • by 127.0.0.1