After an absence from PBCC for a few years, I am wanting to get back at it. I have a small project that I want to undertake which involves a flat ASCII file, which sometimes contains CR, CR/LF or just huge, long lines. The file sizes can range from about 200Kb up to over 2Mb.
To get useful information out of the data, I really need to clean it up. I was hoping to bring the complete file into a single large variable and from there, remove/parse/amend the data.
In the past, I have used Sequential files a little, but by no means would I say I was an expert. For this project, I think I want to use a Random file, reading in all the data (2Mb worth) in one pass in to a single variable. From there, I would use MID$, among others to cleanse the data.
So.. My question. Could I get some guidance on reading the file into one large variable – not picky if it is a Sequential or Random file, I just need to get the data in. From there. I will parse out most of the information and write back out a Sequential file.
Thanks,
John
To get useful information out of the data, I really need to clean it up. I was hoping to bring the complete file into a single large variable and from there, remove/parse/amend the data.
In the past, I have used Sequential files a little, but by no means would I say I was an expert. For this project, I think I want to use a Random file, reading in all the data (2Mb worth) in one pass in to a single variable. From there, I would use MID$, among others to cleanse the data.
So.. My question. Could I get some guidance on reading the file into one large variable – not picky if it is a Sequential or Random file, I just need to get the data in. From there. I will parse out most of the information and write back out a Sequential file.
Thanks,
John
Comment