Commits all changes made to the information catalog since the unit of work was started or since the last commit point.
Authorization
Administrator or user
Syntax
APIRET APIENTRY FLGCommit (PFLGEXTCODE pExtCode)
Parameters
See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.
Usage
Your program should call FLGCommit after making changes to the information catalog database to make these changes permanent. In general, you can have your program call FLGCommit after it makes any change to the database.
The following situations are particularly good opportunities for committing changes to the database:
Figure 45 shows the C language code that calls FLGCommit.
Figure 45. Sample C language call to FLGCommit
APIRET rc; // Declare reason code from FLGCommit
FLGEXTCODE ExtCode = 0; // Declare extended code
.
.
rc = FLGCommit(&ExtCode); // pass the address of
// extended code
Special error handling
If FLGCommit encounters a database error, the Information Catalog Manager rolls back the database to the previous commit that occurred in your program.
If this rollback is successful, FLGCommit returns the reason code FLG_SEVERR_DB_AUTO_ROLLBACK_COMPLETE. The extended code contains the SQL code for the database error that prompted the Information Catalog Manager to roll back the database.
Attention: If this rollback fails, FLGCommit returns the reason code FLG_SEVERR_DB_AUTO_ROLLBACK_FAIL. The extended code contains the SQL code for the database error that prompted the Information Catalog Manager to roll back the database. In this case, your database could have severe integrity problems, and your program should call FLGTerm to exit the Information Catalog Manager.
Depending on the state of your database, you might need to recover your database using your backed-up database files. For more information about recovering your information catalog database, see the Information Catalog Manager Administration Guide.