END_IDLE_SQE_THREADS procedure
The END_IDLE_SQE_THREADS procedure will end any idle SQE threads for the current job.
Authorization: None required.
The schema is QSYS2.
When the SQE database engine runs a query using Symmetric Multiprocessing (SMP) or a query that contains a fenced UDF or UDTF, system threads are started. These threads may be left active for a period of time so that they are eligible to be re-used. This can cause problems with an application when a non-threadsafe command is executed after the query is run. When this happens the application receives an error message, CPF180B "Function XXXX is not allowed in a job which has multiple threads." Running the END_IDLE_SQE_THREADS procedure will end all SQE threads for the job that are not actively being used, so this error can be avoided.
Example
- End the idle SQE threads.
CALL QSYS2.END_IDLE_SQE_THREADS();