Documentation >
MAC-PAC Reference and Help >
Technical Support >
Key Concepts and Procedures >
Control Language >
Batch Program Callers
Batch Program Callers
Characteristics
Batch program callers have the following characteristics:
· They are used to execute RPG programs that run in the batch mode subsystem QBATCH.
· Each represents a batch job to the operating system.
· They are executed from the off-line menus using the SBMJOB command.
Note: The job log plays an important role in batch processing. Job logs show the execution steps of the batch and then the disposition. Any errors on the job log should be investigated. The job log generally prints before any other output is printed.
Processing
The following processing takes place in each batch program caller:
· Check Existence of Objects. All data base, display, and printer files are checked, using the CHKOBJ command, to ensure that the objects exist in the system.
· Allocate the Data Base Files. All data base files required by the program are allocated. The most common types of allocation for batch programs are exclusive-read only and exclusive only (*EXCLRD,*EXCL). The batch subsystem is designed for the execution of one job at a time, without any online update programs running. If the program cannot allocate the files, a message is sent to the system operator (QSYSOPR) asking whether to cancel the job or to try to allocate the files again.
· Apply Overrides. Any overrides to data base files or printer files are applied. Program-defined print files are usually overridden to the IBM-supplied externally described printer file QPRINT. If two print files are used by the program, the IBM supplied printer file QPRINT2 is used and output is sent to the output queue QPRINT.
· Call the Program. The RPG program(s) is (are) called.
· Clear the Transaction File. The transaction files are cleared after the RPG program is finished. The only exceptions are the Inventory Control and Shop Floor Control Audit Trail Files. These must be reorganized by an RPG program executed from the System File Support Menu. The CLRPFM command is used to clear physical files.
· Deallocate the Data Base Files. The command DLCOBJ is used to deallocate the data base files.