COMMIT (Control committing of commands in a macro)

Use this command to control when a command is committed in a macro and to update the database when commands complete processing. When issued from the console mode of the administrative client, this command does not generate a message.

If an error occurs while processing the commands in a macro, the server stops processing the macro and rolls back any changes (since the last COMMIT). After a command is committed, it cannot be rolled back.

Ensure that your administrative client session is not running with the ITEMCOMMIT option if you want to control command processing. The ITEMCOMMIT option commits commands inside a script or a macro as each command is processed.

Privilege class

Any administrator can issue this command.

Syntax

Read syntax diagramSkip visual syntax diagramCOMMIT

Parameters

None.

Example: Control committing of commands in a macro

From the interactive mode of the administrative client, register and grant authority to new administrators using a macro named REG.ADM. Changes are committed after each administrator is registered and is granted authority.
Macro Contents:
/* REG.ADM-register policy admin & grant authority*/
REGister Admin sara hobby
GRant AUTHority sara CLasses=Policy
COMMIT  /* Commits changes */
REGister Admin ken plane
GRant AUTHority ken CLasses=Policy
COMMIT  /* Commits changes */
Command
macro reg.adm

Related commands

Table 1. Commands related to COMMIT
Command Description
MACRO Runs a specified macro file.
ROLLBACK Discards any uncommitted changes to the database since the last COMMIT was executed.