in reply to Help with arrays/sub procedures

I'm not entireley certain what the problem is, all in all, especially without a sample data file to see what's going on. I can say, however, that it appears that CLAIMS is comprised of fixed-length records, seeing as how you're doing a whole lot of substr to pick the file apart character by character.

In a case like this you really, really, REALLY want to use unpack. Trust me on this one... the pack/unpack functions were born to handle fixed-length strings like what you have. unpack will slice through your data like a hot knife through butter, it will leap the tallest buildings in a single bound, it will guarantee your promotion and buy you a nice house in the country. Read up on it and become enlightened.

Gary Blackburn
Trained Killer