How is the 'THREADS' parameter used and what is the recommended setting?
The Batch Processor 'THREADS' parameter is found in the hlq.PARMLIB(BATPROC) library member. It allows the user to specify whether to use single or multiple threads for SELECT and SQL processing.
The 'THREADS' parameter can be set to either '1' or '2'.
Single-threading can be achieved by setting the parameter to '1' and this can avoid any potential object contention problems, such as -904 SQL errors.
DSNT408I SQLCODE = -904, ERROR: UNSUCCESSFUL EXECUTION CAUSED BY AN
UNAVAILABLE RESOURCE. REASON 00E70010, TYPE OF RESOURCE
00000801, AND RESOURCE NAME AUTHPLAN_COM.PTADRVAC.17706531010-
However as object contention problems for the Batch Processor are exceptional and very rare, it is recommended that the 'THREADS' parameter be set to '2', to obtain the performance improvements when using multiple-threading.