Table of Contents

The System Monitor is a useful tool that allows a direct command-line interface into the Presentation Server. As well as allowing you to execute specific Basic+ stored procedures it also supports a set of intrinsic commands that expose common tasks too.

Opening the System Monitor

The System Monitor can be accessed in several ways:

  1. By setting the "SM" command line switch to "1" when starting the Presentation Server.
  2. By setting the "showMonitor" value to "1" in the RXI file when starting the Presentation Server.
  3. By selecting the "System Monitor" item from the IDE "View" menu.
  4. By using the Ctrl-F5 shortcut key combination in the IDE.
  5. By using the SYSTEMMONITOR VISIBLE property with the Set_Property function in a Basic+ program at runtime.

When opened the System Monitor presents a simple interface consisting of a command line at the top and a read-only text box that displays the results of any executed commands:

The System monitor remembers its position between sessions by storing the window placement data in the registry when it is closed.

Executing System Monitor commands

Using the tool is simple: enter the statement in the command line and press the "Enter" key to execute it.

Some things to bear in mind when using the command line are:

<appid> "*" <userid> "*PS_COMMANDSTACK"

E.g.

EXAMPLES*DAFFYDUCK*PS_COMMANDSTACK
my_test_proc patient_data 100 0
my_test_proc patient_data, 100, 0 
my_test_proc "some parameter"
my_test_proc "something else's"
my_test_proc 'something "quoted" string'
my_test_proc "" param2 "" "Parameter 4"
my_test_proc "", param2, "", "Parameter 4"

E.g. This command will set the control's text using an upper case string:

sp mywindow.edl_surname text "Duck"


While this command will preserve the mixed-case:

_sp mywindow.edl_surname text "Duck"
sp mywindow.lst_ids list ["Item One","Item 2","Item 3"]
sp mywindow.edt_ids array [["Item One","Item 2","Item 3"]]
sp mywindow.edl_name font [[["Courier New", -13, 400]]]

This delimiter notation may be combined to pass parameters with more than one delimiter,

e.g. for an EditTable ARRAY property:

sp mywin.tbl_1 array [ [["Cell 1,1","Cell 2,1"]],[["Cell 2,1","Cell 2,2"]] ]

Command results

If the command returns any results, they appear in the text area at the bottom of the window. Programs executed from the System Monitor command line may also update the results area by using the Basic+ Send_Dyn function.

System Monitor commands

This section defines the intrinsic System Monitor commands available. These are:

Name Description
ABOUTDisplays version and licensing information.
CFG Displays information extracted from the RXI file.
CLL Clears the list of previously executed commands.
CLS Clears the results.
CMD Opens a Windows Command Prompt.
DLG Executes a form using the Dialog_Box function.
EM Executes the Exec_Method function.
EXEC Executes a form using the Start_Window function.
EVAL Executes Basic+ statements.
GC Issues a GarbageCollect operation and purges cached data.
GP Executes the Get_Property function.
IDT Displays a date in internal format.
LE Excutes the Get_Repos_Entities function to return a list of matching repository entities.
LIST Executes an RLIST “LIST” statement.
LO Executes the SYSTEM OBJECTLIST method.
LOGTOCloses the current application and opens another one.
OFF Shuts down the Presentation Server.
QUIT Synonym for the OFF command.
RUN Executes the specified Basic+ stored procedure.
RXI Synonym for the CFG command.
SHL Execute the Windows ShellExecute function to open a document or run another Windows program.
SP Executes the Set_Property function.
STOP Closes a specified window, or all windows.

Any other commands entered are treated as the name of a Basic+ stored procedure and the System Monitor will try to execute them as such.

E.g. Executing the LIST_KEYS stored procedure for the CUST table, sorting by the LNAME and FNAME columns:

ABOUT

This command displays the following information in the results area:

E.g.

CFG

This command displays the raw configuration data extracted from the RXI file.

E.g.

CLL

This command clears the saved list of previously executed commands.

