Skip to Content
0
Former Member
Nov 20, 2007 at 02:36 PM

Read input file with generic structure (FTP2IDoc)

43 Views

Hi i have following problem.

I have an File on FTP where the structure is kindly different in each row. Because of simplifying it, i chose to make a Datatype which might cover all the requirements of reading the file. Mapping does not interest now!

File is a csv where the

first 16 rows have 5 fields

next 15 rows have 8 fields and

next 5 rows have 6 fields.

I created this MT:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_CAD_CSV_SIMPLE xmlns:ns0="http://de.xi.hatz-diesel/coscom">

<CADRecordSet>

<CADDetStruct>

<DATA01/>

<DATA02/>

<DATA03/>

<DATA04/>

<DATA05/>

<DATA06/>

<DATA07/>

<DATA08/>

</CADDetStruct>

</CADRecordSet>

</ns0:MT_CAD_CSV_SIMPLE>

In FCC i configured as follows:

CADDetStruct.fieldNames:DATA01,DATA02,DATA03,DATA04,DATA05,DATA06,DATA07,DATA08

CADDetStruct.fieldFixedLengths:60,60,30,30,30,30,30,30

CADDetStruct.lastFieldsOptional: YES

CADDetStruct.endSeparator:'nl'

CADDetStruct.processFieldNames: fromConfiguration

The problem is that when i want to read the file, it's being read but there is only one row read - and it is not the first but the thrid last.

I dont' understand why the other rows with datafields are not being read?!

All other datafields are less longer than specified in CADDetStruct.fieldFixedLengths - so where is the problem?

br