The FINISH statement commits changes made to the database through an individual run unit or through all database sessions associated with a task. A task-level finish also commits all changes made in conjunction with scratch, queue, and print activity.
If the finish applies to an individual run unit and the run unit is sharing its transaction with another database session, the run unit's changes may not be committed at the time the FINISH statement is executed. For more information on the impact of transaction sharing, refer to CA IDMS Navigational DML Programming Guide.
Run units (and SQL sessions) impacted by the FINISH statement end, and their access to the database is terminated.
The FINISH statement is used in both the navigational and logical record facility environments. The FINISH TASK statement is also used in an SQL programming environment.
Currency
Following the successful execution of a FINISH request, all currencies are set to null; the issuing program or task cannot perform database access through an impacted run unit without executing another BIND/READY sequence.
►►─── FINISH ─┬────────┬─ ; ──────────────────────────────────────────────────►◄ └─ TASK ─┘
Commits the changes made by all scratch, queue, and print activity and all top-level run units associated with the current task and terminates those run units. Its impact on SQL sessions associated with the task depends on whether those sessions are suspended and whether their transactions are eligible to be shared.
Note:
The following statement commits changes made by the run unit through which it is issued and terminates that run unit:
FINISH;
Upon completion of the FINISH function, the ERROR_STATUS field in the IDMS DB communications block indicates the outcome of the operation:
The request has been serviced successfully.
The specified request is invalid; the program may contain a logic error.
An error was encountered processing a syncpoint request; check the log for details.
|
Copyright © 2014 CA.
All rights reserved.
|
|