The following illustration describes the internal GDS B*-tree framework GT.M uses to store globals.
![]() | Important |
---|---|
GVTs continue to exist even after all nodes associated with their unsubscripted name are KILLed. An empty GVT occupies negligible space and does not affect GT.M performance. However, if you are facing performance issues because you have many empty GVTs, you need to reorganize your database file using MUPIP EXTRACT, followed by MUPIP CREATE, and the MUPIP LOAD to remove those empty GVTs. |
The following sections describe the details of the database structures.
![]() | Note |
---|---|
Depending on the platform an extra byte may be added to the compression count, allowing compression counts of up to 1020. |
The interpreted form of a block with global ^A("Name",1)="Brad"
looks like the following:
Rec:1 Blk 3 Off 10 Size 14 Cmpc 0 Key ^A("Name",1) 10 : | 14 0 0 61 41 0 FF 4E 61 6D 65 0 BF 11 0 0 42 72 61 64| | . . . a A . . N a m e . . . . . B r a d|
![]() | Note |
---|---|
If the destination database's block size is large enough to hold the key and value, then the global is not a spanning node (because it can fit in one database block). |
A key is an internal representation of a global variable name. A byte-by-byte comparison of two keys conforms to the collating sequence defined for global variable nodes. The default collating sequence is the one specified by the M standard. For more information on defining collating sequences, see the "Internationalization" chapter in the GT.M Programmer's Guide.
RECORD KEY |
COMPRESSION COUNT |
RESULTING KEY in Record |
---|---|---|
CUS(Jones,Tom) |
0 |
CUS(Jones,Tom) |
CUS(Jones,Vic) |
10 |
Vic) |
CUS(Jones,Sally) |
10 |
Sally) |
CUS(Smith,John) |
4 |
Smith,John) |
Block 3 Size 24 Level 0 TN 1 V7 Rec:1 Blk 3 Off 10 Size 14 Cmpc 0 Key ^A("Name",1) 10 : | 14 0 0 0 41 0 FF 4E 61 6D 65 0 BF 11 0 0 42 72 61 64| | . . . . A . . N a m e . . . . . B r a d|
All codes except 00
and 01
represent the corresponding ASCII value.
01
is an indicator to translate the next code using the following:
Code |
Means |
ASCII |
---|---|---|
01 |
00 |
<NUL> |
02 |
01 |
<SOH> |
Rec:1 Blk 3 Off 10 Size C Cmpc 0 Key ^DS 10 : | C 0 0 0 44 53 0 0 E0 A4 85 C0 | | . . . . D S . . ? . |
Numeric subscripts have the format:
[ sign bit ] [ biased exponent ] [ normalized mantissa ]
Zero (0) subscript (special case)
Rec:1 Blk 5 Off 10 Size 1A Cmpc 0 Key ^NAME(.12,0,"STR",-34.56) 10 : | 1A 0 0 61 4E 41 4D 45 0 BE 13 0 80 0 FF 53 54 52 0 3F| | . . . a N A M E . . . . . . . S T R . ?| 24 : | CA A8 FF 0 0 31 | | . . . . . 1 |
Similarly, the interpreted representation of ^NAME(.12,0,"STR",-34.567)
looks like the following:
Rec:1 Blk 5 Off 10 Size 1B Cmpc 0 Key ^NAME(.12,0,"STR",-34.567) 10 : | 1B 0 0 9 4E 41 4D 45 0 BE 13 0 80 0 FF 53 54 52 0 3F| | . . . . N A M E . . . . . . . S T R . ?| 24 : | CA A8 8E FF 0 0 32 | | . . . . . . 2 |