cancel
Showing results for 
Search instead for 
Did you mean: 

keyFieldValue not picking out key

Former Member
0 Kudos

I have a sender file adapter - I have a file with structure HEADER,1,DETAIL,*,TRAILER,1

My data is:

RRELMAG 01000001138 etc.................

RRELMAG 04000002138 etc................

RRELMAG 04000003138 etc.................

RRELMAG 09000004138 etc.................

The content conversion is:

key field name = HRECTYPE,DRECTYPE,TRECTYPE

ignoreRecordsetName true

HEADER.fieldNames FILE_TYPE,FILE_NAME,FILLER1,HRECTYPE,SEQNO,................

HEADER.fieldFixedLengths 1,6,2,2,6,3,4,6,3,3,20,1,..............

HEADER.keyFieldValue 01

HEADER.fixedLengthTooShortHandling Ignore

DETAIL.fieldNames FILE_TYPE,FILE_NAME,FILLER1,DRECTYPE,SEQNO,FA..............

DETAIL.fieldFixedLengths 1,6,2,2,6,3,4,6,3,3,20..............

DETAIL.keyFieldValue 04

DETAIL.fixedLengthTooShortHandling Ignore

DETAIL.lastFieldsOptional yes

TRAILER.fieldNames FILE_TYPE,FILE_NAME,FILLER1,TRECTYPE,SEQNO,FACT..........

TRAILER.fieldFixedLengths 1,6,2,2,6,3,4,6,3,3,............

TRAILER.keyFieldValue 09

TRAILER.fixedLengthTooShortHandling Ignore

When I process this I get error:

Warning: Channel CC_SND_FACTOREM_local: Empty document found. Proceed without sending message

When I pick out FILE_TYPE which is at the beginning of file and edit the file data to be A, B and C - it works ok

Is there a problem picking out a key in the middle of a file?????

(There are spaces before the key - but even when I replace them with characters like AA it still doesn't work. Any ideas?????

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You should have only one keyfield name, i.e keyfield name = RECTYPE.

then:

HEADER.fieldNames FILE_TYPE,FILE_NAME,FILLER1,RECTYPE,SEQNO,................

HEADER.fieldFixedLengths 1,6,2,2,6,3,4,6,3,3,20,1,..............

HEADER.keyFieldValue 01

HEADER.fixedLengthTooShortHandling Ignore

DETAIL.fieldNames FILE_TYPE,FILE_NAME,FILLER1,RECTYPE,SEQNO,FA..............

DETAIL.fieldFixedLengths 1,6,2,2,6,3,4,6,3,3,20..............

DETAIL.keyFieldValue 04

DETAIL.fixedLengthTooShortHandling Ignore

DETAIL.lastFieldsOptional yes

TRAILER.fieldNames FILE_TYPE,FILE_NAME,FILLER1,RECTYPE,SEQNO,FACT..........

TRAILER.fieldFixedLengths 1,6,2,2,6,3,4,6,3,3,............

TRAILER.keyFieldValue 09

TRAILER.fixedLengthTooShortHandling Ignore

The value for RECTYPE in your source file should be different for header, detail and tailer, i.e 'HEAD', 'DETAIL' and 'TAILER'

Jayson

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks guys both of you answered the question. I originally had it as Key Field Name as RECTYPE,RECTYPE,RECTYPE and this didn't work. So it was just that I only needed one RECTYPE when the key is not at the beginning of the record. Points awarded

Shabarish_Nair
Active Contributor
0 Kudos

why dont you try this - /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem