Depending on the application logic, it may or may not be needed to enable Smart/RESTART in the application's main program.
Smart/RESTART must be enabled in the main program, if any one of the following conditions is true:
- The main program OPENs and/or CLOSEs any Smart/RESTART managed file.
- The main program defines any WORKING-STORAGE data field, that needs to be saved during COMMITs, and then restored upon RESTART runs and/or ROLLBACK requests.
- The main program issues COMMIT and/or ROLLBACK requests.
- The Smart/RESTART enabled sub-program is called only once during the complete application run.
- No other sub-program is enabled with Smart/RESTART.