!--a11y-->
Converting File Content in a Sender
Adapter 
If you have selected File Content Conversion as the message protocol, you can convert a text file that contains complex structures into an XML source format in this mode. The file contains various row formats in logical structures.
The system expects a file with one or more logical structures (recordsets). An unlimited number of recordsets (either one, multiple, or all recordsets in the file) can be sent to the Integration Server/PCK as separate messages.
A recordset can contain multiple types of substructures identified by logical names. There can be a fixed or variable number of substructures in a recordset. The structure of these substructures must be fixed and corresponds to the description of the row structure logic in the table below. A sub structure must always be shown in exactly one line of the text document.
The document has the following structure:
<documentName>...
<recordset>
<NameA>
<field-nameA1>field-value</field-nameA1>
<field-nameA2>field-value</field-nameA2>
<field-nameA3>field-value</field-nameA3>
</NameA>
<NameB>
<field-nameB1>column-value</field-nameB1>
<field-nameB2>column-value</field-nameB2>
<field-nameB3>column-value</field-nameB3>
</NameB>
</recordset>
...
<recordset>
...
</recordset>
</documentName>...
Enter the following:
● Document Name
Specify the name of the XML document. The document name is inserted in the message as the main XML tag. This is mandatory for the mapping.
● Document Namespace
The namespace is added to the name of the document. This is mandatory for the mapping.
● Document Offset
Specify the number of lines that are to be ignored at the beginning of the document. This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.
● Recordset Name
Specify the name of the structure: It is included in the XML schema.
● Recordset Namespace
The namespace is added to the name of the structure.
● Recordset Structure
Enter the sequence and the number of sub structures as follows: <NameA,nA,NameB,nB,...>. Therefore, nA=1,2,3,... or * (for a variable, unlimited number, including 0).
● Recordset Sequence
The start and end of recordsets containing a variable number and arrangement of structures are determined as follows:
○ Ascending: The sequence of the recordset structures is assumed to be unique. A new recordset is started as soon as an earlier structure occurs.
○ Variable: The sequence of the recordset structures is assumed not to be fixed. A new recordset is only started when another structure occurs that is defined with a fixed number. If all structures are defined as variable the system interprets the entire document as a single recordset.
● Recordsets per Message
Specify the number of recordsets to be grouped together in a message. This specification is optional. The default value is *. In the default setting, all recordsets are included in a message.
If the number of recordsets in a document is greater than the number specified, then the adapter creates multiple messages from a document. The last message might then contain fewer recordsets than specified.

