User Answers

This is a side effect of how Caché finds the string, the code performs a read() on the stream to load a chunk into memory before searching for the string.

The read() is setting the AtEnd property, but if the string being searched for appears more than once in the chunk in memory, only the first occurrence will be found.

So in order to read all occurrences of the string, you should not sue the AtEnd to determine when to Stop.

The following code will count the number of times "Invalid password" appears in the file.

If I was doing this I would do the following:

  • Configure your 2017 instance with the same Namespaces/Database as the 2007 instance
  • On the 2007 instance - take a Full Backup
  • On the 2017 instance - Restore the Backup

If you need/want to configure the 2017 databases to different locations than the 2007 instance, that's fine, just specify the new locations when using ^DBREST to perform the Restore.