Main Program Subprogram module use in Smart/Restart
search cancel

Main Program Subprogram module use in Smart/Restart

book

Article ID: 382324

calendar_today

Updated On:

Products

Smart Restart

Issue/Introduction

If a subprogram used the Smart logic, will the Main program also need to add Smart logic?

Environment

z/os DB2

Resolution

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:

  1. The main program OPENs and/or CLOSEs any Smart/RESTART managed file.
  2. 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.
  3. The main program issues COMMIT and/or ROLLBACK requests.
  4. The Smart/RESTART enabled sub-program is called only once during the complete application run.
  5. No other sub-program is enabled with Smart/RESTART.