>
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?
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.