guides:oi10:presentation_server_model:020_the_system_monitor

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:

  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.

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:

  • An auto-complete mechanism is attached to the command line that includes the last 100 commands executed. This list can be shown by clicking the down-arrow button next to the command line, or the system will show matching items as you type.
    • This list is saved to the SYSLISTS table between sessions using a key structure of:
<appid> "*" <userid> "*PS_COMMANDSTACK"

E.g.

EXAMPLES*DAFFYDUCK*PS_COMMANDSTACK
  • Parameters passed to the command may be separated by spaces or by commas. E.g. the following two commands are equivalent:
my_test_proc patient_data 100 0
my_test_proc patient_data, 100, 0 
  • If a parameter includes spaces then it may be enclosed by matching quotes (single or double) instead:
my_test_proc "some parameter"
my_test_proc "something else's"
my_test_proc 'something "quoted" string'
  • If you wish to pass a null value for a parameter simply pass an empty quoted string like so:
my_test_proc "" param2 "" "Parameter 4"
my_test_proc "", param2, "", "Parameter 4"
  • All text in the command line is converted to upper-case before it is executed. This includes any quoted text unless the command is prefixed with a "_" character to preserve it.

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"
  • If you wish to pass system delimiters to the command you can do so using a comma to replace the delimiter and using one or more matching sets of nested enclosing brackets ("[" and "]") to indicate which delimiter the comma represents.
    • For an @fm delimiter use a single set of brackets like so:
sp mywindow.lst_ids list ["Item One","Item 2","Item 3"]
  • For an @vm delimiter use a double set of nested brackets like so:
sp mywindow.edt_ids array [["Item One","Item 2","Item 3"]]
  • For an @svm delimiter use a triple set of nested brackets like so:
sp mywindow.edl_name font [[["Courier New", -13, 400]]]
  • … and so on down to @stm.

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"]] ]
  • You may specify a previously executed command by entering a "." followed immediately by the index of the command in the saved list. For example, entering ".1" retrieves the last command entered, ".2" retrieves the command before that and so on.

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
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:

This command displays the following information in the results area:

  • Product version
  • File version
  • Current directory
  • Application ID
  • User name
  • Serial number
  • Maximum licensed users
  • Development System Flag
  • Engine Window Handle
  • A flag denoting if the Presentation Server is a 64-bit version
  • A flag denoting if the operating system is 64-bit.

E.g.

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

E.g.

This command clears the saved list of previously executed commands.

E.g.

This command clears the results area.

E.g.

This command opens a Windows Command Prompt.

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:

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

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

Graphical user interface, text, application Description automatically generated

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:

  • guides/oi10/presentation_server_model/020_the_system_monitor.txt
  • Last modified: 2024/03/29 13:28
  • by 127.0.0.1