I have a input file in the following format
profile|2007|2
1|1|1|1
2|2|2|2
profile|2007|2
The header and footer needs to be the same and the count of the files given in the header should match with the actual number of rows
I am trying to achieve this in a single transformer.
I am holding the first row in a stage variable and comparing it with the row that comes in as specified in the header.
Code: Select all
IF (@INROWNUM = (Field(svHEADER,'|',3) +2)) THEN (IF svINPUTROW = svHEADER
Suppose if the file comes like this
profile|2007|1
1|1|1|1
2|2|2|2
profile|2007|1
The logic is taken care as the header is compared with 2|2|2|2...The process aborts as the data in the rows didn't match
The problem is i overlooked the scenario if the file comes as follows
profile|2007|100
1|1|1|1
2|2|2|2
profile|2007|1
I am trying to fit the logic for this and working all around without success.
Any advice will be really helpful
Thanks
Pavan