B
brian.gabriel
I am trying to read a file that was produced on a mainframe, it is a
text output of a mainframe report. I am able to read in part of the
file, the problem is that between each "page" of the report there is a
NULL character. The streamreader will read up until it sees this
character then it stops, the end result being that most of the file
does not get read.
Here is the byte pattern that is at the end of each page: 0D 0A 00 0C
0D 0A
Is there an easy way to read in this file without having to put it
into a byte array and futzing with all of that?
I have tried the following:
StreamReader re = File.OpenText(SourceFile);
string sTemp = re.ReadToEnd();
And:
StreamReader re = File.OpenText(SourceFile);
while((sTemp = re.ReadLine()) != null)
{
sLine = sTemp;
//etc...
}
Thanks,
Brian
(e-mail address removed)
text output of a mainframe report. I am able to read in part of the
file, the problem is that between each "page" of the report there is a
NULL character. The streamreader will read up until it sees this
character then it stops, the end result being that most of the file
does not get read.
Here is the byte pattern that is at the end of each page: 0D 0A 00 0C
0D 0A
Is there an easy way to read in this file without having to put it
into a byte array and futzing with all of that?
I have tried the following:
StreamReader re = File.OpenText(SourceFile);
string sTemp = re.ReadToEnd();
And:
StreamReader re = File.OpenText(SourceFile);
while((sTemp = re.ReadLine()) != null)
{
sLine = sTemp;
//etc...
}
Thanks,
Brian
(e-mail address removed)