Using the MultiValue Features of Caché
Starting MultiValue
[Back] [Next]
Go to:

There are two principal paths to accessing the Caché MultiValue shell: via a built-in terminal emulator (on Windows systems only), or via a telnet connection.

Connecting Via the Caché Terminal on Windows
Once Caché is installed and operational, you can run the MultiValue shell via a Caché terminal session. To do this:
Starting a Terminal Session
Click on the Caché icon in the System tray. Choose Terminal from the menu displayed. A new terminal session starts and displays a window in which to enter commands. Depending on the security level of your Caché installation, you may have to enter your username and password to get to the “USER>” prompt where you can begin entering commands.
Connecting to Caché Via Telnet
The MultiValue shell can also be run via a telnet connection using your favorite terminal emulator. By default, Caché is installed with its telnet capability disabled; the instructions to enable telnet are given in the appendix.
Starting the MV Shell
Regardless of how you connect to Caché, in the terminal window at the “USER>” prompt enter the command:
followed by ENTER.
If this is the first invocation of MV, it will perform some initialization. For example, MV will create the SYSPROG and USER accounts automatically. Once initialization is complete, MV displays the Caché version number and date of installation, a message indication how the MultiValue Shell handles two-digit years, and then the colon (:) prompt. For further details, refer to the MV command in the Caché ObjectScript Reference.
Invoking the MultiValue Shell causes Caché to search the VOC for items in the following order: an item with the same name as the user, an item with the same name as the account, or an item named “LOGIN”. The MultiValue Shell runs the first of these items that it encounters.
You may begin working in the default account just set up. Or, you may create one or more other accounts using the MultiValue CREATE.ACCOUNT command, specifying which MultiValue flavor you wish to use, for example,
where <flavor> is the name of the flavor (emulation type) to use as the default for all processes accessing that account. The complete list of available flavors is in the Appendix A.
Exploring MultiValue on Caché
Once the shell is running, you may explore the MultiValue environment. Other documents will help you import your applications and data, as well as expand your capabilities to include the features that Caché provides.
The Q command causes the current terminal process to exit the MV Shell. Once you exit the MV Shell, you are returned to the Caché mode prompt of your terminal or telnet session. To finish a session, you should QUIT from your telnet session, or issue the HALT command if you are in a Caché terminal session.
Importing Data and Programs into Caché
At present, Caché provides support for importing backups made on UniVerse, D3, jBASE, Reality, MVBase, and POWER95 systems. For other MultiValue systems, InterSystems provides example export and import programs that can be modified as needed by the user to transfer the relevant data to Caché.
There is an implicit assumption that importing applications and/or data is an administrative function that should be done under the SYSPROG account. From the MV Shell you can LOGTO the SYSPROG account, then enter the command:
MVIMPORT   <BackupFilePath>
where BackupFilePath is the location of the backup file. It must be supplied in machine-specific format. For example, on a Windows system it would be something like:
MVIMPORT   C:\MVTEST\Acct_Main\Backup.uvb
MVIMPORT will read the backup file, create the necessary dictionary and files entries, and store the programs and data there. The MVIMPORT command is described in the MVIMPORT chapter of the Caché MultiValue Commands Reference. Also see the Operational Differences between MultiValue and Caché document for details on MVIMPORT.
Notes on the MV Shell
This section provides additional information related to interacting with Caché from the MV shell.
Issuing MVBasic Commands in the Shell
The MV shell provides the ability to execute MVBasic commands directly by preceding them with a semicolon. For example,
; PRINT  "Hello, World"
will result in “Hello, World” being echoed to the terminal window.
For further details, refer to the Caché MultiValue Basic Reference.
Issuing Caché ObjectScript Commands from MV
The MV shell provides a way to issue ObjectScript commands without having to terminate shell operation. The COS command sends the remainder of its line to Caché for execution. For example, at the MV prompt, the command:
COS WRITE "Hello, World", !
writes the expected string to the output device followed by a newline. Since multiple Caché commands may be placed on a line (separated by single blank spaces), a single invocation of COS may execute multiple Caché commands.
The left square bracket “[” command is a synonym for COS.
Command History Editor
Within the MV Shell, it is possible to recall previously entered commands, perform simple edit operations on them and submit the edited version as a new command. This is similar to the functionality provided by the UniVerse TCL stacker. All the commands that operate in this fashion begin with a period (.). The available commands are:
Command Description
.A{nn} string Append the characters of string to the end of stack number 'nn'
.C{nn}/From/To Change “From” to “To” in string 'nn'
.DNN{-mm} Delete stack 'nn (possibly through stack 'mm')
.L{nn} Display the last 'nn' lines of the stack
.U{nn{-mm}} Convert stack 'nn' (through stack 'mm') to uppercase
.X{nn{-mm}} Execute stack 'nn' (through 'mm')
.? Display a summary of the available commands
For further details, refer to the MultiValue Command Stack Commands chapter of the Caché MultiValue Commands Reference.
Starting Directly In the MV Shell
Caché provides the capability for an MV user to start up in the MV shell. This is done by modifying the definition of the user to specify a namespace and initial routine that will be executed when the login is complete.
In order to modify the definition of a user, you must be an administrator. That is, you must be a member of a role that has %Admin_Secure or %All privileges. If you installed Caché using the “Minimal” security setting as directed, you should automatically have the proper permission.
If you have the proper authorization, you can modify the user definition via the Management Portal page [Home] > [Security Management] > [Users]. Select the user you wish to modify and select the “Edit” option. When the Edit User, page appears, fill in the Default Namespace text box with the namespace you wish the user to be in when the MV shell starts. Enter “^%SYS.MV” into the Default Tag^Routine box as the initial Caché command to be executed when login succeeds.