MiniM. Saving time.

| About | Download | Tools | Knowledge Base | How to Buy |

MiniM Overview

Getting Started




Cache Tools

GT.M Tools

Knowledge Base




MiniM Knowledge Base | Dec 15, 2010

Global export file formats

MiniM Database Server supports export and import globals in the portable file formats. These are the following 4 formats:

  • Cache Stream
  • MSM Stream
  • Cache Variable Length
  • MSM Variable Length

Global's data can be exported by console utility

d ^%GO
as such as MiniM Control Center and MiniM Routine Editor. Console utility ^%GO exports global's data into the file specified on the server with MiniM Database Server but MiniM Control Center and MiniM Routine Editor into the file specified on the client's computer.

File formats are oriented to save pairs of name + value with subscripts and formats are distinquished by the details of this export. The name of global is used in the form returned by the $query() function, data are stored in the string representation. Subscripts can contain additional quotes if this need and doubled quotes in the subscripts values.

Stream formats store pairs of key-value as the text strings, so does not recommended save globals with nonprintable characters such as line feed characters into stream formats.

Variable length record file formats use special length indicators for both name and value, so these formats can store any characters including nonprintable.

Global save formats also contains strings-terminators of export one global and terminators of all export and additional headers. Formats are differs only by store details.

Cache Stream

File with Cache stream format is threated as a text file and line feed characters are used as string terminators. First two lines contains export header. These two lines can contain any information and can be an empty lines, but these lines are reguired. In most cases first header lines contains common export information - date, time, operator's comment and other.

After header file contain one by one pairs with name with subscripts and value.

After all pairs file contains file export terminator as two empty lines. File does not contain each global export terminators.

All file content after export terminators, if one is present, is fully ignored.

MSM Stream

This format also is text file and first two lines are header with optional content.

After header follows one by one pairs of global name with subscripts and assosiated value.

After one global export file contains global export terminator as two strings of


Global export terminator must be present if all subscripts of current global are exported. After global export terminator can follow next global of file export terminator. Each global export must contain global export terminator.

File export terminator is two lines of


All file content after file export terminators is fully ignored even if present.

Cache Variable Length & MSM Variable Length

Variable length records file formats have the same structure as stream (text) formats and differs by string encoding. Stream formats use string terminators but variable length formats use special prefix with length of the following part. Length prefix is encoded as two binary bytes with Intel byte order. To make this two bytes MiniM Database Server uses $zwc(length) function.

Lenght prefixes are used for each records - for first two strings of the file header, for global name with subscripts, for values, for global export terminators and for file export terminators.

All file content after export terminators is fully ignored even if one is present.

File formats for global export are fixed and documented, so these files can be created by different software, including different MUMPS implementations or other application programs. These file formats can be used not only to import data into MiniM Database Server, but to import into other MUMPS implementations.

Eugene Karataev

Copyright (C) Eugene Karataev
Info Support