X4 Help Center

COBOL Copybook Reader

This adapter reads a text document in COBOL copybook format, parses it according to the rules of the descriptor file, and returns an XML document.

Characters that are not valid XML characters are replaced by the Unicode Replacement Character #xFFFD. The following Unicode characters are valid XML characters:

  • #x9

  • #xA

  • #xD

  • #x20#xD7FF

  • #xE000#xFFFD

Properties

Operation

Defines the operation executed by the function adapter

Possible values: Execute: Read a text document in COBOL copybook format

Parameters

Adapters

Main class of the adapter (do not change!)

Possible values: de.softproject.integration.adapter.CopyBookReader: Main class (default)

DescFile

Required

Name of the descriptor file that describes the text document in COBOL Copybook format in its data structure. The descriptor file should be stored in the user folder of the X4 repository (for example, X4DB/1/Project/descr.ad) Multiple descriptor files can be separated by a semicolon.

Possible values:

Path and filename with the suffix .ad or .xml (for example, /project/descr.ad)

Strict

Determines whether the data stream from the preceding process step must be sufficiently long to read the complete structure

Possible values:

  • true: Full structure must be read

  • false: Data stream can be any length (default)

encoding

Note:

This parameter is available as of X4 BPMS 7.4.18.

Sets the character encoding of the scanned document in Cobol Copybook format.

Possible values:

Any valid Java character set, such as:

  • Windows-1252 – Western European (ANSI)

  • ISO-8859-1 – Latin-1

  • IBM437 – OEM US (DOS)

  • UTF-8 – Unicode

Behavior:

  • Encoding specified: The adapter uses the specified encoding to interpret the input data, regardless of the encoding information stored in the document.

  • No encoding specified: The adapter uses the default encoding of the JVM (Charset.defaultCharset()). This behavior is similar to that of the COBOL Copybook Writer Adapter. In addition, an alert is logged indicating which system encoding is used.

When should you use this parameter?

  • If you are processing files with ANSI/Windows 1252 or other non-UTF 8 encodings

  • If special characters (e.g. ä, ö, ü, ß) are displayed incorrectly in the output

  • If the input file comes from a system with a specific character encoding