User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit support.ataccama.com/downloads

Run Plans from the Command Line

Plans that are executed using ONE Runtime Server (in Local Launch type environments) can be run from ONE Desktop or using the command line. This article describes how to run plans using the command line.

Runcif script

The scripts for running the runtime in batch mode are located in <ATACCAMA_HOME>/bin. Depending on your operating system, use either runcif.bat (for Windows) or runcif.sh (for Linux and Unix-based systems).

The runcif script takes one file argument (a .plan or .comp file) to be executed. The behavior of the runtime can further be configured by specifying one or more of the following optional parameters.

Simple example

The following command runs the plan without any other parameters. This is suitable for simple plans that do not require connecting to a database or defining other resources.

runcif.sh example.plan

Example with runcif parameters

The following example runs the plan with a custom runtime configuration file and enables remote monitoring of the plan execution on port 4040.

runcif.sh -server -serverPort 4040 -runtimeConfig example.runtimeConfig example.plan

Example with passing parameters to a plan

Component steps (plans with the .comp extension) can have some of their step properties mapped as parameters. The parameter values can be set from the command line using -params.<param_name>=<value> syntax. For more details and examples, see Component Steps.

In the following example, two parameters are passed (inputFile and outputFile) to example.comp.

runcif.sh -params.inputFile=in.csv -params.outputFile=out.csv example.comp

Runcif parameters

Parameter Description

-v, --version

Displays version information, including the license.

Note that the plan is not run with this parameter set.

-server

Starts a service connection on port 1913 (or the port given by -serverPort). This parameter enables remote monitoring.

-serverPort <portnumber>

Changes the port of the service connection from 1913 to the number given in <portnumber>. This option has no effect unless -server is specified.

-statusFile <statusfile>

Logs the environment description, parameters used, and WARNING and FATAL level messages into the <statusfile>. See Status file.

-runtimeConfig <file.runtimeConfig>

Lets the user use a custom Runtime Configuration specified by the <file.runtimeConfig> file.

This parameter is required when using database connections, path variables, and other resources for the plan to be run successfully.

-license <file.plf>

Uses the license file <file.plf> instead of the file found in the default license search path.

Remote monitoring

When the -server parameter is used, the plan is executed in the server mode, and a service connection can be used for monitoring the runtime engine from ONE Desktop:

  1. Create a new server in ONE Desktop with Generic implementation. See Connect to a Server.

  2. Specify a unique name and this server’s URL with the default or changed port (for example, localhost:1913).

  3. Connect to it while the plan is running and the plan is listed in Running Configurations from where you can open a monitoring window to track the progress. After the plan is run, the server shuts down.

How to pass Java parameters

Some Java parameters affect the runtime performance. These parameters have to be placed directly into the runcif script as JAVA_OPTS:

runcif.bat
@echo off

set JAVA_OPTS= -DenableRecordCounters=true -Xms1024m -Xmx4096m

call "%~dp0\run_java.bat" com.ataccama.dqc.processor.bin.CifProcessor %*
runcif.sh
!/bin/bash

export JAVA_OPTS="-DenableRecordCounters=true -Xms1024m -Xmx4096m"

"${0%/*}/run_java.sh" com.ataccama.dqc.processor.bin.CifProcessor "$@"

See JVM Configuration for a list of Java flags and runtime settings that can be passed as Java parameters.

Return values

The following table lists the return values and their meaning. In case of an error, the text of the error is displayed in the standard error output of the program.

Return value Description

0

Execution completed successfully.

16

Execution completed with warnings.

17

Execution completed with errors.

18

Abnormal execution termination.

19

No valid license file has been found.

20

Plugin versions check failed. This usually means that the runtime installation is corrupted and reinstallation is recommended.

21

Incorrect arguments were given to the runcif script.

In certain situations (such as a JVM crash or forced termination), the return code might be different from the codes listed here. This happens only in case of a fatal error or if ONE Runtime Server was shut down by the user.

Status file

When the -statusFile parameter is specified, a status file is created.

Any additional logging other than the -statusFile has to be defined in the runtime configuration file used as the argument of the -runtimeConfig parameter. For the full logging configuration reference, see Logging Configuration and as well as How to Log Batch Jobs to a Rotated File.

The following is an example of the status file.

