this is Teja and I have a certain problem here. I have to create a FlatfileSchema for a file with the following data.
length
Header 1(5,4)
Detail(s) 2 (9)
Trailer 3(5,4)
I am unable to Parse the File
the above is a fixedlength file and i am a bit confused as it consists of 3 different records and how should i combine them. as these are the three records from a file. how can I parse them?
Can somebody suggest the help as it is quite urgent. immediate help is Appreciated. i have searched the threads existing but unable to find the answer…
Tell us about your existing FFSchema,so that we can assist you in better way.Also please go thru the ISFlatFileSchemaUserguide for setting up delimiter or fixedlength schemas.
You can also select delimiter option and specify record parser,field or composite delimiters based on your sample flatfile data.
If you dont have record identifiers,then set RecordDefinition to recordWithNoID and define fielddefinitions.Try to create like this
Your field positions should be exact the same that you define in fielddefinitions (FixedPosition option).If your RecordDefinition and fielddefinitions matches against yoru flatfile data then only ff parse will be successful.
I have added the Records Header
–Detail(s)(Unlimited property)
–Trailer
and also used the Delimited property with recorddelimiter as “newLine” and there is no fieldDelimiter.
but, I see Each of the Record is not being identified as unique and the data in Secondrecord is also getting populated in the fields of the First record again with the Documentlist “recordWithNoID[0] and recordWithNoID[1]” and so on…
Where can i define the record ID that would be Identified the parser individually each record.
Select the Delimiter option and not fixed length option.
Is your record identifier is recordID(same name for Header,Details,Trailer)??It should be different and independent then you can define RecordDefinition one for each (Header,Details,Trailer) like i shown above
Can you upload your sample flatfile,Go Advanced and browse file for uploading,so that we can have a look regarding format.i am confused with your file format.
I checked your file but it doesnt starts with recordID (as starting element)??
If not recordWithNoID is the only option for parsing your file…but there is no way you can identify the header/details/trailer record with out differentiating. Iin your file if 1 means (Header) and 2 repeats(Details) and 3 (Trailer) then base these as record identfiers and it will work
Teja,
If your records start with 1, 2 and 3 , then while creating the schema you can make 1,2,3 as the name of your record definition.
Let me know if this works.
thanks a lot for your help.:happy: :happy: :happy:
this did helped me. i have named the records with the 1,2,3 and the Parsing is done successfully.I am even clear now with this concept too.
This was a layout that i got to parse and now i think i can proceed further with the process.