Values supported on the Batch (BATCH) parameter include *YES and *NO. A value of *YES indicates that the request will be submitted to batch. A value of *NO will cause the request to run interactively. The default value varies from command to command, and is based on the general usage of the command. If a command usually requires significant resource to run, the default will likely be *YES.
Some commands, such as Start Data Group (STRDG), perform a number of interactive tasks and start numerous jobs by submitting the requests to batch. Likewise, some jobs, such as the data group apply process, run on a continuous basis and do not end until specifically requested. These jobs represent the various processes required to support an active data group. Commands of this type do not specifically provide a batch (BATCH) parameter since it is the only method available.
For commands that are called from other programs, it is important to understand the difference between BATCH(*YES) and BATCH(*NO). Implementing automatic audit detection and correction support is easier to accomplish using BATCH(*NO). Let us assume you are running the Compare File Attributes (CMPFILA) command as part of an audit. If differences are detected, specifying BATCH(*NO) allows you to monitor for specific exceptions and implement automatic correction procedures. This capability would not be available if you submitted the request to BATCH(*YES).