I have a 2GB CSP.log file that I need to investigate.

I'm using a %Stream.FileCharacter() object to open the file and then using the .FindAt() to search for a particular string.

I'm seeing the FindAt() stop after processing 49m characters?

Here is my code:

s stream=##class(%Stream.FileCharacter).%New()
d stream.LinkToFile("d:\csp.log")
s x=""
s i=0
s j=0
w stream.Rewind()
w stream.AtEnd
w stream.SizeGet()
while(stream.AtEnd=0){set i=stream.FindAt(-1,"Invalid password",x)+i  set j=j+1}
w stream.AtEnd
w i
w j

Which gives the following output:

0 7
0 695