E.g.

CLS

This command clears the results area.

E.g.

CMD

This command opens a Windows Command Prompt.

E.g.

DLG

This command executes a form using the Dialog_Box stored procedure. The parameters passed are the same as for calling Dialog_Box in Basic+.

E.g.

Launch the RTI_IDE_OPEN_RECORD dialog box using RTI_IDE as the parent window and setting a mode of 1 and a table name of SYSREPOSCLASSES in the "CreateParam" parameter:

EM

This command executes the Exec_Method procedure to invoke an object's method. The parameters passed are the same as for calling Exec_Method in Basic+.

E.g. Deleting the 10th row in an edit table:

EVAL

This command compiles and executes a Basic+ statement. Multiple statements should be delimited by a ";" character.

E.g.

Display a message box displaying the current date in internal format:

EXEC

This command executes a form using the Start_Window stored procedure. The parameters passed are the same as for calling Start_Window in Basic+.

E.g.

Launch the PS_OPENAPP window with a null parent window and setting an Application ID of "EXAMPLES" and a Username of "A_USER" in the "CreateParam" parameter:

GC

This command executes a garbage collect instruction and executes the RTI_Purge_All stored procedure to clear out a range of cached system and IDE data.

GP

This command executes the Get_Property procedure to return the value of an object property. The parameters passed are the same as for calling Get_Property in Basic+.

E.g. Get the TEXT property of the RTI_IDE window:

IDT

This command returns the internal format for a specified date, or if no date is specified the current date is used instead. The conversion is performed using the "D" format specifier for the Iconv operation, unless an "E" parameter is passed, in which case the "DE" format specifier is used instead.

E.g. Return the current date in internal format:

E.g. Return a specific date in internal format using the "D" format specifier

E.g Return a specific date in internal format using the "DE" format specifier

LE

This command returns a list of Repository entities matching the passed criteria by executing the GET_REPOS_ENTITIES stored procedure. The parameters passed are the same as for the stored procedure.

E.g. List all entities in the system:

Graphical user interface, text, application, Word Description automatically generated

E.g. List all entites in the EXAMPLES application:

Graphical user interface, text, application, Word Description automatically generated

E.g. List all STPROC entities in the EXAMPLES application:

Graphical user interface, text, application, Word Description automatically generated

LIST

This command executes an Rlist “LIST” statement and displays the results in the System Monitor:

Graphical user interface, text, application Description automatically generated

LO

This command returns a list of objects matching the passed criteria by executing the SYSTEM OBJECTLIST method. The parameters passed are the same as for the OBJECTLIST method.

E.g. List all objects in the system:

E.g. List all WINDOW types in the system:

E.g list all objects that are children of a specified window:

LOGTO

This command allows you to close the current application and open another one. The parameters that can be passed are the application ID, username, and password. If any of these arguments are incorrect or missing the system login dialog will be presented to allow for any corrections.

OFF

This command shuts down the Presentation Server, closing the application.

OL

Same as the LO command.

QUIT

Same as the OFF command.

RXI

Same as the CFG command.

SHL

This command calls the Windows ShellExecute method to execute an external program or load a document. It can take two parameters: the name of program/document to load (required), and optionally any command line arguments that need to be passed.

E.g. Open the Windows Explorer in the c:\temp folder:

SP

This command executes the Set_Property procedure to set the value of an object property. The parameters passed are the same as for calling Set_Property in Basic+.

E.g. Set the TEXT property of the RTI_IDE window ensuring case is respected:

STOP

This command closes a specified PS window, or all PS windows. Any window closed by the STOP command will not fire a CLOSE event, therefore doing this may leave "dangling" record locks in the case of data entry windows and so on, as no system cleanup code is executed.

To close a specific window simply pass the ID of the window as the first parameter to the STOP command.

E.g Terminate the RTI_IDE window:

To close all windows do not pass any parameters to STOP.

E.g. Terminate all PS windows: