Skip to Content
author's profile photo Former Member
Former Member

Keyfield - Content Conversion

Dear Experts,

Could you please more elaborate about KeyField?

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

Regards,

YRaj.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 20, 2007 at 09:51 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 10:14 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.