Sample status file
<?xml version='1.0' encoding='UTF-8'?>
<report planFile="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\workspace\Tutorials\00 Introduction\00.01 Hello World.plan">
    <messages></messages>
    <runInfo duration="1" started="2016-08-05 10:01:01" workingDir="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\runtime\bin">
        <cmdline>
            <arg>-runtimeConfig</arg>
            <arg>../server/etc/default.runtimeConfig</arg>
            <arg>-statusFile</arg>
            <arg>statusfile.log</arg>
            <arg>D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\workspace\Tutorials\00 Introduction\00.01 Hello World.plan</arg>
        </cmdline>
        <properties>
            <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"></property>
            <property name="sun.boot.library.path" value="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\bin"></property>
            <property name="java.vm.version" value="24.65-b04"></property>
            <property name="java.vm.vendor" value="Oracle Corporation"></property>
            <property name="java.vendor.url" value="http://java.oracle.com/"></property>
            <property name="path.separator" value=";"></property>
            <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"></property>
            <property name="file.encoding.pkg" value="sun.io"></property>
            <property name="user.country" value="US"></property>
            <property name="user.script" value=""></property>
            <property name="sun.java.launcher" value="SUN_STANDARD"></property>
            <property name="sun.os.patch.level" value=""></property>
            <property name="java.vm.specification.name" value="Java Virtual Machine Specification"></property>
            <property name="user.dir" value="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\runtime\bin"></property>
            <property name="java.runtime.version" value="1.7.0_67-b01"></property>
            <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"></property>
            <property name="java.endorsed.dirs" value="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\endorsed"></property>
            <property name="os.arch" value="amd64"></property>
            <property name="java.io.tmpdir" value="C:\Users\NAZARI~1.LAB\AppData\Local\Temp\"></property>
            <property name="line.separator" value="
"></property>
            <property name="java.vm.specification.vendor" value="Oracle Corporation"></property>
            <property name="user.variant" value=""></property>
            <property name="os.name" value="Windows 8.1"></property>
            <property name="sun.jnu.encoding" value="Cp1251"></property>
            <property name="java.library.path" value="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;."></property>
            <property name="java.specification.name" value="Java Platform API Specification"></property>
            <property name="java.class.version" value="51.0"></property>
            <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"></property>
            <property name="os.version" value="6.3"></property>
            <property name="user.home" value="C:\Users\nazariy.labunets"></property>
            <property name="user.timezone" value="Europe/Prague"></property>
            <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"></property>
            <property name="file.encoding" value="Cp1251"></property>
            <property name="java.specification.version" value="1.7"></property>
            <property name="java.class.path" value="D:\Products\Ataccama-all-10.4.0.ga-2016-03-30-win-x86_64\runtime\lib\cif-bootstrap.jar;"></property>
            <property name="user.name" value="Nazariy.Labunets"></property>
            <property name="java.vm.specification.version" value="1.7"></property>
            <property name="sun.java.command" value="com.ataccama.dqc.bootstrap.DqcBootstrap D:\Products\Ataccama-all-10.4.0.ga-2016-03-30-win-x86_64\runtime/ com.ataccama.dqc.processor.bin.CifProcessor -runtimeConfig ../server/etc/default.runtimeConfig -statusFile statusfile.log D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\workspace\Tutorials\00 Introduction\00.01 Hello World.plan"></property>
            <property name="java.home" value="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre"></property>
            <property name="sun.arch.data.model" value="64"></property>
            <property name="user.language" value="en"></property>
            <property name="java.specification.vendor" value="Oracle Corporation"></property>
            <property name="awt.toolkit" value="sun.awt.windows.WToolkit"></property>
            <property name="java.vm.info" value="mixed mode"></property>
            <property name="java.version" value="1.7.0_67"></property>
            <property name="java.ext.dirs" value="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"></property>
            <property name="sun.boot.class.path" value="D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\resources.jar;D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\rt.jar;D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\sunrsasign.jar;D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\jsse.jar;D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\jce.jar;D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\charsets.jar;D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\lib\jfr.jar;D:\Products\Ataccama-all-10.5.0.ga-2016-06-24-win-x86_64\jre\classes"></property>
            <property name="java.vendor" value="Oracle Corporation"></property>
            <property name="file.separator" value="\"></property>
            <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"></property>
            <property name="sun.io.unicode.encoding" value="UnicodeLittle"></property>
            <property name="sun.cpu.endian" value="little"></property>
            <property name="sun.desktop" value="windows"></property>
            <property name="sun.cpu.isalist" value="amd64"></property>
        </properties>
        <systemInfo>
            <memory total="252182528" max="3739746304" available="236473624"></memory>
            <processor available="8"></processor>
        </systemInfo>
    </runInfo>
</report>

Was this page useful?