on 01-07-2009 11:56 AM
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?????
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
why dont you try this - /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.