Example: Using a standard processing program to start an application
A standard processing program is one way to start your application again using one database file as the notify object for all applications. This approach assumes that user profile names are unique by user for all applications using the standard program.
By using the code example, you agree to the terms of the Code license and disclaimer information.
For this approach, the physical file NFYOBJP is used as the notify object and defined as:
Unique user profile name 10 characters Program identification 10 characters Information for starting again Character field (This must be large enough to contain the maximum amount of information for starting programs again that require information for starting again. This field is required by the application programs. In the example, it is assumed to be a length of 200.)The file is created with SHARE(*YES). The first two fields in the file are the key to the file. (This file can also be defined as a data structure in RPG programs.)
- Example: Code for a standard processing program
This example shows the code for a standard processing program that can be used to start your application again using one database file as the notify object for all applications.
- Example: Code for a standard commit processing program
The standard commit (STDCMT) processing program performs the functions required to communicate with a single notify object used by all applications.
- Example: Using a standard processing program to decide whether to restart the application
The initial program can call the standard commit processing program to determine if it is necessary to start again. The workstation user can then decide whether to start again.
Parent topic:
Scenarios and examples: Commitment control
Related concepts
Example: Using a transaction logging file to start an application