If you specify Exactly Once as the quality of service (see below), each of these messages (that is to say, each part of a document from which a message is created) is sent to the Integration Server/PCK exactly once. This is also true if the application is interrupted while creating the messages and restarted again later.
● Key Field Name
If you specified a variable number of substructures for Recordset Structure, in other words, at least one substructure has the value ‘*’, then the substructures must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. In this case, you must specify a key field and the field name must occur in all substructures.
● Key Field Type
Specify the key field type to be used to compare the predefined values. This entry is used if the key field name is defined.
Set the parameters for all the specified recordset structures NameA, NameB, and so on in the following table:
Parameters for Recordset Structures
Parameter Name |
Description |
ignoreRecordsetName |
A <Recordset> element is inserted in the XML structure for each recordset structure. This level is not always required, particularly if the recordset only contains one structure definition. If you set the parameter to true, the <Recordset> element is not inserted. |
NameA.fieldFixedLengths |
If you make a specification here, the system expects a character string that contains the lengths of the structure columns as arguments separated by commas. If you also specify a separator for the columns, you must not add its length to the length of the columns.
This entry is mandatory if you have not made an entry for NameA.fieldSeparator.
|
NameA.fieldFixedLengthType |
Specifies the form in which the entries under NameA.fieldFixedLengths are counted: ● char (default value) The number of characters is counted. ● byte The byte length of the characters is counted. |
NameA.fieldSeparator |
If you make a specification here, the system expects that the structure contains the specified character string (one or more characters) as a separator between the individual columns. If you have not made an entry for fieldFixedLengths, this is the only specification to identify the individual columns in a row. If you made a specification for fieldFixedLengths, the extra length of the separator is taken into account, but no further consistency checks are performed. |
NameA.enclosureSign |
Specify a string that acts as a text delimiter. Text enclosed by such delimiters is transferred to the target structure unmodified, although the default setting is to remove all text delimiters. Separators within such texts are ignored. This parameter is optional. The default setting is an empty value (no text delimiter). |
NameA.enclosureSignEnd |
If the text delimiters for the beginning and end of the text are different, specify the text delimiter for the end of the text here. If you do not make an entry here, then the entry from NameA.enclosureSign is used instead. |
NameA.enclosureSignEscape |
Specify a string that replaces the text delimiter if it occurs within a text that it delimits. When the text is transferred the string is replaced by the value specified in NameA.enclosureSign. |
NameA.enclosureSignEndEscape |
Specify a string that replaces the text delimiter for the end of the text if it occurs within a text that it delimits. When the text is transferred the string is replaced by the value specified in NameA.enclosureSignEnd. |
NameA.enclosureConversion |
● Specify YES if the text delimiter is to be removed when the files are transferred or if the escape character is to be replaced. This is the default value. ● Enter NO if the character is to be transferred unaltered.
If you specify xml.enclosureSign=“ and xml.enclosureSignEsc=““, text enclosed in quotation marks is transferred unchanged and the quotation marks are removed. If the escape character for a quotation mark (““) occurs in the text itself, it is replaced by the quotation mark during the transfer. |
NameA.endSeparator |
If you want to define an additional string as a separator after the last column in a row, then specify it here. The system skips this separator when it processes the last column (otherwise the system would treat it as part of the last column). |
NameA.beginSeparator |
If you want to define an additional character string as a separator before the first column in a row, make a specification here. The system skips this separator when it processes this column (otherwise the system would treat it as part of the first column). ● Special Characters in the String for Separators In all strings for separators (NameA.fieldSeparator, NameA.beginSeparator, NameA.endSeparator), you can specify non-printable ASCII characters. These characters can each be inserted individually in the string in the form ´0xHH´ (including the quotation marks), where HH represents the character encoded as a hexadecimal value. ● Inserting Strings for Separators in the XML Document: The separators specified with NameA.beginSeparator and NameA.endSeparator can also be inserted as fields in the structure of the generated XML document. To do so, specify field names with the following specifications: NameA.addBeginSeparatorAsField=<fieldname> and/or NameA.addEndSeparatorAsField=<fieldname> The strings, together with the specified field name, are then inserted either at the start or the end of the structure, as they were specified in NameA.beginSeparator and NameA.endSeparator. The definition of special characters also needs to be included. Special characters cannot be converted since characters of this type are not permitted in XML documents. |
NameA.fieldNames |
Specify the names of the structure columns: The input format depends on the following: ● If you have specified a value for NameA.fieldFixedLengths, then a string is expected containing the names of the file columns as arguments separated by commas. This also applies if you have also specified a value for NameA.columnSeparator. ● If you only specify a value for NameA.fieldSeparator, the system expects a string containing the names of the file columns in the same format as the file rows. This means that the same separator and any additional strings you specify for NameA.endSeparator and/or NameA.beginSeparator are expected. |
NameA.keyFieldValue |
Specify the value of the key field for the structure. This specification is mandatory if the key field name is set. Otherwise, the specification is ignored. |
NameA.fieldContentFormatting |
● Specify trim to remove all the leading and subsequent blanks for a value found. This is the default. ● Specify nothing to ensure that the value remains unaltered. |
NameA.keyFieldInStructure |
● If the key field of the substructure is to be added to the XML document, enter add. This is the default. ● If the key field is to be ignored, enter ignore. |