Command Line
  • 26 Apr 2024
  • 4 Minutes to read
  • Contributors
  • Dark
    Light

Command Line

  • Dark
    Light

Article summary

Command Line Interface

Using the MetaManagerTM command line interface, users can integrate MetaManagerTM with external scheduling packages that initiate MetaManagerTM processes. Users can use the command line interface to issue MetaManagerTM commands from:

  • A DOS prompt

  • A .bat file

  • Drag and drop of the .mmx to the ControlPanel.exe

  • A right-click context menu

Using the command line interface, users can access all of the product modules.

In addition, the same .mmx files created for command line purpose can be opened through any of the modules in the MetaManagerTM user interface. Refer to the Save and Open buttons in any of the MetaManagerTM module documentation for more information.

Running Command Line Using MetaManagerTM

The Graphical User Interface (GUI) for MetaManagerTM is launched through the ControlPanel.exe executable. Generally, this executable is accessed through the Windows Start Menu >> All Programs >> BSP >> MetaManager >> MetaManager.

NOTE: When using Command Line for Script Runner please refer to the Script Runner Section in Chapter 11.

As well, the ControlPanel.exe is used to launch MetaManagerTM functionality through command line. By passing information to the ControlPanel.exe in the form of an MMX file created from any of the MetaManagerTM modules, users can accomplish many of the same capabilities from MetaManagerTM with the ability to schedule the actions in off hours or in sequence.

To begin using the command line mode of MetaManagerTM, you must:

  1. Generate the desired MMX file from any of the product modules by populating the applicable user interface options and selecting the save button on the module toolbar.

  2. Locate the MMX file on your file system or network share drive.

Executing MetaManagerTM from the DOS Prompt

In order to run the command line for MetaManagerTM via the DOS prompt, you must:

  1. Open a command line Window.

    1. Start > Run > cmd.exe

  2. At the DOS prompt, enter the following syntax:

<INSTALL LOCATION>\ControlPanel.exe -run -f=<MMX FILE LOCATION>\FILENAME.mmx

For example:
“C:\Program Files\BSP\MetaManager\ControlPanel.exe” -run -f=”c:\ filename.mmx”

Executing MetaManagerTM from a Batch File

A batch mode execution executes a predefined sequence of commands stored as a text file with the extension .BAT. In order to run the command line for MetaManagerTM via a batch file, you must:

  1. Open a text editor such as Notepad.exe.

  2. Enter the commands you wish to run in sequence when the batch file is executed. For example:

REM This is the batch file contents C: REM Change directories to the installation location of MetaManagerTM cd C:\Program Files\BSP\MetaManagerTM\ REM Execute the command line processing. Note the .mmx in this example REM is in the same location as the MetaManagerTM installation files. ControlPanel.exe -run -f=”c:\filename.mmx” REM Exit the batch processing exit

  1. Save the file with an extension of .bat (not .txt).

  2. Double-click the batch file to execute the command line processing or use a scheduling tool to determine when the batch file should be executed.

NOTE: The batch file method can be useful in scheduling the execution using any commercial scheduling tool or Windows Scheduler.

Command Line Notes

To determine if command line processing is complete:

  1. If you run the processing from a command prompt, you will know that the task is complete once the prompt re-appears.

  2. If you run the processing by double-clicking a .bat file containing the appropriate syntax, you will notice that the task is complete once batch window closes.

Command Line Switches

Various commands can be passed in on the ControlPanel.exe command line:

-open

Specifies that the –f file should be opened in MetaManagerTM in interactive mode.

-run

Specifies that the –f file should be run in MetaManagerTM in command line mode.

-f=”filename

Specifies the .mmx file to open or run.

-o=”filename

Specifies the name and location of the output results xml file. If this parameter is omitted a file in the same location of the mmx file with be created with the same name of the mxx file but with a .xml extension.

-hd=”domain

Specifies the HTTP Domain to be used for HTTP Basic Security (used in conjunction with –hu and –hp)

-hu=”username

Specifies the HTTP Username to be used for HTTP Basic Security.

-hp=”password

Specifies the HTTP Password to be used for HTTP Basic Security.

-n

Specifies a Cognos Namespace to log into before processing. Only a single namespace can be used on the command line. To log into multiple namespaces, create a connection in interactive mode and save multiple logon credentials.

-u

Specifies the Username to use when logging into the –n namespace.

-p

Specifies the Password to use when logging into the –n namespace.

-d

Specifies that a dataset file should be created when processing is complete. The name of the dataset file will be the same as the input mmx file with “_dataset.xml” appended to the end of the filename.

-d=”filename

Specifies that a dataset file should be created when processing is complete. The name and location of the dataset file is supplied as filename. This is useful when the dataset file is being used as a datasource and running MetaManagerTM should update the dataset file that Cognos is pointing to.

Command Line Output as an IBM Cognos 8 Data Set

Through any method of running MetaManagerTM in command line mode, the results of the processing are saved in an XML format suitable for use as an IBM Cognos 8 data set. The file will be saved in the same location as the .mmx file used to process.

See the Appendix for information on setting up the XML output as a data source in IBM Cognos 8.


What's Next