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.
The System Monitor can be accessed in several ways:
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.
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 0my_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"]] ]
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.
This section defines the intrinsic System Monitor commands available. These are:
Name | Description |
---|---|
ABOUT | Displays 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. |
LOGTO | Closes 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:
This command displays the following information in the results area:
E.g.
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:
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:
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:
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:
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.
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:
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
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:
E.g. List all entites in the EXAMPLES application:
E.g. List all STPROC entities in the EXAMPLES application:
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:
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.
This command shuts down the Presentation Server, closing the application.
Same as the LO command.
Same as the OFF command.
Same as the CFG command.
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:
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:
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: