cancel
Showing results for 
Search instead for 
Did you mean: 

Keyfield and its value in file content conversion

Chandra_Hota
Participant
0 Kudos

Hello All

I am in the process of configuring file content conversion for a file sender communication channel.

In my case, there is one header line (3 fields related to administrative data), followed by multiple item lines (each item line contain about 10 fields) which are then followed by one footer line (4 fields in footer line).

Now, these are my questions related to content conversion parameters in ID:

1. What should i have in 'Recordset Name'? Is it - Header, Item, Footer ???

2. Can i have 'Header,1,Item,*,Footer,1' in Recordset Structure??

3. What should i have in 'Recordsets per message'? I read in the documentation that the keyfield name and value should be specified here. But the field value might change in each row and then how can i specify a keyfield and its value which are unique?? Can you please explain this?

Any inputs are highly appreciated!

Many Thanks

Chandra

Edited by: Chandra Sekhar H on Nov 12, 2008 3:56 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandra,

1) Recordset Name is optional. If you leave it blank you will get the default name "Recordset".

2) Yes, that looks correct.

3) "Recordsets per message" deals with very large files where you want to create multiple XML messages based on one very large input file. The default here is *. That's probably what you want.

This example may help:

Given these settings:


Document name:		MyRootTag
Document Namespace:	com.test.msg
Recordset Name:		MyRecordset
Recordset Structure:	Header,1,Item,*,Footer,1
Key Field Name:		reckey

Header.keyFieldValue		H
Header.fieldSeparator		,
Header.fieldNames		reckey,head1,head2
Item.endSeparator		'nl'
Item.keyFieldValue		I
Item.fieldSeparator		,
Item.fieldNames			reckey,item1,item2,item3
Footer.endSeparator		'nl'
Footer.keyFieldValue		F
Footer.fieldSeparator		,
Footer.fieldNames		reckey,foot1,foot2

And this input data:


H,H1,H2
I,1_1,1_2,1_3
I,2_1,2_2,2_3
I,2_1,2_2,2_3
F,F1,F2

The file adapter will generage this XML:


<?xml version="1.0" encoding="utf-8"?>
<ns:MyRootTag xmlns:ns="com.test.msg">
  <MyRecordset>
    <Header>
      <reckey>H</reckey>
      <head1>H1</head1>
      <head2>H2</head2>
    </Header>
    <Item>
      <reckey>I</reckey>
      <item1>1_1</item1>
      <item2>1_2</item2>
      <item3>1_3</item3>
    </Item>
    <Item>
      <reckey>I</reckey>
      <item1>2_1</item1>
      <item2>2_2</item2>
      <item3>2_3</item3>
    </Item>
    <Item>
      <reckey>I</reckey>
      <item1>2_1</item1>
      <item2>2_2</item2>
      <item3>2_3</item3>
    </Item>
    <Footer>
      <reckey>F</reckey>
      <foot1>F1</foot1>
      <foot2>F2</foot2>
    </Footer>
  </MyRecordset>
</ns:MyRootTag>

-Russ

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

I think the issue you have is you are not having Key field? right then the above FCC discussed will not work.

Check this also

Thanks

Gaurav

Former Member
0 Kudos

Hi,

For all your question I thing there is the ans in this blog... just have a look..

Don't be confused with the heading of this bolg, just look into data type structure & FCC parameters. You can ignore the things which you don't like while doing FCC e.g. key fields.

Regards,

Sarvesh