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 shell.

    GDE> EXIT
  2. Use the GDE QUIT command to discard all changes and return to the shell. 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.

NAME

The name is the portion of the global variable name without subscripts. More than one name can map to a single region, but a single name can only map to one region.

A name:

  • Maps to only one region in the Global Directory.

  • Is case sensitive.

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

  • Can be one to 31 alphanumeric characters.

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

  • Can be a partial name ending with a wild card ("*"), for example, abc* represents all globals beginning with the letters ^abc.

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 16 characters.

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

SEGMENT

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 16 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. Generally, avoid non-graphic and punctuation with potential semantic significance to the file system in file names as they tend to 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 -d=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

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

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

To perform a base consistency check in the configuration, enter the command VERIFY.

To exit the Global Directory and save your changes, enter the command EXIT. At this point, GDE performs an automatic verification. If successfully confirmed, 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 and ignore the other information in a global directory.