You can also control query parallel processing at the job level using the DEGREE parameter of the Change Query Attributes (CHGQRYA) command. The parallel processing option allowed and, optionally, the number of tasks that can be used when running database queries in the job can be specified. You can prompt on the CHGQRYA command in an interactive job to display the current values of the DEGREE query attribute.
Changing the DEGREE query attribute does not affect queries that have
already been started or queries using reusable ODPs.
Job: B,I Pgm: B,I REXX: B,I Exec
(1) (2)
>>--------CHGQRYA----------------------------------------------->
>----+---------------------------------------------------------+>
| .-*--------------------------------------------. |
'-JOB(--+-+--------------+--user-name/---job-name---)--+--'
'-job-number/--'
>----+------------------------------+--------------------------->
| .-*SAME---. |
'-QRYTIMLMT(--+-*NOMAX--+--)---'
+-*SYSVAL-+
'-seconds-'
>----+------------------------------------------------+--------->
| .-*SAME-----------------------. |
'-DEGREE (--+-*NONE-----------------------+--)---'
+-*IO-------------------------+
+-*OPTIMIZE-------------------+
+-*MAX------------------------+
+-*SYSVAL---------------------+
+-*ANY------------------------+
'-*NBRTASKS--number-of-tasks--'
>-----+---------------------------+----------------------------->
| .-*SAME--. |
'-ASYNCJ (--+-*LOCAL-+--)---'
+-*DIST--+
+-*NONE--+
'-*ANY---'
>-----+---------------------------+----------------------------><
| .-*SAME--. |
'-APYRMT (--+-*YES---+--)---'
'-*NO----'
Notes:
The parameter values for the DEGREE keyword are:
Using a number of tasks less than the number of processors available on the system restricts the number of processors used simultaneously for running a given query. A larger number of tasks ensures that the query is allowed to use all of the processors available on the system to run the query. Too many tasks can degrade performance because of the over commitment of active memory and the overhead cost of managing all of the tasks.
The initial value of the DEGREE attribute for a job is *SYSVAL.