This may be an off-the-wall answer, but something to think about.

The QZDASOINIT jobs that handle the ADO requests are set up by default to handle 200 "uses" before they die and another takes their place. See WRKSBSD QSYS/QUSRWRK option 10, 5 on QZDASOINIT. This is off-the-wall because it should NOT affect your ADO connection, but then again it might. What put me on it was the number of rowsets you get successfully. If there are two "uses" per rowset ...

Try changing the number of uses in the prestart job entry and see if it changes the number of rowsets you get successfully.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael Naughton
Sent: Monday, October 08, 2012 10:38 AM
To: Midrange Systems Technical Discussion
Subject: Stored Procedure Returns Closed Recordset

This may not be the right list for this post, but since I'm not sure what the problem is I'm not sure where to ask.

I've got a Domino web server running on Windows 2003 Server. An agent on the server calls a stored procedure on my iSeries multiple times, expecting a recordset with a single row each time. The call is over an ADO connection. When the agent has received enough rows that meet its criteria, it returns the results to the browser and shuts down. This can happen relatively quickly, or the agent might potentially have to search hundreds or even thousands of rows before it finds enough. The agent opens the connection at the beginning and loops until it finds enough rows.

I'm finding that after about 100 calls to the stored procedure, the agent reports that the recordset is closed and stops, even though it hasn't found all the rows it should have. I've confirmed that if I close and reopen the ADO connection every so many passes (say, 80), then the agent keeps running until it finds all the rows it's supposed to find.

My question, basically, is what is going on? I'm guessing it's a timeout issue, but I'm not a real expert and I'm not sure where to start troubleshooting. Is it more likely to be something on the Domino server that is limiting the connection, or might it be something on the iSeries? Or is it maybe something in the ADO connection itself? I'm really not sure where to start -- I googled "stored procedure returns closed recordset", but I didn't find anything that seemed very helpful ....

Thanks very much for any advice ....

Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA 01376
Internal: x 444
NOTICE: This e-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that any use is strictly prohibited. If you have received this e-mail in error, please notify us immediately by replying to it and then delete it from your computer.

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page