I see the same behavior. I suppose you would need to detect and reject that last scenario (Field3 = 333|444) in a Transformer stage constraint following the Sequential File stage.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Read the line as a single VarChar field and effect the parsing in a Transformer stage. If the field does not exist, Field() returns "". The Field() function has a fourth argument, so Col3 would be derived as, for example,
If you configure Sequential File Stage with below properties and everything else to the defaults or however you need them to your file needs, any record with more (or less) than specified number of columns will be rejected. And you can actually capture these rejected records in a reject file with error message at the end of every error record.
Add a reject link to the input Sequential file stage and configure a file to capture rejects. Then configure the original input file (not reject file) as below:
In Output TAB/Format TAB
1. Record Level/Final Delimiter = end
2. Field Defaults/Delimiter = |
In Output TAB/Properties TAB
1. Options/Reject Mode = Output
2. Reject Reason Column = <column name for your error, perhaps as Error_Message>
This should allow you to capture all rejects with error messages.
The Rejects link only captures rows that do not match the metadata for the row. Since you want to capture the case where there are more than the defined number of fields, rather than reject them, the Reject link is probably not your desired solution.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.