Previous Topic: CHECK TERMINAL (DC/UCF)Next Topic: CONNECT


COMMIT

The COMMIT statement commits changes made to the database through an individual run unit or through all database sessions associated with a task. A task-level commit also commits all changes made in conjunction with scratch, queue, and print activity.

If the commit 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 COMMIT statement is executed.

Note: For more information about the impact of transaction sharing, see the CA IDMS Navigational DML Programming Guide.

Run units (and SQL sessions) impacted by the COMMIT statement remain active after the operation is complete.

The COMMIT statement is used in both the navigational and logical record facility environments. The COMMIT TASK statement is also used in an SQL programming environment.

Currency

Use of the ALL option, as in COMMIT ALL, sets all currencies to null.

Syntax
►►─── COMMIT ─┬────────┬─┬─────────┬─ ; ──────────────────────────────────────►◄
              └─ TASK ─┘ └─ (ALL) ─┘
Parameters
TASK

Commits the changes made by all scratch, queue, and print activity and all top-level run units associated with the current task. 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.

More information:

For more information about the impact of a COMMIT TASK statement on SQL sessions, see the CA IDMS SQL Programming Guide.

For more information about run units and the impact of COMMIT TASK, see the CA IDMS Navigational DML Programming Guide.

(ALL)

Releases all currency locks held on records in database, scratch, and queue areas associated with the issuing task (COMMIT TASK ALL) or run unit (COMMIT ALL) and sets all currencies to null.

Example

The following statement commits changes made by the run unit through which it is issued:

COMMIT;
Status Codes

Upon completion of the COMMIT function, the ERROR_STATUS field in the IDMS DB communications block indicates the outcome of the operation:

0000

The request has been serviced successfully.

5031

The specified request is invalid; the program may contain a logic error.

5097

An error was encountered processing a syncpoint request; check the log for details.