• 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
      • 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
    • Known Issues
    • Disclaimers

    Column Matcher

    Table Scan can be customizied with user logic to match columns.

    Such logic must be coded in a column matcher class which must implement the HPE.Ianus.Scripting.IColumnMatcher interface.

    namespace HPE.Ianus.Scripting
    {
        public interface IColumnMatcher
        {
            void Initialize(Environment env, Task task, Column column);
    
            bool Matches(object sourceValue);
        }
    }
    

    Therefore it must implement the method Match, that must return true when the column value meets the desired criteria.

    The method Match receives the following input parameters:

    Parameter Description
    sourceValue Source value to be matched

    The converter class can be coded in C# when embedded as script, and in any .NET language (including COBOL if available) when provided as DLL.

    Note

    Ianus provides data to the Match method exactly as it reads from the ADO resultset and uses the returned value according to ADO mechanisms.

    Example 1

        public class MatchText : IColumnMatcher
        {
            LoggerFacade Log;
            public void Initialize(HPE.Ianus.Environment env, HPE.Ianus.Task task, Column column)
            {
                Log = task.Log;
            }
    
            public bool Matches(object value)
            {
                Log.Info($"Matching [{value}]");
                return value.ToString().Contains("A");
            }
        }
    
    In This Article
    Back to top Copyright 2021 - Hewlett-Packard Enterprise