User Guide > Using Content Extraction Language
Was this helpful?
Using Content Extraction Language
 
Supported Text Files
Supported Operations
Use of Content Extraction in the Integration Platform
Script Examples
CXL Scripts
Basic Syntax
Script Structure
Script Execution
Script Licensing
A Simple Script Example
Language Elements
CXL Character Set
Keywords
Numeric and String Constants
Variables and Fields
User-Defined Variables
Built-in Variables
Field Variables
Variable Typing and Conversion
Operators
Arrays
One-Dimensional Arrays
Associative Arrays
Multidimensional Arrays
Array Iteration
Functions
Built-in Functionality
User-Defined Functions
Variables Definitions
Pattern Matching and Action Statements
CXL Patterns
Expressions in Patterns
Regular Expression
Metacharacters
Comparison Expressions
Actions and Statements
Expressions in Statements
Integrating with Map Designer
Map Designer Setup
Map Designer Results
DJXLPACK - Script Compressing and Encoding
Script Errors and Debugging Tips
Syntax Errors
Logic Errors
Debugging Techniques
Language Syntax and Examples
!=
!~
# comment
$
$n
&&
*
+
+=
-
.
/
/ regular expression /
<
<=
=
= =
>
>=
?
{ and }
[ and ]
\
^
||
~
in
|
r1r2
stop;
accept explist;
asc (string);
BEGIN { statements }
break;
catchup on;
catchup off;
CATCHUP { statements }
Chr (n)
cleararray ( array );
clearvars;
EBCDIC
ENCODING
END { statements }
Fix (number)
for ( index in array ) { statements }
gsub ( reg, sub, var );
if ( condition ) { statements } else { statements }
IFS
ILS
InitCaps (string)
Int (number)
IsNumeric (value)
LCase (strexpr)
Left (strexpr, n)
length ( var );
logmessage ( warningtype, format, parm1, parm2 );
ltrim ( var );
NamePart ("[h] [f] [m] [mi] [l] [t]", "string")
Part Description
NF
NR
readahead ( num );
REGPOS
REGLEN
reject;
Right (strexpr,n)
rtrim ( var );
Sgn (number)
shift;
skip ( num );
Space (number)
split ( var, array, fs );
String (number, string)
sub ( reg, sub, var );
substr ( var, pos, len );
TABS
TRACE ON
TRACE OFF
Transliterate (source_char_set, target_char_set, string)
trim ( var );
UCase (strexpr)
Val (string)
var [ num ]
var ( j k )
while ( condition ) { statements }
Script Examples
Example Script 1: Fixed-Format Report
Example Script 2: Multicolumn Record Reports
Example Script 3: Tagged Reports
Example Script 4: One-To-Many Item Reports
Example Script 5: Multirecord Type Hierarchical Reports
Example Script 6: User Defined Functions, Arrays, and Loops
CXL Quick Reference
Basics
Variables and Fields
Built-in Variables
Field Variables
Built-in Functions
CXL Patterns
Regular Expression Summary
Statements in Actions
This topic describes the Content Extraction Language (CXL) which is an AWK-like line oriented programming language. Its purpose is to recognize and extract structured fields of data from specific lines of incoming text files, and assemble those fields into a flat record of data which it passes on to a subsequent process, for example a Map Designer.
To achieve its goals, CXL provides a wide variety of pattern recognition, computing and data-manipulation capabilities. This robust and expressive scripting language gives users a valuable tool to tackle the problem of extracting useful field and record structures from the huge and ever-growing volume of complex text files.
Last modified date: 12/03/2024