• User's guide
  • API
Search Results for

    Show / Hide Table of Contents
    • Concepts
    • Installation
    • Configuration
      • Overview
      • License
      • Datasources
      • Configuration
      • Plug-Ins
      • Codepages
      • Environment Variables
      • Include files
      • Example
    • Jobs
      • Jobs
      • Include
      • Multi-Threaded Jobs
      • Tracking Jobs
    • Tasks
      • Overview
      • Copy Check
      • Excel
      • Execute
      • File Compare
      • File Copy
      • File Dump
      • File Edit
      • File Format
      • Foreach
      • Generate
      • IMS/DB Data Conversion
      • JCL Submit
      • Listcat
      • Log
      • Powershell
      • Set Environment Variable
      • Sql
      • Stored Procedure Compare
      • Table Compare
      • Table Copy
      • Table Load
      • Table Scan
      • Table Unload
      • User Script
    • Layouts
      • Overview
      • XML Definition
      • COBOL Definition
      • Field data Types
    • Extensibility
      • Extending Ianus
      • Column Comparators
      • Column Converters
      • Record Comparators
      • File Editors
      • User Script
      • Record Layout Match Class
      • Column Layout Match Class
      • User Fields
      • Codepages
      • Resources
    • Usage
      • Command Line
      • Monitors
      • Programmatically
      • Unit Testing
      • Docker
    • Known Issues
    • Disclaimers

    Execute

    The Execute task (execute) allows user to run any program as separate process.

    By default, the execute task raises an error only if it detects an error when starting the requested process.

    To raise errors and warnings depending onthe process exit code, the optional attributes error and warning can be used. When one of those attributes is defined, the task raises an error or warning depending on the exit code as follows:

    • if error threshold is defined and the exit code is greather than the errors threshold, an error is raised and the task completed
    • if warning threshold is defined and the exit code is greather than the warning threshold, a warning is raised and the task completed

    The following attributes configure the task:

    Attribute Type Purpose Default
    error integer error exit code threshold
    warning integer warning exit code threshold

    The following elements configure the task:

    Element Purpose
    program Program to be executed. If not in PATH, fullname must be provided
    args Arguments to provide to the program

    Example

    <job multithread="false">
    	<execute>
    		<program>ianus.exe</program>
    		<args>SQLvsSQL_TableCompare.xml</args>
    	</execute>
    	<execute>
    		<program>git</program>
    		<args>status</args>
    	</execute>
    	<execute name="ERROR" error="0">
    		<program>%IANUS_HOME%\bin\Debug\%IANUS_DOTNET_VERSION%\ianus.exe</program>
    		<args>MyJob.xml</args>
    	</execute>
    </job>
    

    Status codes

    Status Status code Description
    Ready -1 Task is initialized, but not yet started
    Running -2 Task is running
    Success 0 Task completed successfully
    Warnings 1 Task completed with warnings
    Errors 2 Task completed with errors
    Aborted 9 Task cannot be executed
    In This Article
    Back to top Copyright 2021 - Hewlett-Packard Enterprise