Using On Complete to change the availability of a resource
Use the On Complete option to change the global availability of a special resource used by an operation that completes successfully. For example, to prevent other operations from using the special resource that is being used by the current operation, set the On Complete option to No. In this way, after the operation completes successfully, the special resource will no longer be available.
Suppose you plan to run an operation named JOBY every day. JOBY requires an input file FILEX that is updated daily by an external process. Represent FILEX as a special resource and define JOBY as an operation using FILEX in exclusive way, quantity 1, with default availability set to No. Each time the external process updates FILEX, an event is generated to set the resource global availability to Yes. If, after the current occurrence of JOBY is run, you do not want the next occurrence to run on the same day, set the On Complete option to No. In this way, after JOBY completes successfully, the global availability of the special resource FILEX is set to No and the next occurrence is run only on the following day, when another event is generated to set the resource global availability to Yes again.
- Operation definition. Possible values are:
- Y
- Sets the global availability of the special resource to Yes.
- N
- Sets the global availability of the special resource to No.
- R
- Sets the global availability of the special resource to blank.
- Blank
- Uses the system default.
- Special resource definition. Possible values are:
- Y
- Sets the global availability to Yes.
- N
- Sets the global availability to No.
- R
- Sets the global availability to blank.
- Blank
- Uses the system default.
- RESOPTS initialization statement (either the ONCOMPLETE or DYNONCOMPLETE
keyword). Possible values are:
- YES
- Sets the global availability of the special resource to Yes.
- NO
- Sets the global availability of the special resource to No.
- RESET
- Sets the global availability of the special resource to blank.
- NOCHANGE
- Does not change the global availability. This is the default.
- The On Complete value set at operation definition level, if not blank.
- The On Complete value set at special resource definition level, if not blank.
- The ONCOMPLETE or DYNONCOMPLETE keyword set in the RESOPTS statement
(respectively for resources added not dynamically or dynamically),
in all the other cases.
The On Complete default value for special resources dynamically added is blank.
You can check if the global availability of a special resource was changed due to an On Complete action, in the Last Updated section of the BROWSING A SPECIAL RESOURCE and MODIFYING A SPECIAL RESOURCE panels.
- In the current plan extension (CX) data set
- With one of the following values, chosen according to this order:
- The On Complete value specified in the RD database, if the special resource is defined in the RD database.
- The On Complete value specified in the old CX data set, if the special resource exists in CX.
- Blank, if the special resource is dynamically added.
- In the current plan operation (CP) data set
- With the Available On Complete value set in the application definition.