The general format of GDE commands is:
command [-object-type] [object-name] [-qualifier]
The format description for each individual command specifies required qualifiers for that command.
Comments on command lines start with an exclamation mark (!) and run to the end of line.
![]() | Caution |
---|---|
An exclamation mark not enclosed in quotation marks ("")(for example in a subscript) causes GDE to ignore the rest of that input line. |
![]() | Note |
---|---|
The .dat extension is appended to the file-name when the database file is created, but does not appear in the Global Directory listing, unless you enter it that way. |
The format of the @ command is:
@file-name
GDE executes each line of the command file as if it were entered at the terminal.
GDE> @standard
The ADD command inserts a new name, region, or segment into the Global Directory.
The format of the ADD command is one of the following:
A[DD] -G[BLNAME] global-name [-GBLNAME-qualifier ...] A[DD] -N[AME] namespace -R[EGION]=region-name A[DD] -R[EGION] region-name -D[YNAMIC]=segment-name [-REGION-qualifier...] A[DD] -S[EGMENT] segment-name [-SEGMENT-qualifier...] -F[ILE_NAME]=file-name
Name spaces and file-names are case-sensitive; other objects are not case-sensitive.
Maps a namespace to a region in the global directory. The format of the ADD -NAME command is:
A[DD]-N[AME] namespace -R[EGION]=region-name
GDE> add -name IMPL -region=OTHERMUMPS ! Map MUMPS implementations to OTHERMUMPS GDE> add -name IMPL("GT.M") -region=MYMUMPS ! While mapping GT.M to MYMUMPS
These examples map an entire subtree of a global to a region.
GDE> add -name PRODAGE(0:10) -region=DECADE0 ! Ranges are closed on the left and open on the right GDE> add -name PRODAGE(10:20) -region=DECADE1 ! PRODAGE(10) maps to DECADE1 GDE> add -name PRODAGE(20:30) -region=DECADE2
GDE> add -name=PRODAGE(:10) -region=DECADE0 ! This line and the next are equivalent GDE> add -name PRODAGE("":10) -region=DECADE0 ! numbers up to, but not including, 10 GDE> add -name PRODAGE(20:) -region=DECADE2 ! 20 thru all numbers (> 20) + strings GDE> add -name PRODAGE(20:"") -region=DECADE2 ! same as the add just above
GDE> add -name MODELNUM -region=NUMERIC GDE> add -name MODELNUM($char(0):) -region=STRING
This example map numeric subscripts and strings to separate regions.
GDE> add -name DIVISION("Europe","a":"m") -region EUROPEAL GDE> add -name DIVISION("Europe","m":"z") -region EUROPEM GDE> add -name DIVISION("Australia") -region AUSTRALIA GDE> add -name DIVISION("USA","South","a":"m") -region USSAL GDE> add -name DIVISION("USA","South","m":"{") -region USSMZ GDE> add -name DIVISION("USA","WestCoast") -region USWC
This example maps global variables with the same unsubscripted name at multiple subscript levels.
GDE> add -name x -region=REG1 GDE> add -name x(5) -region=REG1 GDE> add -name x(5,10:) -region=REG2 GDE> add -name x(5:20) -region=REG2 GDE> add -name x(20) -region=REG2 GDE> add -name x(20,40) -region=REG2 GDE> add -name x(20,40,50:) -region=REG3 GDE> add -name x(20,40:) -region=REG3 GDE> add -name x(20:) -region=REG3
Maps a segment to a database file. The syntax of the ADD -SEGMENT command is:
A[DD]-S[EGMENT] segment-name [-SEGMENT-qualifier...] -F[ILE_NAME]=file-name
Example:
GDE> add -segment temp -file_name=scratch
This command creates a segment-name TEMP and maps it to the file scratch.dat in the current working directory. However, if you were to specify $scratch as the file-name, in other words, an environment variable, each process selects the file using the translation of that environment variable at run-time.
Maps a region to a segment. The syntax of the ADD -REGION command is:
A[DD]-R[EGION] region-name -D[YNAMIC]=segment-name [-REGION-qualifier...]
The format of the CHANGE command is:
C[HANGE] -G[BLNAME] -C[OLLATION]=collation_number C[HANGE] -I[NSTANCE] -F[ILE_NAME]={repl_inst_filename|""} C[HANGE] -N[AME] namespace -R[EGION]=new-region C[HANGE] -R[EGION] region-name [-REGION-qualifier...] C[HANGE] -S[EGMENT] segment-name [-SEGMENT-qualifier...]
The CHANGE command requires specification of an object-type and object-name.
GDE> change -region master -dynamic=temp -key=100
This command changes the region master to use the segment temp and establishes a maximum KEY_SIZE of 100 characters for the next creation of a file for this region. The segment change takes effect the first time the system uses the Global Directory after the GDE session EXITs, while the KEY_SIZE change takes effect after the next MUPIP CREATE that creates a new database file for segment temp.
The format of the DELETE command is:
D[ELETE] -G[BLNAME] global-name D[ELETE] -N[AME] namespace D[ELETE] -R[EGION] region-name D[ELETE] -S[EGMENT] segment-name
The DELETE command requires specification of an object-type and object-name.
The default namespace (*) cannot be deleted.
GDE> del -name T*
This command deletes the explicit mapping of all global names starting with the letter "T." This command does not delete any global variables. However, it may make preexisting globals starting with the letter "T" invisible, at least while using this global directory, because the T* global names map to the default namespace going forward.
The HELP command displays online information about GDE commands and qualifiers.
The format of the HELP command is:
H[ELP] [topic...]
The format of the LOCKS command is:
LOC[KS] -R[EGION]=region-name
GDE> lock -region=main
This command maps all locks on resource names that don't start with the caret symbol, "^" to the region main.
![]() | Caution |
---|---|
GT.M associates LOCKs for global names with the database region holding the corresponding unsubscripted global name. Suppose a global called ^EURWest spans multiple regions in multiple global directories, a command like LOCK ^EURWest may not work in the same way as it would do if ^EURWest did not span multiple regions. Before using a command like LOCK ^EURWest where ^EURWest spans multiple regions in multiple directories, ensure that the corresponding unsubscripted ^EURWest map to the same region in all the global directories. Alternatively, you can use LOCK globalname (with no leading up-arrow) and control LOCK interactions with the LOCKS global directory characteristic or use transaction processing to eliminate the use of LOCKs to protect global access. |
The format of the LOG command is:
LOG LOG -ON[=file-name] LOG -OF[F]
GDE> log -on="standard.log"
This command turns on logging of the session and directs the output to standard.log.
The RENAME command allows you to change a namespace, the name of a region, or the name of a segment.
The format of the RENAME command is:
R[ENAME] -G[BLNAME] old-global-name new-global-name R[ENAME] -N[AME] old-name new-name R[ENAME] -R[EGION] old-region-name new-region-name R[ENAME] -S[EGMENT] old-segment-name new-segment-name
The RENAME command requires specification of an object-type and two object-names.
GDE> rename -segment stable table
This command renames segment stable to table and shifts any region mapped to stable so it is mapped to table.
The SETGD command closes out edits on one Global Directory and opens edits on another.
The format of the SETGD command is:
SE[TGD] -F[ILE]=file-name [-Q[UIT]]
GDE> SETGD -f="temp"
This changes the Global Directory being edited to temp. The quotation marks around the file name identifies the name of the file unequivocally to UNIX. If the -f is the final qualifier on the line, then the quotation marks are unnecessary.
The format of the SHOW command is:
SH[OW] SH[OW] -A[LL] SH[OW] -C[OMMAND] -F[ILE]=[gde-command-file] SH[OW] -G[BLNAME] SH[OW] -I[NSTANCE] SH[OW] -M[AP] [-R[EGION]=region-name] SH[OW] -N[AME] [namespace] SH[OW] -R[EGION] [region-name] SH[OW] -S[EGMENT] [segment-name] SH[OW] -T[EMPLATE]
-COMMAND: Displays GDE commands that recreate the current Global Directory state.
-F[ILE]=gde-command-file: Optionally specifies a file to hold the GDE commands produced by -COMMAND. -FILE must must always appear after -COMMAND.
Please consider using command files produced with the SHOW -COMMAND -FILE for creating new regions and segments in a global directory as the defaults come from the templates. If you inadvertently upgrade a global directory, you can use SHOW -COMMAND to create a file of commands that you can input to GDE with the prior GT.M release to recreate the prior global directory file.
SHOW -COMMAND displays the GDE commands for creating names, regions, and segments of the current global directory state in a target environment. However, it does not always include the same template settings (SHOW -TEMPLATE) of the current global directory. SHOW -COMMAND creates an appropriate set of templates that minimize other adjustments to recreate the current global directory. If the current GDE template settings (SHOW -TEMPLATE) are important for your application, you need set them again after applying the commands from GDE SHOW -COMMAND in the target environment.
![]() | Note |
---|---|
When GDE encounters an error while executing the |
-ALL: Displays the entire Global Directory. This qualifier corresponds to displaying "all" sections of the SHOW report:
***TEMPLATES***, ***NAMES***, ***REGIONS***, ***SEGMENTS***, ***MAP***, ***INSTANCE***.
By default, SHOW displays -ALL.
-GBLNAME, -INSTANCE, -MAP, -NAME, -REGION, -SEGMENT, and -TEMPLATE are qualifiers that cause GDE to display selected portions of the Global Directory as follows:
-INSTANCE: Displays the current Instance Mapping, if any. This qualifier corresponds to the section of the SHOW report titled:
***INSTANCE***
-MAP: Displays the current mapping of all names, regions, segments, and files. This qualifier corresponds to the section of the SHOW report titled ***MAP***. The output of a SHOW -MAP may be restricted to a particular region by specifying a -REGION qualifier with a region name argument.
-TEMPLATE: Displays the current region and segment templates. This qualifier corresponds to the section of the SHOW report titled:
***TEMPLATES***
If you want to print the Global Directory, create a log file by executing LOG -ON= before executing the SHOW command. The -LOG command captures all the commands entered and output. You can print the log file if you want a hard copy record.
If you want to export the current Global Directory state, create a GDE command file with the SHOW -COMMAND -FILE=gde-command-file and run it in the target environment.
Example:
GDE>show -template
*** TEMPLATES ***
Std Inst
Def Rec Key Null Null Freeze Qdb Epoch LOCK Auto
Region Coll Size Size Subs Coll Jnl on Err Rndwn Taper AutoDB Stats Crit Del
---------------------------------------------------------------------------------------------------------------------------
<default> 0 256 64 NEVER N N N N Y N Y Sep N
Segment Active Acc Typ Block Alloc Exten Options
------------------------------------------------------------------------------
<default> * BG DYN 4096 100 100 GLOB =1024
LOCK = 40
RES = 0
ENCR = OFF
MSLT =1024
DALL = YES
AIO = OFF
FBWR = 0
<default> MM DYN 4096 100 100 DEFER
LOCK = 40
MSLT =1024
DALL = YES
FBWR = 0
This displays only the TEMPLATES section of the Global Directory.
GDE>SHOW -command TEMPLATE -REGION -NOAUTODB TEMPLATE -REGION -NOAUTODELETE TEMPLATE -REGION -COLLATION_DEFAULT=0 TEMPLATE -REGION -EPOCHTAPER TEMPLATE -REGION -NOINST_FREEZE_ON_ERROR TEMPLATE -REGION -JOURNAL=(ALLOCATION=2048,AUTOSWITCHLIMIT=8386560,BEFORE_IMAGE,BUFFER_SIZE=2312,EXTENSION=2048) TEMPLATE -REGION -KEY_SIZE=64 TEMPLATE -REGION -NOLOCK_CRIT TEMPLATE -REGION -NULL_SUBSCRIPTS=NEVER TEMPLATE -REGION -NOQDBRUNDOWN TEMPLATE -REGION -RECORD_SIZE=256 TEMPLATE -REGION -STATS TEMPLATE -REGION -NOSTDNULLCOLL ! TEMPLATE -REGION -NOJOURNAL ! TEMPLATE -SEGMENT -ACCESS_METHOD=BG TEMPLATE -SEGMENT -ALLOCATION=100 TEMPLATE -SEGMENT -NOASYNCIO TEMPLATE -SEGMENT -BLOCK_SIZE=4096 TEMPLATE -SEGMENT -DEFER_ALLOCATE TEMPLATE -SEGMENT -NOENCRYPTION_FLAG TEMPLATE -SEGMENT -EXTENSION_COUNT=100 TEMPLATE -SEGMENT -FULLBLKWRT=0 TEMPLATE -SEGMENT -GLOBAL_BUFFER_COUNT=1024 TEMPLATE -SEGMENT -LOCK_SPACE=40 TEMPLATE -SEGMENT -MUTEX_SLOTS=1024 TEMPLATE -SEGMENT -RESERVED_BYTES=0 ! TEMPLATE -SEGMENT -ACCESS_METHOD=MM TEMPLATE -SEGMENT -ALLOCATION=100 TEMPLATE -SEGMENT -NOASYNCIO TEMPLATE -SEGMENT -BLOCK_SIZE=4096 TEMPLATE -SEGMENT -DEFER TEMPLATE -SEGMENT -DEFER_ALLOCATE TEMPLATE -SEGMENT -NOENCRYPTION_FLAG TEMPLATE -SEGMENT -EXTENSION_COUNT=100 TEMPLATE -SEGMENT -GLOBAL_BUFFER_COUNT=1024 TEMPLATE -SEGMENT -LOCK_SPACE=40 TEMPLATE -SEGMENT -MUTEX_SLOTS=1024 TEMPLATE -SEGMENT -RESERVED_BYTES=0 ! TEMPLATE -SEGMENT -ACCESS_METHOD=BG ! DELETE -REGION DEFAULT DELETE -SEGMENT DEFAULT ADD -REGION AUSREG -DYNAMIC_SEGMENT=AUSSEG ADD -REGION DEFAULT -DYNAMIC_SEGMENT=DEFAULT ADD -REGION FRREG -DYNAMIC_SEGMENT=FRSEG ADD -REGION POREG -DYNAMIC_SEGMENT=POSEG ADD -REGION UKREG -DYNAMIC_SEGMENT=UKSEG ADD -REGION USSALREG -DYNAMIC_SEGMENT=USSALSEG ADD -REGION USSMZREG -DYNAMIC_SEGMENT=USSMZSEG ! ADD -SEGMENT AUSSEG -FILE_NAME="AUS.dat" ADD -SEGMENT DEFAULT -FILE_NAME="gtm.dat" ADD -SEGMENT FRSEG -FILE_NAME="France.dat" ADD -SEGMENT POSEG -FILE_NAME="Poland.dat" ADD -SEGMENT UKSEG -FILE_NAME="UK.dat" ADD -SEGMENT USSALSEG -FILE_NAME="USSAL.dat" ADD -SEGMENT USSMZSEG -FILE_NAME="USSMZ.dat" ! ADD -GBLNAME EURCentral -COLLATION=1 ! LOCKS -REGION=DEFAULT ADD -NAME Australia -REGION=AUSREG ADD -NAME EURCentral("Poland") -REGION=POREG ADD -NAME EURWest("France") -REGION=FRREG ADD -NAME EURWest("UK") -REGION=UKREG ADD -NAME US("South","a":"m") -REGION=USSALREG ADD -NAME US("South","m":"{") -REGION=USSMZREG !
This command displays the GDE commands to recreate the spanning region example described in the Introduction section.
The format of the TEMPLATE command is:
T[EMPLATE] -R[EGION] [-REGION-qualifier...] T[EMPLATE] -S[EGMENT] [-SEGMENT-qualifier...]
The TEMPLATE command requires specification of an object-type.
GDE> template -segment -allocation=200000
This command modifies the segment template so that any segments ADDed after this time produce database files with an ALLOCATION of 200,000 GDS blocks.
The format of the VERIFY command is:
V[ERIFY] V[ERIFY] -A[LL] V[ERIFY] -G[BLNAME] V[ERIFY] -M[AP] V[ERIFY] -N[AME] [namespace] V[ERIFY] -R[EGION] [region-name] V[ERIFY] -S[EGMENT] [segment-name] V[ERIFY] -T[EMPLATE]
The object-type is optional. -MAP, -TEMPLATE, and -ALL are special qualifiers used as follows:
VERIFY with no qualifier, VERIFY -MAP, and VERIFY -ALL each check all current information.
GDE> verify -region regis