I've recently taken over support of a homegrown Notes database. An agent runs daily in this database on all documents and pulls data from a flat file (which lives on the same server as database) and uses subroutines to process adds, deletes and changes to person docs in a Name and Address Book. Recently it's stopped working. I get error messages in the log such as error: "Subscript out of range" or "Out of memory not enough system memory". When I run the agent through debug I get an error message "Can't open file". My ID has full Admin rights to the server. Any suggestions would be greatly appreciated.
Software/Hardware used:
ASKED:
September 24, 2004 9:52 AM
UPDATED:
September 24, 2004 10:20 AM
Subscript out of range is almost always related to an array index. You’re going to have to debug this agent.
Do you have an array on integers that get used as filehandles?
Something like this?
dim aFileNumber() as integer ‘ filehandle
dim Path as String ‘file location
…Other code
fileNum(i) = Freefile()
…Other code
For i = 1 To UBound(fileNum)
Open Path For Output As fileNum(i)
…Some Processing…
close fileNum(i)
next i
If you have something like this, you might want to look a this array. Also, look at the Path variable. It could be wrong.
Three different error messages, interesting. It looks like the originating culprite is the “Can’t open file” error message. Locate teh file it is trying to open and determine from the Operating System level that the file exits and then check the file permissions to ensure they haven’t been restricted recently.
Next, I’d look at the Subscript out of range error. This occurs when teh code is using an array and doesn’t resize itself correctly. This couild occur if the agent can’t access the info in the file, even if it can open the file.
To look at he out of memory issue, which version of Domino are you running, and what Lotus products are on the server? Is it an applicaiton only server, does it run mail also, does it run Domino.Doc or any other product?