Skip to main content

Terminal

Launch IRIS Terminal

In order to begin practicing using ObjectScript, you need to start the Terminal. Click the InterSystems IRIS launcherIRIS Launcherin the task bar and select Terminal from the menu, and authenticate if necessary (try SuperUser/SYS for Username/Password). This brings up the Terminal window, and you can see from the prompt that you are in the USER namespace. Namespaces are logical directories within InterSystems IRIS, containing code and globals (data).

The Terminal allows you to type one or more ObjectScript commands on a single line (the Terminal does not support multiline input) and see the results immediately. In this tutorial, most pages will contain one or two simulated Terminal sessions like the one below demonstrating several examples mentioned in the text. Using VS Code - ObjectScript, you can create your own class definition, and copy and paste any example code into a method, and compile the class. Then you can run the examples yourself from the Terminal.

When you first start the Terminal, you will be in the USER namespace. There are several ways to change to another namespace. You can use do ^%CD, set $namespace = "namespace", or znspace "namespace" (usually abbreviated zn "namespace"). During the tutorial, you'll work in the USER namespace.

Terminal


USER>do ^%CD

Namespace: %SYS
You're in namespace %SYS
Default directory is c:\InterSystems\IRIS\mgr\
%SYS>set $namespace = "USER"

USER>zn "%SYS"

%SYS>do ^%CD

Namespace: ?

    '?' for help.
    '@' (at-sign) to edit the default, the last namespace
        name attempted.  Edit the line just as if it were
        a line of code.
    <RETURN> will leave you in the current namespace.
Here are the defined namespaces:
     %SYS
     USER

Namespace: USER
You're in namespace USER
Default directory is c:\InterSystems\IRIS\mgr\user\
USER>
Feedback