× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



QAQQINI has a parameter for elapsed seconds. I'd assume the SQL status
code would indicate the timeout.

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzajq/qryopt.htm#qryopt


tim2006@xxxxxxxxxxx 03/02/2009 3:38:00 PM >>>
Tom,

Its possible that a query such as "select * from customer where custname
like %a_b%" is possible. The file has close to 1 million records. I was
wondering if I could put a time limit on the execution of the query. So,
say
after 30 seconds the query stops querying and returns a time allotted
has
expired or something like that.

I am using service calls to my iseries. These jobs are running in batch.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Armbruster, Tom
Sent: Monday, March 02, 2009 5:45 PM
To: RPG programming on the IBM i / System i
Subject: RE: rpg sql timeout question

Good question, but a dangerous one at the same time. For what reason
would you want to time out a request to the database? There are only a
few reasons that SQL requests would time out:

1) CPU utilization is too high.
2) The query is written for updates on locked records.
3) The query is processing a large amount of data without the necessary
resources.
4) The query is not optimized.

Before concerning yourself with timeouts in native RPG, you may want to
ensure that you have optimized the data access methods. Running SQL
interactively can be a slow process if the files and the query
statements are not optimized. If the queries do not need to run
interactively, consider pushing them to a batch process. If interactive
is required, optimize the queries as much as possible.

What is the situation you are referring to for which you want to
consider time outs?

Tom Armbruster

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of tim
Sent: Monday, March 02, 2009 11:57 AM
To: 'RPG programming on the IBM i / System i'
Subject: rpg sql timeout question

Is there a way to have a possibly long running sql performed in an
SQLRPGLE
program, to time out after running for a certain amount of time?






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.