cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.3 File with "endrecord line" with FCC

Former Member
0 Kudos

Hello,

I have a flat file with many records.

The last one contains "OK" and not need to be process.

How can I managed this in PI.

For the moment, I have this error :

ERROR Converting document line no. nnnn according structure

Thnaks for your help

Edited by: jconderbeke on Feb 27, 2012 3:53 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member854360
Active Contributor
0 Kudos

Hi,

If you can identify some keyfield in your data records which is other than "OK" then you can mention the key field value in your FCC parameter.

So all the lines which has keyfield value same as mentioned in the config will be processed .

Former Member
0 Kudos

Unfortunately, in this file, the first field is a client number, not easy to determine a key.

Thanks for your answer

Edited by: jconderbeke on Feb 27, 2012 5:24 PM

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

After picking up all the records, you might want to handle filtering out last field using mapping. That is one possible way.

Also if the field length is fixed then you might want to try using the following parameters.

Example

element.fieldnames

element.fieldfixedLengths

element.fixedLengthTooShortHandling:Cut

Hope this will solve your problem

Former Member
0 Kudos

When I have added the record.fixedLengthTooShortHandling:Cut I have received the following error :

"Conversion of file content to XML failed at position 0.....

Error converting document line no. 33 according to structure 'record'

Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this

When I put record.'$lastFieldsOptional:YES

I have the following error : The Content of element'record' is not complete. One of '' is expected.

Do you know where can I put a check on the value of this field in the mapping or interface determination.

Thanks a lot

Former Member
0 Kudos

After checking the payload, I have seen that I have at the end the following thing :

<ns:File xlmns:ns="http://world.com/file">

<record>

...

</record>

....

<record>

...

</record>

<record />

</ns:File>

Can someone explain me how to avoid to have this last <record/>, or checking it in mapping ?

Thanks a lot

Edited by: jconderbeke on Feb 28, 2012 12:31 PM