Using GDE

The default installation procedure places the GDE utility into a directory assigned to the environment variable gtm_dist.

To invoke GDE:

from within GTM, use the command:

GTM>do ^GDE

from the shell, enter:

$ mumps -r GDE

GDE displays informational messages like the following, and then the GDE> prompt:

%GDE-I-LOADGD, loading Global Directory file /prod/mumps.gld
%GDE-I-VERIFY, Verification OK
GDE>

If this does not work, contact your system manager to investigate setup and file access issues.

To leave GDE:

  1. Use the GDE EXIT command to save all changes and return to the caller.

    GDE> EXIT
  2. Use the GDE QUIT command to discard all changes and return to the caller. This will not save any changes.

    GDE> QUIT

Guidelines for Mapping

This section lists the parameters that apply to defining each component of a mapping.

NAMES

The NAMES section contains mappings of M global name spaces. More than one name space can map to a single region but a single name space can only map to one region.

A name space:

  • Is case sensitive.

  • Must begin with an alphabetic character or a percent sign (%).

  • Can be a discrete "global" name, for example, aaa corresponds to the global variable ^aaa.

  • Can be a global name ending with a wild card ("*"), for example, abc* represents the set of global nodes which have abc as the starting prefix.

  • Can be a subtree of a global name, for example, abc(1) represents a subtree of the global ^abc.

  • Can be a subscript range, for example, abc(1:10) represents all nodes starting from ^abc(1) up to (but not including) to ^abc(10).

  • A global name can be one to 31 alphanumeric characters. However, the combined length of a global and its subscripts is limited to 1,019 bytes (the maximum key size supported by GT.M). Note that the byte length of the subscripted global specification can exceed the maximum KeySize specified for its region.

  • Maps to only one region in the Global Directory.

REGIONS

The REGIONS section contain mappings of database region. A region is a logical structure that holds information about a portion of a database, such as key-size and record-size. A key is the internal representation of a global variable name. In this chapter the terms global variable name and key are used interchangeably. A record refers to a key and its data.

A Global Directory must have at least one region. A region only maps to a single segment. More than one name may map to a region.

A region name:

  • Can include alphanumerics, dollar signs ($), and underscores ( _ ).

  • Can have from 1 to 31 characters.

GDE automatically converts region names to uppercase, and uses DEFAULT for the default region name.

SEGMENTS

The SEGMENTS section contains mappings for segments. A segment defines file-related database storage characteristics. A segment must map to a single file. A segment can be mapped by only one region.

GT.M uses a segment to define a physical file and access method for the database stored in that file.

A segment-name:

  • Can include alphanumerics, dollar signs ($), and underscores ( _ )

  • Can have from one to 31 characters

GDE automatically converts segment names to uppercase. GDE uses DEFAULT for the default segment name.

FILE

Files are the structures provided by UNIX for the storage and retrieval of information. Files used by GT.M must be random-access files resident on disk.

By default, GDE uses the file-name mumps.dat for the DEFAULT segment. GDE adds the .dat to the file name when you do not specify an extension. Avoid non-graphic and punctuation characters with potential semantic significance to the file system in file names as they will produce operational difficulties.

Example of a Basic Mapping

To complete this procedure, you must have already opened a Global Directory.

  • ADD a new global variable name.

    GDE> add -name cus -region=cusreg

    This maps the global name cus to the region cusreg.

  • ADD region cusreg, if it does not exist.

    GDE> add -region cusreg -dynamic=cusseg

    This creates the region cusreg and connects it to the segment cusseg. -d[ynamic] is a required qualifier that takes the associated segment-name as a value.

  • ADD segment cusreg, if it does not exist, and link it to a file.

    GDE> add -segment cusseg -file=cus.dat

    This creates the segment cusseg and connects it to the file cus.dat.

To review the information you have added to the Global Directory, use the SHOW command.

To perform a consistency check of the configuration, use the VERIFY command.

To exit the Global Directory and save your changes, use the EXIT command. GDE performs an automatic verification. If successful, the mappings and database specifications become part of the Global Directory, available for access by processes, utilities, and the run-time system.

Only MUPIP CREATE uses the database specifications; run-time processes and other utility functions use only the map.