Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / June 2006

Tip: Looking for answers? Try searching our database.

CHGQRYA and UDF_TIMEOUT

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnO - 07 Jun 2006 00:05 GMT
Hi All,

I need to increase the UDF_TIMEOUT value within the scope of a job, and
had hoped to use CHGQRYA to do this. However there seems to be no
UDF_TIMEOUT parameter to this command.

I can change the UDF_TIMEOUT within the QAQQINI file and that works,
but it is global to the system which is not desirable.

Is there any way to set UDF_TIMEOUT within a job's scope?

Thanks,
JohnO
4.spam@mail.ru - 07 Jun 2006 07:25 GMT
> I need to increase the UDF_TIMEOUT value within the scope of a job, and
> had hoped to use CHGQRYA to do this. However there seems to be no
[quoted text clipped - 4 lines]
>
> Is there any way to set UDF_TIMEOUT within a job's scope?

Hello.
Create a copy of QAQQINI in some library, change this parameter there
and call CHGQRYA command with this file before you use your udf.
You can call CL commands from SP/UDF with this procedure:
-----
CREATE PROCEDURE DWH.QCMDEXC2(IN CMD VARCHAR(4096))
LANGUAGE SQL
BEGIN
DECLARE CMDLEN DECIMAL(15,5);
SET CMD=TRIM(CMD);
SET CMDLEN = LENGTH(CMD);
CALL QSYS.QCMDEXC(CMD, CMDLEN);
END;
-----
and in your SP/UDF:
-----
DECLARE stmt VARCHAR(4096);
DECLARE cmdlen DECIMAL(15, 5);
--DWH there is my library name
SET stmt = 'CHGQRYA QRYOPTLIB(DWH)';
SET cmdlen = LENGTH(stmt);
call qsys.qcmdexc(stmt, cmdlen);
-----
I do so and it works.

Sincerely,
Mark B.
JohnO - 07 Jun 2006 20:55 GMT
> > I need to increase the UDF_TIMEOUT value within the scope of a job, and
> > had hoped to use CHGQRYA to do this. However there seems to be no
[quoted text clipped - 32 lines]
> Sincerely,
> Mark B.

Hey, good thinking!

Thanks,
JohnO
JohnO - 07 Jun 2006 20:57 GMT
> > I need to increase the UDF_TIMEOUT value within the scope of a job, and
> > had hoped to use CHGQRYA to do this. However there seems to be no
[quoted text clipped - 32 lines]
> Sincerely,
> Mark B.

Hey Mark, just wondering... if my QAQQINI copy has just one entry,
UDF_TIMEOUT, rather than being a full copy of the usual QAQQINI, would
the system be smart enough to inherit the original settings for all the
values? Or is that just wishful thinking?

Cheers,
JohnO
Kent Milligan - 09 Jun 2006 16:14 GMT
Yes, DB2 for i5/OS is smart enough to do that.

Depending on the interface that you're using, you can also specify your
"private" QAQQINI file with a connection property and have the driver execute
the CHGQRYA for you.

>>> I need to increase the UDF_TIMEOUT value within the scope of a job, and
>>> had hoped to use CHGQRYA to do this. However there seems to be no
[quoted text clipped - 39 lines]
> Cheers,
> JohnO

Signature

Kent Milligan
ISV Enablement - System i
kmill@us.eye-bee-m.com (spam trick)   GO HAWKEYES!!

>>> ibm.com/iseires/db2
(opinions stated are not necessarily those of my employer)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.