MUMPS(1) User Commands MUMPS(1) NAME Mumps Sqlite3 Database Initializer SYNOPSIS mumps-sql-db-create DESCRIPTION Creates and initializes the Mumps Sqlite3 database. Any existing database is deleted. The name of the databse will normally be mumps.sqlite but this can be changed by a configure option. The database will be initialized by default to hold global arrays with up to eight indices of up to 64 characters each with a data item up to 128 characters in length. These values can be changed by configure options. The database will have a page size of 4096. The default database journal_mode will be set to MEMORY (other options include DELETE, TRUNCATE, PERSIST, and OFF). The default can be changed by an option to configure. By default, the database is stored on disk. A memory resident (transient) database can be created by an option to configure. DATABASE The database once created may be accessed by multiple instances of the mumps interpreter. Each instance of mumps looks for the database in the directory current when the interpreter was invoked. For a database shared among multiple instances started from multiple directories, create one instance of the database in one directory (need not be a directory from which a mumps instance was started). Then in other directories, make a soft link to the directory containg the main mumps.sqlite database. For example: ln -s ~/Desktop/mumps.sqlite mumps.sqlite The above creates a link named mumps.sqlite in the current directory to a real file named mumps.sqlite in the users Desktop directory. Multiple links in multiple directories may point to the same file. The Sqlite3 database can be accessed through Sqlite3 by the command sqlite3 mumps.sqlite assuming the default database name has not been altered. Standard Sqlite3 and SQL command my be used to search, alter, or modify the database. By default, the clobal array names are in column a1. The indices of the array are stored in columns a2 through a9 and the data stored, if any, is in column a10. So, in a global array created with: for i=1:1:10000 set ^a(i)=i the SQL command to see the data from array elements ^a(9000) to ^a(9010) would be: sqlite> .separator " " sqlite> select "^",a1,"(",a2,") =",a10 from mumps where cast (a2 as integer) >= 9000 and cast (a2 as integer) <= 9010; ^ a ( 9000 ) = 9000 ^ a ( 9001 ) = 9001 ^ a ( 9002 ) = 9002 ^ a ( 9003 ) = 9003 ^ a ( 9004 ) = 9004 ^ a ( 9005 ) = 9005 ^ a ( 9006 ) = 9006 ^ a ( 9007 ) = 9007 ^ a ( 9008 ) = 9008 ^ a ( 9009 ) = 9009 ^ a ( 9010 ) = 9010 sqlite> Note: By default, this version of mumps stores numbers as character strings so conversion is necessary when numeric ranges are used. The Sqlite3 command decoration. RELATED COMMANDS mumps sqlite3 FILES Files installed associated with mumps are: /share/man/man7/mumps-doc.7.gz /share/man/man7/mumps-sql-db-create.1.gz /share/man/man1/mumps.1.gz /include/mumpsc/*.h /lib/libmpscpp.a /lib/libmumps.a /lib/libmpsglobal_native.a /bin/mumps2c /bin/mumps-sql-db-create.script /bin/mumpslib /bin/mumpsc /bin/mumps AUTHOR Written by Kevin C. O'Kane. REPORTING BUGS Online help: SGR coreutils 1.0 April 2025 MUMPS(1)