• 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

    Table Copy

    The table copy task (tablecopy) performs the copy of data stored in a source tables to a table of similar structure. The target table must be defined before performing the copy.

    By default, the copy involves all columns of all row, but can be limited to:

    • A selected set of rows
    • A selected set of columns
    • A combination of the above

    The table copy task is defined by the XML element tablecopy whose attributes configure the execution parameters.

    The following attributes configure the task:

    Attribute Type Purpose Default
    mode string Copy mode. Refer to copy mode for detailed description native
    source string Name of the data source where the source table is stored
    target string Name of the data source where the target table is stored
    delete string Delete data in the target table before the copy. See delete mode none
    truncate string Alias for delete none
    commit integer Perform a commit every N rows (native mode only) 1000
    verbose bool Writes a log message every set of rows written false
    identity bool Disables IDENTITY before to start writing the target table false
    stoponerror bool Stop at the first error encountered (for example, a duplicated row) false
    logallonerror bool Logs all columns when an error is detected with a specific row false
    ondbcserror string Defines the behavior in case of error converting DBCS. See DBCS Error Management error
    warnmissingdbcs bool Warns when DBCS bytes not found in the codepage. true
    warnmmalformeddbcs bool Warns when malformed DBCS sequences. true
    count bool If set to false rows are not counted before copy true
    charasbinary bool If set to true CHAR/VARCHAR columns are treated as BINARY. See char as binary false
    oraemptyvarcharfix bool If true activates the workaround for zero length VARCHAR columns replacing empty string by " " false
    first integer Copies only the first N rows
    converterstohex bool Turns the layout and plugin converter output into a hex string false
    db2timestampfix bool When set to true, DB2 TIMESTAMP get cast as CHAR and date/time errors admitted by DB2 are automatically normalized false

    The following attributes are database specific for bulk and hybrid modes:

    Attribute Type SQL Server DB2 Oracle Purpose Default
    batchsize integer X X Number of rows in each batch. At the end of each batch, the rows in the batch are sent to the server. 0
    timeout integer X X X Number of seconds for the operation to complete before it times out. 0
    checkconstraints bool X Check constraints while data is being inserted. false
    firetriggers bool X When specified, cause the server to fire the insert triggers for the rows being inserted into the database. false
    keepidentity bool X X Preserve source identity values. false
    keepnulls bool X Preserve null values in the destination table regardless of the settings for default values false
    tablelock bool X X Obtain a bulk update lock for the duration of the bulk copy operation false
    useinternaltransaction bool X X When true, each batch of the bulk-copy operation will occur within a transaction. false
    partition string X Defines the name of the destination table partition to lock

    The following elements configure the table copy:

    Element Purpose
    source Fully qualified name of the source table
    target Fully qualified name of the target table
    columns Defines explicitly the columns to be copied. Of omitted all columns are copied.
    where Defines the row selection criteria. If omitted, all rows are copied
    order Defines the ordering of the source table
    exclude Defines the regular expression based column exclusion criteria, if omitted no column is excluded
    cast Defines optional column and value manipulation and casting
    replace Overrides and defines the datacomparison string replacement definition set in general configuration
    convert Defines a custom conversion (layout or plugin) for specific columns
    layouts Defines the layouts to be used in the layout based conversion

    Copy Mode

    The table copy task can operate in the following modes:

    Mode Description
    Native Data copy is performed with a traditional fetch/insert loop
    Bulk Data copy is completely delegated to the database Bulk Copy routine. No data transformation is performed by Ianus in the copy process. This mode is available only when the target table is on SQL Server, DB2 or Oracle
    Hybrid Data copy is performed by Ianus loading data and then passing it to Bulk Copy routine. With this mode, data content is processed by Ianus before being copied to the target database. This mode is available only when the target table is on SQL Server, DB2 or Oracle
    HybridAsync Like "Hybrid" but with asynchronous I/O
    Important

    In Bulk, Hybrid and HybridAsync mode, source and target column names must match.

    Warning

    Bulk, Hybrid and HybridAsync modes are not supported for PostgreSQL.  

    Delete Mode

    The table copy task can delete data in the target table before the copy operation. The attribute delete controls how data is deleted:

    Delete Description
    none No data is deleted.
    false Same as none.
    truncate All data is deleted using a TRUNCATE command.
    true Same as truncate
    delete All data is deleted using a DELETE FROM command.
    where If the task includes a <where> element, data is deleted according to the WHERE condition assigned to the target table. If no WHERE condition is assigned, mode defaults to truncate

    Source and Target

    source and target elements are used to provide the fully qualified of the objects being compared.

    The following attributes are used to configure source and target objects:

    Attribute Type Purpose Default
    bitdatacodepage string Defines the codepage to translate the binary data (i.e. CHAR FOR BIT DATA) from EBCDIC to ASCII. If not specified and no default bitdatacodepage is set for the datasource, no translation is performed (default). For the list of supported codepages, refer to Codepages.
    layoutencoding string Defines the encoding (ebcdic or ascii) of the layout based columns As defined in database datasource configuration
    layoutzoned string Defines the SIGN mode (ascii or ebcdic) of the ZONED fields of the layout based columns As defined in database datasource configuration
    layoutendian string Defines the endianness of integer fields of the layout based columns As defined in database datasource configuration
    layoutcodepage string Default codepage to be used for the EBCDIC/ASCII conversion of the layout based columns As defined in database datasource configuration

    Example

      <tablecopy source="DB2" target="QS" truncate="true" commit="5000">
        <source>ADMINISTRATOR.TEST01</source>
        <target>dbo.TEST01_COPY</target>
        <where>C10 in ('Ase', 'Imi')</where>
        <exclude type="type">TIME</exclude>
      </tablecopy>
      <tablecopy name="BULK" source="DB2" target="QS" truncate="true" mode="bulk">
        <source>ADMINISTRATOR.TESTTS1</source>
        <target>dbo.TESTTS2</target>
      </tablecopy>
    

    Columns

    columns element is used to provide the list of columns to copy. If omitted, all columns are copied.

    If the provided list does not contain one or more columns being part of the primary key, those columns are automatically added to the list.

    Each column is defined by the column element.

    Example

    <tablecopy source="QS" target="QS1" truncate="true">
        <source>dbo.TEST01</source>
        <target>dbo.TEST01_COPY</target>
        <columns>
          <column>C10</column>
        </columns>
      </tablecopy>  
    

    Where

    The where element defines the row selection criteria for source table. The criteria is expressed as an SQL condition.

    Example

      <tablecopy source="DB2" target="QS" truncate="true">
        <source>ADMINISTRATOR.TEST01</source>
        <target>dbo.TEST01_COPY</target>
        <where>C10 in ('Fabrizio', 'Imi')</where>
      </tablecopy>
    

    Order

    The order element sets the sort criteria for conversion. Source table can be sorted in the following modes:

    • key: the table is order by primary key. If the exclude attribute is defined, the element value defines the regular expression for the exclusion
    • index: the table is order by the specified index. If the index name indicated, does not contain the schema name, the schema of the table is assumed by default. If the exclude attribute is defined, the element value defines the regular expression for the exclusion
    • user: the table is sorted according to the user provided ORDER BY clause specified in the element value

    When mode is key or index, optionally, some columns can be excluded from the key, defining the attribute exclude, which value can be:

    • name: the columns whose name matches the provided regular expression are excluded from comparison
    • type: the columns whose type matches the provided regular expression are excluded from comparison

    The following attributes are used to configure the where element:

    Attribute Type Purpose Default
    side string Side where the selection criteria applies: both, left or right both
    mode string Order by mode: user, index or key user
    exclude string Exclusion mode: name or type name

    Example

      <!-- ORDER BY USER PROVIDED ORDER BY CLAUSE WITH DEFAULT MODE-->
      <tablecopy name="TBLCMP02" mode="key" source="DB2" target="QS">
        <source>IBMUSER.TEST01</source>
        <target>dbo.TEST01</target>
        <order mode="user">PK1 ASC, PK2 DESC, COLX ASC</order>
      </tablecompare>
      <!-- ORDER BY PRIMARY KEY EXCLUDING KEYPARTS BY TYPE -->
      <tablecopy name="TBLCMP02" mode="key" source="DB2" target="QS">
        <source>IBMUSER.TEST01</source>
        <target>dbo.TEST01</target>
        <order mode="key" exclude="type">^CHAR|INT</order>
      </tablecompare>
      <!-- ORDER BY INDEX -->
      <tablecompare name="DB2ZOSVSSQL" mode="sequential" left="DB2ZOS" right="QS"  >
    	<tablecopy name="TBLCMP02" mode="key" source="DB2" target="QS">
        <source>IBMUSER.TEST01</source>
        <target>dbo.TEST01</target>
    	<order mode="index" >IX_TEST_IDX_01_CHAR</order>
      </tablecompare>
    

    Exclude

    The exclude element is used to define the regular expression to exclude columns from the copy.

    There are two types of exclusion criteria:

    • name, the columns whose name matches the provided regular expression are excluded from copy
    • type, the columns whose type matches the provided regular expression are excluded from copy

    The following attributes configure the exclude element:

    Attribute Type Purpose Default
    type string Defines the exclusion mode: name or type name
    side string Defines the set where the exclusion applies: left, right or both both

    Example

      <tablecopy source="DB2" target="QS" truncate="true">
        <source>ADMINISTRATOR.TEST01</source>
        <target>dbo.TEST01_COPY</target>
        <exclude type="type">TIME</exclude>
      </tablecopy>
    

    Cast

    The cast element is used to define the data manipulation and casting clauses for the columns.

    There are two types of cast criteria:

    • name: the columns whose name matches the provided regular expression are accessed with the specified clause
    • type: the columns whose type matches the provided regular expression are accessed with the specified clause

    The following attributes are used to configure the exclude element:

    Attribute Type Purpose Default
    type string Defines the cast mode: name or type type
    arg string Defines the regular expression to match columns
    side string Defines the set where the cast applies: left, source, right, target or both both

    The clause is defined as SQL and the following special registers are interpolated:

    Register Interpolate
    {name} Column name
    {length} Column size
    {value} Host variable's value

    Example

    <tablecopy name="CAST.COPY" source="QS" target="QS1" truncate="true" mode="bulk">
    	<source>dbo.TEST01</source>
    	<target>dbo.TEST01_COPY</target>
    	<cast type="name" arg="C1[01]" side="source">UPPER({name})</cast>
    </tablecopy>
    <tablecompare name="CAST.CMP.OK" left="QS" right="QS1" >
    	<left>dbo.TEST01</left>
    	<right>dbo.TEST01_COPY</right>
    	<cast type="name" arg="C1[01]" side="left">UPPER({name})</cast>
    </tablecompare>
    

    Replace

    Character or String replacement is enabled by the replace element, that must contain the following elements:

    Element Type Purpose Default
    from string The source string to replace
    to string The replacement string

    Example

    <tablecopy name="COPY_TRUNC" source="QS" target="QS1" truncate="true" mode="hybrid">
    	<replace>
    		<from>�</from>
    		<to>✽</to>
    	</replace>
    	<source>dbo.test_replace_01</source>
    	<target>dbo.test_replace_02</target>
    </tablecopy>
    <tablecompare name="COPY_TRUNC" left="QS" right="QS1" truncate="true" >
    	<replace>
    		<from>�</from>
    		<to>✽</to>
    	</replace>
    	<left>dbo.test_replace_01</left>
    	<right>dbo.test_replace_02</right>
    </tablecompare>
    

    Char As Binary

    If enabled and the database encoding is EBCDIC, all CHAR/VARCHAR columns are treated as binary (i.e. CHAR FOR BIT DATA) and therefore converted according to the specified codepage (when specified).

    The feature can be activated in two ways:

    • setting the attribute charasbinary to true on the task elemement, or
    • adding the element charasbinary

    The charasbinary element can be used to override the codepage or to exclude specific columns from the treatment.

    The following attributes configure charasbinary:

    Attribute Type Purpose Default
    enabled bool If set to false, the feature is deactivated true
    codepage bool codepage to use codepage defined for the table

    The following elements configure the table copy:

    Element Purpose
    exclude Exclude columns from the cast. This element works like the element exclude of the task.

    Example

        <tableunload name="UNLOAD.DB2.CHARASBIN" db="DB2ZOS" repository="TMPA" charasbinary="true">
            <table bitdatacodepage="ENUS370">IBMUSER.TEST01</table>
            <file recfmt="fixed" reclen="*">TMP01ZOS.UNLOAD.DB2.ASCII</file>
        </tableunload>
        <tablecopy name="ZOSCOPY.CHARASBIN.NATIVE" mode="native" source="DB2ZOS" target="QS" truncate="true" >
            <source bitdatacodepage="ENUS037">IBMUSER.TEST01</source>
            <target>dbo.TEST01_COPY</target>
            <charasbinary/>
        </tablecopy>
        <tablecopy name="ZOSCOPY.CHARASBIN.NATIVE" mode="native" source="DB2ZOS" target="QS" truncate="true" >
            <source bitdatacodepage="ENUS037">IBMUSER.TEST01</source>
            <target>dbo.TEST01_COPY</target>
            <charasbinary codepage="ENUS037" enabled="true">
                <exclude side="right" type="name">F.*B</exclude>
                <exclude side="right" type="type">DATETIME2</exclude>
            </charasbinary>
        </tablecopy>
    	
    

    Convert

    The convert element customizes the conversion of the column(s) matching all the provided criteria.

    There are two possible customization modes:

    • plugin mode: the column is converted by a user provide plug-in (default)
    • layout mode: the column is converted according to a layout defined in the layouts element
    • charasbinary mode: the column is converted using the specified codepage

    The criteria are:

    Criteria Description
    sourcename the name of the source column
    targetname the name of the target column
    sourcetype the SQL type of the source column
    sourcetype the SQL type of the target column
    Note

    If no criteria is defined, all columns are matched.

    The following attributes are used to configure the convert element:

    Attribute Type Purpose Default
    mode string Defines the custom conversion mode (plugin, layout) plugin
    sourcename string Name of the source column
    targetname string Name of the target column
    sourcetype string SQL type of the source column
    targettype string SQL type of the target column
    tohex bool the output of the converted is represented in HEX mode before sending to database false
    path string (plugin mode) Indicates to load the class script from the specified file
    assembly string (plugin mode) Indicates to load the class assembly from the specified DLL
    class string (plugin mode) The name of the converter class to use
    plugin string (plugin mode) Indicates to load the class from the plugin alias defined in the Ianus configuration file
    layout string (layout mode) the name of the layout to use for the column the first layout defined
    matcher string (layout mode) The name of the matcher class to use to assign the correct layout the first matcher defined
    codepage string (charasbinary mode) The name of the codepage to convert data

    The user provided conversion plugin must implement the interface HPE.Ianus.Scripting.IColumnConverter. For a detailed description of the comparison class please refer to Column Converter.

    Warning

    Columns converted with layout mode must target columns defined with binary data types (i.e. VARBINARY for MSSQL or RAW for Oracle).

    Warning

    User converter plugins must return data in a format compatible with the target column. So if the target columns is CHAR, must return a String; if the target is VARBINARY a byte[], etc.

    In case you have the need to convert a column containing binary data, either with a layout converter of your own converter plugin, and the target data is not of binary data, you may consider setting the converterstohex attribute to true and handle the hex string with a proper cast.

    Note

    Forcing the HEX value in the column with a cast works only in native mode, as it is the only mode that actually executest a SQL INSERT.

        <tablecopy name="COPYCONV" source="DB2" target="ORA" 
                   truncate="true" mode="native" converterstohex="true">
            <source bitdatacodepage="ENUS037">IANUS.SATELLITES</source>
            <target>IANUS.SATELLITES</target>
            <cast type="name" arg="^SATELLITE$" 
                  side="source">CAST({name} AS VARCHAR(100) FOR BIT DATA)</cast>
            <cast type="name" arg="^SATELLITE$" 
                  side="target">utl_raw.cast_to_varchar2(:{name})</cast>
            <convert sourcename="SATELLITE" plugin="SatelliteColumnConverter"/>
        </tablecopy>
        <tablecopy name="NFDB20.PROBE.ORA" source="DB2E" target="ORA" delete="truncate" enabled="true" mode="native" batchsize="250000" oraemptyvarcharfix="false" first="100" >
    		<source bitdatacodepage="IBM1145_WIN1252">IANUS.CONVERT_CHARASBINARY</source>
    		<target>IANUS.CONVERT_CHARASBINARY</target>
    		<cast type="name" arg="TEXT" side="right">UTL_RAW.CAST_TO_VARCHAR2(:{name})</cast>
    		<convert mode="charasbinary" sourcetype="VARCHAR" codepage="IBM1145_WIN1252" tohex="true"/>
    	</tablecopy>
    	<tablecopy name="NFDB20.PROBE.ORA" source="DB2E" target="ORA" delete="truncate" enabled="true" mode="native" batchsize="250000" oraemptyvarcharfix="false" first="100" >
    		<source layoutcodepage="IBM1145_WIN1252">IANUS.CONVERT_CHARASBINARY</source>
    		<target>IANUS.CONVERT_CHARASBINARY_B</target>
    		<layouts>
    			<layout type="COBOL" format="free" explicitconversion="true">
    				01  SYS053-DESCR.
    				03  FIELD02    PIC X(16).
    			</layout>
    		</layouts>
    		<cast type="name" arg="TEXT" side="right">UTL_RAW.CAST_TO_VARCHAR2(:{name})</cast>
    		<convert mode="layout" sourcetype="VARCHAR" codepage="IBM1145_WIN1252" tohex="true" />
    	</tablecopy>
    

    Layouts

    The layouts element defines one or more record layout to convert the layout based columns.

    The following elements configure the layouts:

    Element Purpose
    layout Adds a layout definition. Refer to Layout
    match Defines the match algorithm. Refer to Match

    Layout

    The layout element defines a one or more record layouts. Each layout must be identified by a unique name (task-wide).

    By default, the layout fields are defined using XML:

    • Each layout element defines one single layout
    • Record fields are defined using field elements

    But there is also the possibility to define the layout using COBOL data definition syntax:

    • Each layout element defines one or more layouts (one each level 01)
    • Record fields are defined using COBOL notation

    For further information on layout definition, refer to Record Layouts

    Match

    The match elements define one ore more "match class". Whenever more than on layout is provided, Ianus needs a match class to drive the selection of the correct layout for each record compared.

    This class must implement the interface HPE.Ianus.Scripting.IColumnLayoutMatch. For a detailed description of the match class please refer to the Column Layout Matcher section.

    The class can be provided as:

    • C# script: the code is compiled on the fly by Ianus and declared either:
      • inline, by adding the code in the element value, or
      • by reference, providing the filename of the script on the path attribute. If the script file name is not absolute, the script is searched in the same path of the job script.
    • Class library: the class can be coded in any .NET language such as C# or VB.NET but also COBOL for .NET and compiled as .NET class library. The class can be referenced either:
      • directly: providing the filename of the DLL containing the class on the assembly attribute and the full name of the class on the class attribute, or
      • by alias: providing the name of the plugin alias defined in the Plug-ins section of the Environment Configuration File.

    The following attributes configure the element:

    Attribute Type Purpose Default
    path string Indicates to load the class script from the specified file
    assembly string Indicates to load the class assembly from the specified DLL
    class string Indicates the name of the class to use
    plugin string Indicates to load the class from the plugin alias defined in Plug-ins

    Example

        <tablecopy name="NFDB20.PROBE.ORA" source="DB2E" target="ORA" delete="truncate" enabled="true" mode="native" batchsize="250000" oraemptyvarcharfix="false" first="100" >
    		<source bitdatacodepage="IBM1145_WIN1252">IANUS.CPGPROBE</source>
    		<target>IANUS.CPGPROBE</target>
    		<cast type="name" arg="TEXT" side="right">UTL_RAW.CAST_TO_VARCHAR2(:{name})</cast>
    		<convert mode="charasbinary" sourcetype="VARCHAR" codepage="IBM1145_WIN1252" tohex="true"/>
    	</tablecopy>
        <tablecopy name="STEPCP" source="DB2" target="QS" truncate="true">
            <source layoutencoding="ebcdic">IANUS.CHAR_BINARIES_A</source>
            <target>IANUS.CHAR_BINARIES_B</target>
            <layouts>
                <layout type="cobol" format="free" length="auto">
                    01  SYS053-DESCR.
                        03  FIELD01    PIC S9(4) COMP.
                        03  FIELD02    PIC X(4).
                </layout>
            </layouts>
            <convert mode="layout" sourcename="LAYOUTV" layout="SYS053-DESCR"/>
            <convert mode="layout" sourcename="LAYOUTF" layout="SYS053-DESCR"/>
        </tablecopy>
        <tablecopy name="TBCMP1" source="QS" target="QS1" truncate="true">
            <source>dbo.test_cmp_2</source>
            <target>dbo.test_cmp_3</target>
            <convert sourcetype="CHAR"
                     assembly="%DLLPATH%\ColumnConverters.dll"
                     class="ColumnConverters.StringConvertToUppercase"/>
            <convert sourcename="UF2"
                     assembly="%DLLPATH%\ColumnConverters.dll"
                     class="ColumnConverters.StringConvertToUppercase"/>
        </tablecopy>
        <tablecopy name="SB.SBBILT1" 
                   source="%IANUS_SOURCE_DB%" 
                   target="%IANUS_TARGET_DB%" 
                   truncate="true" 
                   mode="hybrid" 
                   first="%IANUS_TABLECOPY_FIRST%" 
                   identity="%IANUS_TABLECOPY_IDENTITY%"
                   batchsize="%IANUS_TABLECOPY_BATCHSIZE%">
            <source bitdatacodepage="IBM937">SB.SBBILT1</source>
            <target>SB.SBBILT1</target>
            <cast type="name" arg="PART3" side="source">CAST({name} AS CHAR(165) FOR BIT DATA)</cast>
            <convert sourcename="PART3">
                using System;
                using System.Collections.Generic;
                using System.Linq;
                using System.Text;
                using System.Threading.Tasks;
                using HPE.Ianus;
                using HPE.Ianus.Log;
                using HPE.Ianus.File;
                using HPE.Ianus.Scripting;
    
                namespace ColumnConverters
                {
                    public class StringConvertToUppercase : IColumnConverter
                    {
    
                        Record container = null;
                        EbcdicCharField sbcs01 = null;
                        EbcdicCharField sbcs02 = null;
                        DbcsEbcdicField dbcs01 = null;
                        DbcsEbcdicField dbcs02 = null;
    
                        public object Convert(LoggerFacade log, 
                                              DBFieldPair pair, 
                                              object sourceValue)
                        {
                            AbstractField f;
                            container = new Record((byte[])sourceValue);
                            f = sbcs01 = new EbcdicCharField("SBCS01", container, 
                                0, 6, pair.SourceBitDataCodepage);
                            f = dbcs01 = new DbcsEbcdicField("DBCS01", container, 
                                f.Offset + f.Length, 78, pair.SourceBitDataCodepage, 
                                DbcsErrorAction.ThrowException);
                            f = sbcs02 = new EbcdicCharField("SBCS02", container, 
                                f.Offset + f.Length,  1, pair.SourceBitDataCodepage);
                            f = dbcs02 = new DbcsEbcdicField("DBCS02", container, 
                                f.Offset + f.Length, 80, pair.SourceBitDataCodepage, 
                                DbcsErrorAction.ThrowException);
                            string rc = (string)sbcs01.Value + 
                                        (string)dbcs01.Value + 
                                        (string)sbcs02.Value + 
                                        (string)dbcs01.Value;
                            return rc;
                        }
                    }
                }
            </convert>
        </tablecopy>
        <tablecopy name="copy" source="QS1" target="QS" truncate="true" mode="hybrid">
            <source layoutencoding="ebcdic">dbo.CHAR_BINARIES_A</source>
            <target>dbo.CHAR_BINARIES_B</target>
            <layouts>
                <layout type="cobol" format="free" length="auto">
                    01  SYS053-DESCR.
                    03  FIELD01    PIC S9(4) COMP.
                    03  FIELD02    PIC X(4).
                </layout>
                <layout type="cobol" format="free" length="auto">
                    01  SYS053-BINS.
                    @ianus*type=binary
                    03  FIELD01    PIC X(2).
                    @ianus*type=binary
                    03  FIELD02    PIC X(4).
                </layout>
                <match assembly="%DLLPATH%\LayoutMatchers.dll" class="LayoutMatchers.ExampleColumnLayoutMatcher"/>
                <match assembly="%DLLPATH%\LayoutMatchers.dll" class="LayoutMatchers.TestBinaryColumnMatcher"/>
            </layouts>
            <convert mode="layout" sourcename="LAYOUTV" matcher="LayoutMatchers.ExampleColumnLayoutMatcher"/>
            <convert mode="layout" sourcename="LAYOUTF" matcher="LayoutMatchers.TestBinaryColumnMatcher" />
        </tablecopy>
    

    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, one or more rows have been skipped
    Errors 2 Task completed with errors, copy interrupted
    Aborted 9 Task cannot be executed 
    In This Article
    Back to top Copyright 2021 - Hewlett-Packard Enterprise