cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with file adapter for delimiter

0 Kudos

Hi,

I am working in a file-idoc scenario where i need to read a file with comma delimited body.

Content configuration for the body of the file is as follows,

BODY.fieldNames F1,F2,KEY,F3,F4,F5 where KEY is the key field

BODY.keyFieldValus 01

BODY.fieldSeparator ,

BODY.endSeparator 'nl'

For most of the cases it is working fine.

The record for which this is not working is,

AAA,,01,XXX,FFF,GGG

XI file adapter is ignoring this records.

1) I tried with some option like fieldContentFormatting but this is not working.

2) Most surprisingly if i shift the KEY to left(in place of F2), record is getting picked up properly with SPACE in the tag KEY and '01' in F2.

3) I tried using record like 126126,JJJ,01,,,GGG

Record is picked up with value in F3 and F4 fields are SPACE.

The problem is only with blank between two separator before KEY field.

Is there any other parameter which can solve the problem.

In case any body knows the solution please let me know.

With Regards

Amitesh

Accepted Solutions (0)

Answers (12)

Answers (12)

0 Kudos

Hi,

My configuration

Recordset Structure HDR,1,BODY,*,TRL,1

Content conversion for BODY

BODY.fieldNames F1,F2,KEY,F3,F4,F5

BODY.keyFieldValus 01

BODY.fieldSeparator ,

BODY.endSeparator 'nl'

Example Record with header, 1 body and 1 trailer

ZHV1806070601W00100016SIEMXSWS00000420060913094537

AAA,,01,XXX,FFF,GGG

ZPT180607060100000420060913094537

Changing Recordset sequence value to "Variable" may not help here as problem is with identifying the BODY not with sequence.

With Regards

Amitesh

Former Member
0 Kudos

Amitesh,

your header and trailer also must be comma sperated and they should also have key values . that is the problem.

0 Kudos

By making BODY mandatory with 1 record, i am getting the below given error message in Adapter monitoring...

Sender Adapter v2722 for Party '', Service 'BS_MRS':

Configured at 2007-08-29 09:40:17 BST

History:

- 2007-08-29 09:46:26 BST: Retry interval started. Length: 2.000 s

- 2007-08-29 09:46:26 BST: Error: Conversion of complete file content to XML format failed around position 0: Exception: ERROR consistency check in recordset structure validation (line no. 3: missing structure(s) before type 'TRL'

- 2007-08-29 09:46:26 BST: Processing started

- 2007-08-29 09:46:24 BST: Error: Conversion of complete file content to XML format failed around position 0: Exception: ERROR consistency check in recordset structure validation (line no. 3: missing structure(s) before type 'TRL'

- 2007-08-29 09:46:24 BST: Processing started

With Regards

Amitesh

Former Member
0 Kudos

can paste ur input file and File content conversion because it tells their in error in ur File content conversion

Former Member
0 Kudos

Please try to change the "Recordset sequence" value to "Variable", I am not sure if this is going to help but then its a shot in the dark.

0 Kudos

No error in adapter. The BODY is not mandatory in the file. So adapter reading the HEADER and TRAILER perfectly but not the BODY. I am getting the msg in SXMB_MONI only with HEADER and TRAILER...

With Regards

Amitesh

Former Member
0 Kudos

makeit mandotry say 1 instead of * in file adapter and only put 1 record of body with balnk and let me know the error

0 Kudos

Hi Sreeram,

this is not working for 1 record also. I have tried with activating/deactivating the adapter.

With Regards

Amitesh

Former Member
0 Kudos

what is error ur getting inur adapter.

0 Kudos

The corrected config is

BODY.fieldNames F1,F2,KEY,F3,F4,F5 where KEY is the key field

BODY.keyFieldValue 01

BODY.fieldSeparator ,

BODY.endSeparator 'nl'

It was fine in XI but not in the forum message.

sorry for the inconvenience caused

With Regards

Amitesh

0 Kudos

As i said earlier, this is not working for no value between two field separator before KEY.

XI config given below

BODY.fieldNames F1,F2,KEY,F3,F4,F5 where KEY is the key field

BODY.keyFieldValus 01

BODY.fieldSeparator ,

BODY.endSeparator 'nl'

For most of the cases it is working fine.

<b>The record for which this is not working is,</b>

AAA,,01,XXX,FFF,GGG

If i add space within two commas after AAA, this is working fine.

But i may receive file with no space within commas..

Please let me know in case any clarrification required

With Regards

Amitesh

Shabarish_Nair
Active Contributor
0 Kudos

<i>BODY.fieldNames F1,F2,KEY,F3,F4,F5 where KEY is the key field

<b>BODY.keyFieldValus 01</b>

BODY.fieldSeparator ,

BODY.endSeparator 'nl'</i>

>>>

try BODY.keyFieldValue 01. Cross check the spelling of the parameter.

nisarkhan_n
Active Contributor
0 Kudos

For field seprated files i don't think there is any parameter which will take care of the empt values in the field, like the one in your case. this is strange error but i think you have to cross check spellings one more time.

all your configuration looks fine,

BODY.fieldNames F1,F2,KEY,F3,F4,F5 where KEY is the key field

BODY.keyFieldValus 01

BODY.fieldSeparator ,

BODY.endSeparator 'nl'

The record ,

AAA,,01,XXX,FFF,GGG

try reactivating the adapter?

Former Member
0 Kudos

when you test this with this record <b>AAA,,01,XXX,FFF,GGG</b> you should get

Sucessfully file picked or Error . let me know what ur getting. try with only 1 record in input file

0 Kudos

Again sorry for the mistake in the msg in forum.

In XI the spelling is proper.

Also in case spaces in 2nd column, adapter is picking up records which shows it can identify body records.

With Regards

Amitesh

Former Member
0 Kudos

good it is working with out any change

0 Kudos

Hi Dreamcatcher,

I also faced the same issue and believe this solution is true for fixed length files only. In my case i am facing problem in reading all the records in the file as adapter is ignoring record (because it fails to find proper key field value).

Regards

Amitesh

Former Member
0 Kudos

Amitesh,

BODY.keyFieldValus 01 should be BODY.keyFieldValue

0 Kudos

Hi Sreeram,

I have again checked with 1 and more space. Working in both the condition. Sorry for the last reply with 1 space.

But how can i make this work for blank value. The file will come without any space in some scenarios.

Surprisingly this is working in case blank value in places after key fields

With Regards

Amitesh

Former Member
0 Kudos

Hi Amitesh,

One of my colleagues also had a similar issue with spaces but in his case after the key field if there were consecutive empty/blank fields then FCC was ignoring all the fields of the record after the occurence of the first blank/empty space.

He had used the following parameters in his FCC to make it work later. Please try if these help you in anyway.

parameter name -- value

<fieldnam>.processFieldNames -- fromConfiguration

keepIncompleteFields -- true

Cheers

0 Kudos

No error in Adapter. Record is either getting read or ignored.

I have validation with total count in Mapping which is failing as adapter is ignoring records.

Thanks

Amitesh

0 Kudos

Thanks Sreeram for quick response.

I have tried with 1 space but in vain.

I forgot to mention the version of XI in my question. We are working with XI 3.0 SP15.

Thanks

Amitesh

Former Member
0 Kudos

what is the error ur getting in ur adapter when you use space.

Former Member
0 Kudos

you can try giving more space says 10 spaces and see how it works without changing anything.