Flat File Schema

Hi,

I have a flat file with a header segment say A and then sub segments B,C,D. Here is how it looks like.
A
B
C
D
B
C
D
A
B
C
D
B
C
D

How should I create a FF schema for this type of data.

Thanks,
Pauly

Pauly,

Its all depends on the flatfile how it is passing.
Anyways create Schema RecordDefinition A (unlimited)and under this create another child RecordDefinition B (A/B)(keep this unlimited) under this create RecordDefinition (B/C)and under this same hierrachy create RecordDefinition D (B/C/D)…

And later Test with a sample,it should work.

HTH,
RMG.

RMG,

B,C and D are on same level and are under A. C is not a child of B.

Pauly

Interesting…So did u tried definining the RecordDefnitions (A)childs B,C,D)and settting all the RecordDefinitions as (unlimited)?

HTH,
RMG.

RMG,

I could convert the data to ffValues but how will I loop through the data. Seems like I will have to write a java service.

Thanks,
Pauly

Pauly,

I am not sure why the loop wont work,but it is all depends on your target side structure definition and mapping rules.

Please elaborate us if it is possible,

HTH,
RMG.

Paul, you don’t require a java service to loop thru this.
You need to tell it that A repeats unlimited and that will create it as a recordList.

Pauly,

I believe at this point you have set ‘A’ RecordDefinition to(unlimited)in the FFSchema,then ffValues output as a recordList and ultimately loop thru work fine,i have mentioned this in the above posts hope you have noticed it…

HTH,
RMG.

Thanks RMG and Chris. I have created schema like

A (unlimited)
B (unlimited)

And I get C and D under B.

Regards,
Pauly

your welcome,Glad to know that.

hai,
Iam getting this error,while run the sefparse service in developer.It is occuring while input variable envelope process is set to true in this service.This error is
“com.wm.ff.parse.SEFFormatException: [FFP.0000.0027] Unable to parse Transaction set 210: [FFP.0013.0008] Configuration error: [FFP.0013.0007] Missing sef file packages/WmEDI/config/ICS4X12.sef for stanard X12
with regards,
venkat