Record_00 should be able to read the values from line starting with 00
Record_01 should be able to read the values from line starting with 01
Record_02 should be able to read the values from line starting with 02
I am not able to figure out where to specify the prefix for the lines in the flat file schema. I am using wM 6.1
Please help.
Thanks in advance.
Veena.
I believe there is no way to specify the prefix for the RecordDefinitions,since the flat file has 00,01,02…as record identifiers you can only specify RecordDefinition (00)then only flatfile parsing works perfectly.
I am not sure why this makes difference for you when the RecordDefinition show like 00 instead of Record_00 in the DT.
Another way might be once your parsing is done then you replicate the DT structure and just rename the 00 to Record_00 and so on… and directly map the individual documents.
I did not notice before I posted the message that the indentation for the records are missing. Record_00 is the root, Record_01 is under Record_01 and Record_02 will be under Record_01
But the schema is not letting me to extract the data in this way.
Then your fixed lenght schema should be created this way.
Create root RecordDefinition(Record_00)under this build the fielddefinitions and in the same hierarchy level create RecordDefinition (Record_01)under this build fielddefinititions and in the same hierrarchy create RecordDefinition (Record_02) and build field definitions etc…
Record00
FieldDefinitions…
—Record01(set this to unlimited for multiple iterations)
FieldDefinitons…
-----Record02
FieldDefinitions
and if Record01 is multiple then set in the properties panel as "unlimited"so that this record will be repeated.
I did build the schema for with the structure I mentioned. But then I am not able to specify about the prefix and hence the schema is not working! We are doing an upgrade and in the old version, FileIO adapter was being used and there we could specify the prefix 00 or 01 or 02. Here I am not able to specify the prefix and hence my schema is not working!
still wondering which prefix you are talking about?Where it should appear…is you flat file coming with 00,01 etc…and you want the RecordDefinition as (Record_00,Record_01 etc…)if so there is no way to specify prefix in the Schema,ultimately your parsing fails.
As I showed in the first post, the flat file I am receiving has lines starting with 00 or 01 or 02 or 03. I should parse the line starting with 00 into Record_00 and line starting with 01 int Record_01 and lines starting with 02 into Record_02. How can I do that with the flat file schema?
I believe this is not possible to handle in the Schema itself since unless your flatfile has the lines starting with Record_00 etc…then the FF will parse.
May be someone handled this type of problem,let c.
That is how I have tried to handle the Flat file schema. I have also set the record identifier starting psosition to 0. But when I test the schema. I get only the Record_00 in the output!
The child records are within the parent records so in your case the 00 record would contain the 01, 02, … records. To process correctly you would have to loop over the 00 records to get to the 01’s. If you trace to after the transform and you do not see this type of record structure in the results tab then your schema is most likely at fault. I am emailing you my examples but it sounds like you are pass this point.
If this does not help and you are still having a problem then maybe we can do a Live Meeting so I can see what you see.
That is what i suggested in the above posts if flatfile is starting with 00 then your recorddefinition(RecordName) should be defined as 00 then schema will parse as expected.
Constraints:
1.Each record is identified by the First character.
2.The B and C records can occur any number of times and in any order.
3.A is header and D is trailer occur only once.
We tried creating each record with name as A/B/C/D and defined the schema with record parser as ‘\n’
After parsing we are getting the records in thefollowing order.
A
B
C
–B –> coming as child to C
–B –> coming as child to C
–C –> coming as child to C
D
Our requirement is
A
B
C
B
B
C
D
In the WMUSERS.com we have seen simliar solution given by you. We are not getting the clear picture of the solution mentioned there.
Your help will be greatly appreciated. please send us if there are any examples to achieve this ASAP