Skip to main content

Available Shells

In the ObjectScript shell, you can start and use other shells that enable you to query data or run code in various ways. You can also start and use operating-system shells.

Python Shell

To start the Python shell, enter the following command:

do ##class(%SYS.Python).Shell()

The prompt then becomes >>>

Then you can enter Python commands and see their results.

To exit this shell, enter the command quit() (not case-sensitive).

For more information, see From the Python Shell.

SQL Shell

To start the SQL shell, enter the following command:

Do $SYSTEM.SQL.Shell()

The prompt then changes to indicate that you are running within the SQL Shell. Specifically the [SQL] prefix is added and a trailing > is added. For example:

[SQL]USER>>

Then you can enter SQL queries and see their results.

Note:

The Ctrl+c command (normally used for interruption) is disabled within the SQL shell.

To exit this shell, enter q or quit (not case-sensitive).

For more information, including details on multi-line mode and specifying an SQL dialect, see Using the SQL Shell Interface.

TSQL Shell

To start the TSQL Shell, enter the following command:

Do $system.SQL.TSQLShell()

The prompt then changes to indicate that you are running within the TSQL Shell. Specifically a trailing > is added.

Then you can enter Transact-SQL queries and see their results. You can use either the MSSQL or the Sybase dialect.

To exit this shell, enter q or quit (not case-sensitive).

For more information, see Working with TSQL Using SQL.

MDX Shell

To start the MDX shell, enter the following command:

Do ##class(%DeepSee.Utils).%Shell()

The prompt then becomes >>

Then you can enter MDX queries and see their results.

To exit this shell, enter q or quit (not case-sensitive).

For more information, see MDX Shell.

Operating-System Shells

In the ObjectScript shell, you can also open your default operating-system shell. To do so, type ! or $ and press Enter. The prompt then shows the working directory. For example:

USER>!
 
c:\intersystems\iris\mgr\user\>
Note:

On Macintosh, you cannot open the C-shell this way; you receive a permission denied error. You can, however, use other shells (Bash, Bourne, or Korn).

To exit the shell, use the quit or exit command as appropriate for the shell.

FeedbackOpens in a new tab