Documentation >
MAC-PAC Reference and Help >
Technical Support >
Key Concepts and Procedures >
Control Language >
Online Program Callers
Online Program Callers
Characteristics
Program callers provide the control language structure for calling online, batch, asynchronous, support and compilation programs.
· They serve as intermediaries between the menu and the RPG program.
· They pass fast path codes and data from menus to RPG programs and vice versa.
· They provide the framework for the Security Control function.
Processing
The following processing takes place each time an online program is called:
· Check Existence of Objects. All data areas are checked using the CHKOBJ command to ensure that the objects exist in the system. This step is sometimes performed for files as well.
· Allocate the Data Base Files. All data base files required by the program are allocated using the ALCOBJ command. The most common types of allocation for online programs are shared-read only and shared-update (*SHRRD,*SHRUPD).
· Apply Overrides. File overrides are applied at this point if one file is to be accessed two different ways (for example, for input and for update) in a program. The program will treat the one data base file as two files for program use. The purpose of this approach is to avoid lengthy record locking.
· Call the Programs. The RPG program is then called. The Fast Path Data Structure is passed as a parameter. Some programs require that a Mode parameter also be passed, signifying whether it is online update processing or data entry processing.
· Deallocate the Data Base Files. When the RPG program is finished executing, the files are deallocated using the command DLCOBJ. The control language program is then finished.
· Process System Errors. If any serious or unusual errors are detected by the software or the operating system, control is transferred to the error processing section by the global MONMSG command. The error message is retrieved from the program message queue and displayed on the menu on which the program is an option.