Implicit sort task assignment
You can use the placement of SORT control statements to assign implicitly a series of groups to a sort task.
A GROUP control statement that does not include a SORT keyword is assigned implicitly to the SORT control statement that precedes it. Placing SORT control statements within a series of group commands is a simple way to distribute the sort workload for multiple groups, as shown in the following example:
//CAPSYSIN DD *
GLBL DBRC(Y) ...
SORT SORT(SRT1)
GROUP CAGRP(CAGRPT04) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT07) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT09) FUNC(CA) CA((*,DASDCA))
SORT SORT(SRT2)
GROUP CAGRP(CAGRPT02) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT05) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT08) FUNC(CA) CA((*,DASDCA))
SORT SORT(SRT3)
GROUP CAGRP(CAGRPT03) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT06) FUNC(CA) CA((*,DASDCA))
GLBL DBRC(Y) ...
SORT SORT(SRT1)
GROUP CAGRP(CAGRPT04) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT07) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT09) FUNC(CA) CA((*,DASDCA))
SORT SORT(SRT2)
GROUP CAGRP(CAGRPT02) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT05) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT08) FUNC(CA) CA((*,DASDCA))
SORT SORT(SRT3)
GROUP CAGRP(CAGRPT03) FUNC(CA) CA((*,DASDCA))
GROUP CAGRP(CAGRPT06) FUNC(CA) CA((*,DASDCA))
In the preceding example, the following sort task assignments are made:
- Groups CAGRPT04, CAGRPT07 and CAGRPT09 are implicitly assigned to SRT1.
- Groups CAGRPT02, CAGRPT05 and CAGRPT08 are implicitly assigned to SRT2.
- Groups CAGRPT03 and CAGRPT06 are implicitly assigned to SRT3.
Related topic
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*