Skip to Content
Suppose we have a flat file that looks like this:

“V00″,01,”VEN”,999000,272727,09
“A11″,”VR”,13245,20050
“A11″,”VR”,12345,90090
“A27″,”VR00027”

With various field lengths and have a variable number of substructures for Recordset Structure, then the substructures can occur multiple times,must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. You must specify a key field and the key fields are H1,sub1 and sub2 and the constant values V00,A11 AND A27.

In the configuration part

1) Specify the adapter type as sender

2) Message protocol to file content conversion

image

3) Set the Content conversion parameters

a) Document Name-Message Type (mi_test) inserted in the message as the main XML tag

b) Document Namespace-http://wipro/venksworkshop, namespace is added to the name of the document

c) Recordset Name- Root, Specify the name of the structure.

d) Recordset Structure-specify the sequence and the number of substructures H1,1, sub1,*, sub2,*

e) Key Field Name – KF

f) Key Field Type – String

image

4) Define the additional parameters

-H1.fieldNames:F1,F2,F3,F4,F5,F6

-H1.fieldSeparator: ,

-H1.endSeparator:’nl’

-H1.processFieldNames: fromConfiguration because in our example the flat file does not contain any header
Add similar Parameters for sub1 and sub2

image

Add key field value parameters to identify the substructures in the recordset

-H1.keyFieldValue: “V00”

-sub1.keyFieldValue: “A11”

-sub2.keyFieldValue: “A27”

image

This configuration should convert the flat file into an XML message like this:

image

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. Praveen Sirupa
    Hi Venkata,

    Can you tell me more about this additional content conversion parameter. I did not find any documentation for this.

    Thanks
    Praveen

    (0) 
  2. Arno Jost
    We tried to reproduce the example in your blog and it only worked with fix cardinalities (no *) in the recordset structure. But then the use of key fields doesn’t really makes sense anymore.

    May it’s not working anymore in XI3.0 with SP19?

    (0) 

Leave a Reply