cancel
Showing results for 
Search instead for 
Did you mean: 

Keyfield - Content Conversion

Former Member
0 Kudos

Dear Experts,

Could you please more elaborate about KeyField?

Where it's exactly required? When? and How?

Regards,

YRaj.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

it is used in file adapter..

let's say, ur recordset structure is NameA with occurence 1 and NameB with occurence unbounded. So source file would look like:

++header

88someitem

88otheritem

88otheritem

..

++newheader..

The keyFieldValue is used to determine, when is has new structure started. Cos if u have unbounedd occurence, file adapter can't know, whether the item is header yet or item already.

So u use: nameA keyValue ++

nameB keyValue 88

and adapter goes through and thinks:

well, key field is ++ this is header, now 88 so it's item. now 88, it's item... ++ooops, i have to start new structure, cos' its header

if ur recordset structure doesn't contain unbounded occurence of any item, you don't have to use keyField, cos it's clear that let's say -

nameA,1,nameB,3

in this case is each 4th line new header. one header, 3 items..

Clear?

Peter

Message was edited by:

Peter Jarunek

Shabarish_Nair
Active Contributor
0 Kudos

keyfield is nothing but a field in a record of a file which will distinguish between the various records in the file.

for example;

01,aa,bb

02,cc,dd

02,dd,gg

03,tt,uu

here 01 is the key field for the 1st record, 02 for the next two records and 03 for the last record.

you can utilize the same in FCC.

ref:

Sender -

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter - TAB delimited

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter