About the CATBatchStarter Command

 

Overview

If you already have an XML file containing all the necessary inputs, you can use this parameter file to run a batch without having to access the batch interface, i.e. from the command line.

The CATBatchStarter command lets you run a batch via the command line with a list of options, just like you do it with the CATUTIL command. Using CATBatchStarter or CATUTIL for running a batch gives the same result.

The main difference between these two commands is that CATBatchStarter lets you add a list of options whereas CATUTIL lets you use the -Name option only.

Options

Below are detailed the various options you can use when running CATBatchStarter:

-input specifies the name and path of the XML parameter file.
-host used when running a batch in remote mode to specify the name of the remote computer. Using this option implies that the parameter file contains the license information, otherwise the batch execution fails. Note that:
  • a batch monitor server process must run in the remote computer
  • the default environment used to run the batch is the batch monitor server process environment
  • the settings used to run the batch are those referenced by the batch monitor server process environment
  • if Version 5 documents are uploaded, created or modified on the remote computer, the links between documents are not kept
  • if Version 5 documents are accessed through the network by the remote machine, these documents and all their pointed documents used by the batch must be visible and accessible by the remote computer
-driver specifies the communication driver. By default, the backbone driver (BB) is used but you can used a MQ driver. When running the batch in local mode (i.e. no -host option), the communication driver is always BB and in that case, the -driver option is ignored. For more information, see Running Batches in Remote Mode
-output specifies the directory where the batch log is stored. By default, it is stored in c:\temp (on Windows) or /temp (on UNIX)
-verbose displays information about the batch execution in the standard output
-h displays a short help message
-allow_visu lets you run batches requiring a graphic adapter. If you try to run a batch requiring a graphic adapter without this option, the return code "7" is issued

Not all these options are mandatory but if you want to use them all, the command line should look like this:

CATBatchStarter -input [parameterfile] [-host hostname] [-driver MQ/BB] [-output directory] [-verbose] [-h] [-allow_visu]

 

Running CATBatchStarter

  1. Access the default installation folder:

    C:\Program Files\Dassault Systemes\Bn\OS_a\code\bin  (on Windows)

    or

    /usr/DassaultSystemes/Bn/OS_a/code/command/  (on UNIX)

    (where n is the current release number)

  2. Run the following command (this scenario uses two options but you can use more if needed):

    CATBatchStarter -input xml_file  -output folder (on Windows)

    or 

    ./catstart -run "CATBatchStarter -input xml_file -output folder"  (on UNIX)

    where xml_file is the path and name of the XML file and folder is the output's storage location.

    For instance:

    CATBatchStarter -input e:\users\my_parameters.xml -output e:\users\output

  3. To check if the batch executed correctly, access the folder c:\temp\ (on Windows) or /temp/ (on UNIX).

    A .txt file named "BatchMonitorResults_" suffixed with the hour at which the batch was run (e.g. "BatchMonitorResults_8.46.34.txt") gives you information on the batch execution and indicates the folder where the reports generated by the batch execution are stored.
  4. To read the reports generated by the batch execution, access the folder c:\temp\batchID (on Windows) or /temp/batchID (on UNIX).

    Three files are created:
    • a report in text format named batchIDLOG.txt 
    • a report in XML format named batchIDLOG.xml
    • a log containing the output named batchIDOUTPUT.xml.

    where batchID is the number identifying the batch.

    You can modify the default storage location of these files by exporting the following variable:

    set BATCH_HOME=new_path  (on Windows)

    or

    export BATCH_HOME=new_path  (on UNIX)

    where new_path is the path of the new storage location.