We are trying to read a file that has records with variable lengths.For example, one record has 5 Fields, the second record has 7 fields, the third record has 4 fields.
What would be the simplest way to read such a file. Please let me know.
When reading a sequential file you can specify attributes for what to do when a column is missing or null. I would suggest you define the maximum number of columns but for those that might be missing in certain rows declare them to be empty when they aren't defined in the source.
If you have a preprocessing script like Shell/perl script, You can also convert the file as a delimited file and read it from the sequential file stage.