I am trying to validate the sequence of my flat file per Transaction Number by TypeCode column.
Table below is the correct sequence.
Trans# | Code | Name | TypeCode
12345 | 46729 | VM RYC FF | M
12345 | 23931 | VM COKE | MC
12345 | 83178 | VM FRIES | MC
12345 | 43421 | JEDI | MT
12345 | 23251 | SOUP | MAO
12345 | 1 | RICE | S
12345 | 42891 | VM CHCKN | M
12345 | 23144 | VM COKE | MC
M is the start of the meal grouping and ends in either MC, MT or MAO depending on the data.
Here are the rules that i need to accomplish.
- M should only have MC, MT, and MAO per meal grouping
- MC, MT, or MAO should always be preceded by an M per meal grouping.
- MC can be followed either by MT or MAO per meal grouping.
How can i do that using a script component.
View Complete Post