Version

    Import

    Import makes accessible functions from other .ctl files. It is similar to import statement in Java or include statement in C/C++. Files to be included must be defined at the beginning before any other declaration(s) and/or statement(s).

    • import 'fileURL';

    • import "fileURL";

    You must decide whether you want to use single or double quotes. Single quotes do not escape so called escape sequences. For more details see Literals below. For these fileURL, you must type the URL of some existing source code file.

    Example 65.2. Example of an import of a CTL file

    //#CTL2
    
    import "trans/filterFunctions.ctl";
    
    function integer transform() {
        $out.0.field1 = filterChars($in.0.field1);
    
        return ALL;
    }

    You can use graph parameters to define the name of the imported file.

    Example 65.3. Example of importing a CTL file with a graph parameter

    //#CTL2
    
    import "${FUNCTION_DIR}/filterFunctions.ctl";
    
    function integer transform() {
        $out.0.field1 = filterChars($in.0.field1);
    
        return ALL;
    }