Asynchronous processing (Understanding concepts)
The utility assumes that when you run multiple tasks asynchronously, you want to finish the tasks as fast as possible. It therefore uses as many system resources as it needs for maximum performance. Your operating system can negate the performance efforts of the utility unless you put them in a high performance job group.
You can control asynchronous processing by using the task manager through the TASKLIM keyword or by using the GROUP and GWAIT control statements with the GRPLIM keyword.
Managing utility tasks with the TASKLIM keyword
You can use the task manager to manage utility tasks, particularly when the utility is stacking files on tape.
To use the task manager, use the TASKLIM keyword to specify the maximum number of asynchronous tasks to perform at one time; the utility automatically manages the task order and overlap. The task manager reduces the complex setup that is required for configuring large processing jobs with the GRPLIM keyword and GROUP and GWAIT control statements.
If the number of tasks to be performed in the job step exceeds the TASKLIM value, the extra tasks wait. When an active task terminates, one of the waiting tasks is then allowed to execute. This process is repeated until all of the tasks have completed. If you use the STACK control statement in the same job step as the TASKLIM keyword, all members of the specified stack are considered a single task.
Using the TASKLIM keyword
You can continue to use existing GRPLIM keyword and GROUP and GWAIT control statement specifications, and they work as they did before the introduction of the TASKLIM keyword.
However, if you use the TASKLIM keyword, the following information applies:
- Specify the TASKLIM keyword on the GLBL statement (only one TASKLIM keyword is allowed in a job step). As the keyword value, specify a numeric value nnnnn (1-32767). The keyword has no default value.
- The TASKLIM keyword is mutually exclusive with the GRPLIM keyword.
- If multiple groups are defined with GROUP control statements, the utility ignores them for the purpose of scheduling tasks. GROUP control statements are now used only for propagating keywords to lower-level actions.
- GWAIT control statements are ignored. The WAIT control statement is still honored.
- If an action is not asynchronous (for example, as specified with the IC control statement rather than the AIC control statement), all previous tasks must complete before the next set of tasks is scheduled. When you use the TASKLIM keyword, it is recommended that you specify all actions as asynchronous.
TASKLIM keyword example
In the following example, the TASKLIM keyword specifies that three tasks may execute at one time.
The utility schedules the stacked asynchronous image copies (AICs) as a single task because the image copies are written to the STK1 stack serially. The utility also immediately schedules the first two AICs that are not stacked. When one of the executing tasks completes, the utility schedules the final AIC task.
GLBL TASKLIM(3)
STACK NAME(STK1) ....
AIC ......IC(STK1)
AIC ......IC(STK1)
AIC ......IC(STK1)
AIC ......IC(*)
AIC ......IC(*)
AIC ......IC(*)
By comparison, if you specify the GRPLIM keyword, the utility treats the three stacked AICs as three separate tasks and the last three tasks would not be scheduled until one or more of the stack actions complete. Therefore, using the TASKLIM keyword and STACK control statement therefore provides superior results with fewer specification than using the GRPLIM keyword.
Grouping tasks with GROUP, WAIT, and GRPLIM
Use function control statements to define the functions to perform. The functions are organized into one or more groups identified by the GROUP control statement.
Each GROUP of functions executes asynchronously with respect to the other GROUPs. Within a GROUP, you can process the individual functions either synchronously or asynchronously as directed by the control statement commands and keywords. See GROUP-group-tasks for details.
To control asynchronous process, BMC recommends that you place all related functions into a single GROUP and place all unrelated functions into separate GROUPs. Then execute the functions within a GROUP synchronously. Since each GROUP of functions is executed asynchronously, one function from each GROUP is executed concurrently.
You are not required to set up your processing as described above. You can execute the functions within a GROUP either synchronously or asynchronously. You can also intermix synchronous and asynchronous functions within the same GROUP. When the functions are mixed in a GROUP, the control statements are interpreted as if a WAIT control statement was specified to separate each series of synchronous functions from a series of asynchronous functions. For example:
AIC DBD(B)
IC DBD(C)
IC DBD(D)
AIC DBD(E)
IC DBD(F)
is interpreted as if it had been specified:
AIC DBD(B)
WAIT
IC DBD(C)
IC DBD(D)
WAIT
AIC DBD(E)
WAIT
IC DBD(F)
Database A and Database B are processed asynchronously and both are completed before Database C is processed. Database C through Database F are processed in sequence.
A series of synchronous functions within a GROUP are always processed in sequence by DBD name and data set group or area regardless of the order of the control statements in the ICPSYSIN data set.
If you have both the ICPSYSIN and the SYSIN control statement data sets in the job step, the resultant tasks are processed as if all of the functions using the SYSIN data set were in a separate GROUP.
DBRC considerations
In asynchronous processing mode, if any data set group or area in a database is registered with DBRC, all data set groups or areas that are being asynchronously processed from the database must be registered with DBRC. Additionally, the data set names must match the names described in the RECON data set. Some of the asynchronous tasks might abend if not all the data set groups or areas are registered or the data set names are not accurately specified.
When functions are executing synchronously, DBRC authorization is obtained separately for each database, partition, and area.
Stacked data sets
When multiple image copy data sets are stacked on one tape volume, the data sets are written to the tape in synchronous mode.
You can still gain performance improvements by specifying the image copy function as asynchronous, especially when copying small VSAM data sets.
When stacking in asynchronous mode, the utility writes the output to the tape based on the scheduling of the function. The data sets on the tape may not be in the same order from job to job, and they may not be in the same order as the input control statements.
The order that the image copy data sets are written to the stack significantly affects processing performance when you must later use the tape as input to a recovery process. For this reason, BMC recommends that you use synchronous processing to write the output image copies in order by DBD and data set group or area.