I have created a Flat file schema with the “recordWithNoId” as record defintion with Max repeat=Unlimted.
Under the record, created the field definitions(field=1,2,…12)
under FlatFile Defnition:
Record Parser: Delimiter
Character: newline
filed or composite: |
When I try to test this schema , it is showing up the below error:
“com.wm.ff.parse.ParseException: [FFP.0012.0004] Found no valid records”
I tried with recordWithNoID instead of recordWithNoId
but still I am getting the same error
“com.wm.ff.parse.ParseException: [FFP.0012.0004] Found no valid records”
It looks you have everything in place based on your above comments,try flatfile with one line instead of multiple lines and make sure you have defined everything in the flatfile as per the sample data you have
I don’t see why it is not working, but I can suggest the pub.string.tokenize alternative using “|” as your delimiter to extract your data, and then work it from there.
Hi,
I have tried using single line. It is still fails.
I am attaching the zip file with this message. Please go through that and let me know where I am wrong…
Try setting the field positions as Nth field.
And also set the default record to the record you defined.
I’m assuming you are using a 6.X version. recordWithNoID does not work like it did in 4.6. I have lots of discussion on here about that.
The “new” way is to use the default record.
For more details use the search feature for recordWithNoID or default record.
But first try my first two suggestions.
In 6.x i believe with out using default record the recordWithNID will work i am not sure whether you are missing selecting of Nth field option while you defined field position.(1,2,3,4…).
If this not works try with default record option unless you have dictionary created.
I am not clear about setting the default record option.
Could you please let me know how to set the default record in dictionary. I looked under SETTINGS for that, but unable to find.
version 6.1
Input flat file is
//1st record
018301014 - 00000009047+000000000002005100312:47:19200510030000
2032J Wilson Copsey PO Box 402 Mechanicsville
D 20659-0402
ACCL
// 2nd record
047551001 -00000088288+000000000002005100402:07:08200510040000
6590Delores E Wathen C/O Est of James M Wathen PO Box 165
Faulkner MD 20632-0165
ESTRF
//3rd record
055556001 -00000029432+000000000002005100307:48:33200510030000
8361Capt William Runyon PO Box 114 La Plata MD 20
46-0114
ACCL
//4th record
hi ,
i am having the same problem with flatfile schema , when i run my schema and give the flatfile as input it says " no valid records" i saw ur post and u said it worked ,can u tell me what changes u made to make it work .
mine is a fixed length flatfile schema.
thanks
sri
Pl elaborate your scenario for ppl here to be able to help you better. As for prob reported by Sunny’s, I tried his scenario and was able to make it work by defining a FF Dictionary with a record named “recordWithNoID” that had 12 fields (looking at the data that Sunny posted, there were 12 fields in each record, separated by | ). I then created a record reference in the FF Schema and pointed it to the record in the FF Dictionary, also I set the default record property of the FF Schema to the “recordWithNoID” of the FF Dictionary.
Under the FF Definition tab of the schema, I defined Record Parser as “Delimiter” and defined a “newline” as a record delimiter and a “|” as the field delimiter. Thereafter I was able to submit the data Sunny posted in his first post and the data was successfully parsed.
hi rohit,
i have a flat file with 5 record , each is a doc list , and unlimited occurances. so my each rec is of fixed length, and i want to know how can i specify a defaullt record (bec i have 5 records ),and also if i dont create a dictionary does it throw a exception, bec i created a schema with 5 rec with all the options as above .and when i give my input file to validate schema it says valid record not found.
my sample file looks like this
rec1
rec2
rec3
rec1
rec2
rec3
rec1
rec2
rec3
…
…
as u can see each line has a record and each record is fixed length ,and the set (rec1,rec2,rec3) repeats unlimited…
i am just not understanding how can i make it work …
thanks
srikanth
hi rohit,
ok ill explain in detail ,the incoming flat file is a batch file ,so consider one single file contains 3 lines with each line data is a different record, so we have rec1
rec2
rec3
so this is a single file,but as we have a batch file the incoming file will have unlimited occurances of that seq ,like rec1
rec2
rec3
rec1
rec2
rec3…
so my question is ,how should i create schema for this kind of incoming batch file.