In addition to what Scott already said:
Once you've got the data in the data buffer (_infile_) you could also use Regulare Expressions to pick the substrings you need to populate your variables.
You could investigate prxsubstr and prxparse.
... View more