Routines for tcmbuild.kb


TCM_CheckDependencies

File Name

tcmbuild.kb

Syntax

TCM_CheckDependencies(VAL tablesToBeBuilt: LIST OF INTEGER, REF dependencyErrors: LIST OF STRING) IS

Parameters

tablesToBeBuilt - the app ids of the products to be built/migrated

dependencyErrors - the returned status of the dependency check

Returns

Nothing

Side Effects

None

Description

This procedure determines whether this product's tables can be built or migrated based on which other product's tables are being built/migrated to the new version. If the tables for this product cannot be built because of some dependency with another product, dependencyError is set to a list of strings stating the missing dependencies, one dependency in each string. If there are no dependency problems, dependencyError is set to $UNKNOWN.

Dialog Forms Called

None


TCM_GetCurrentTableVersion

File Name

tcmbuild.kb

Syntax

TCM_GetCurrentTableVersion(VAL applicationID: INTEGER, REF oldVersion: VERSION_REC) IS

Parameters

applicationID - the integer identification of this application (used

to index the SAI_APP_PARAMS table)

oldVersion - the version of the currently built tables.

This will set to the version numbers currently stored

in the SAI_APP_PARAMS table (if any) by the calling

routine.

Returns

Nothing

Side Effects

None

Description

This procedure determines if tables are built in the configured database and returns the version of the tables. The passed in oldVersion will be pre-set to the version numbers found in the SAI_APP_PARAMS table (if any). Nothing needs to be done in this routine if this application has always updated the SAI_APP_PARAMS table in previous releases.

Dialog Forms Called

None


TCM_GetGrantScripts

File Name

tcmbuild.kb

Syntax

TCM_GetGrantScripts(REF scriptsToRun: LIST OF STRING)

Parameters

scriptsToRun - the grant script to be run

Returns

scriptsToRun with the grant script to be run

Side Effects

None

Description

This procedure obtains the grant script to be run for TAM tables based on the database platform that is currently configured.

Dialog Forms Called

None


TCM_GetNextDropScripts

File Name

tcmbuild.kb

Syntax

TCM_GetNextDropScripts(REF currentScript: INTEGER, REF scriptsToRun: LIST OF STRING) IS

Parameters

currentScript - the index of the current script being executed

scriptsToRun - the list of scripts to be run

Returns

Nothing

Side Effects

None

Description

This procedure provides a list of file names of the drop database scripts to be executed next. The argument currentScript can be used to keep track of what scripts have been run. The value that this routine sets for currentScript will be provided to this routine the next time it is called. If the received value of currentScript is $UNKNOWN, the first scripts should be provided. If all scripts have been run, currentScript is set to $UNKNOWN. The appropriate list of scripts is determined based on the global paramRDBMS to determine what DBMS has been selected and configured.

Dialog Forms Called

None


TCM_GetNextScripts

File Name

tcmbuild.kb

Syntax

TCM_GetNextScripts(VAL buildAction: INTEGER, VAL oldVersion: VERSION_REC, VAL newVersion: VERSION_REC, REF currentScript: INTEGER, REF scriptsToRun: LIST OF STRING) IS

Parameters

buildAction - determines whether a migration or new build will be run

oldVersion - the old version to be migrated from

newVersion - the new version to be migrated to

currentScript - the index of the current script being executed

scriptsToRun - the list of scripts to be run

Returns

Nothing

Side Effects

None

Description

This procedure provides a list of file paths and file names (path starting in the ESMBuild directory, where the scripts are located in a subdirectory named after the product's abbreviation, ex: ee\scriptname.ext) of the database scripts to be executed next. The argument currentScript can be used to keep track of what scripts have been run. The value that this routine sets for currentScript will be provided back to this routine the next time it is called. If the received value of currentScript is $UNKNOWN, the first scripts should be provided. If all scripts have been run, currentScript is set to $UNKNOWN. The appropriate list of scripts is determined based on the input parameters that specify what build action is to be performed and what versions to migrate from and to (if performing a migration). The global paramRDBMS is used to determine what DBMS has been selected and configured.

Dialog Forms Called

None


TCM_GetRevokeScripts

File Name

tcmbuild.kb

Syntax

TCM_GetRevokeScripts(REF scriptsToRun: LIST OF STRING)

Parameters

scriptsToRun - the revoke script to be run

Returns

scriptsToRun with the revoke script to be run

Side Effects

None

Description

This procedure obtains the revoke script to be run for TAM tables based on the database platform that is currently configured.

Dialog Forms Called

None


TCM_PostScriptExecution

File Name

tcmbuild.kb

Syntax

TCM_PostScriptExecution(VAL buildAction: INTEGER, VAL oldVersion: VERSION_REC, VAL newVersion: VERSION_REC, VAL currentScript: INTEGER, VAL scriptStatus: BOOLEAN, VAL wHdl: WINDOW, REF actionStatus: INTEGER) IS

Parameters

buildAction - determines whether a migration or new build has been run

oldVersion - the old version migrated from

newVersion - the new version migrated to

currentScript - the index of the current script being executed

scriptStatus - the success status of the previously executed script(s)

wHdl - the window handle to return messages to

actionStatus - the returned status of the action being performed

Returns

Nothing

Side Effects

None

Description

This procedure is a callout that allows product specific code to be executed after the execution of a list of database scripts. The input parameters are provided to allow this routine to know where in the build process this routine is being executed. The values specify what scripts were just executed by the calling routine. The purpose of the output parameter actionStatus is to allow this routine to abort the build process for this product. If actionStatus returns a value of 1, the build will continue for this product. If actionStatus returns a value other than 1, the build will abort for this product.

Dialog Forms Called

None


TCM_PreScriptExecution

File Name

tcmbuild.kb

Syntax

TCM_PreScriptExecution(VAL buildAction: INTEGER, VAL oldVersion: VERSION_REC, VAL newVersion: VERSION_REC, VAL currentScript: INTEGER, VAL wHdl: WINDOW, REF actionStatus: INTEGER) IS

Parameters

buildAction - determines whether a migration or new build will be run

oldVersion - the old version to be migrated from

newVersion - the new version to be migrated to

currentScript - the index of the current script being executed

wHdl - the window handle to return messages to

actionStatus - the returned status of the action being performed

Returns

Nothing

Side Effects

None

Description

This procedure is a callout that allows product-specific code to be executed prior to the execution of a list of database scripts. The input parameters are provided to allow this routine to know where in the build process this routine is being executed. The values specify what scripts are about to be executed by the calling routine. The purpose of the output parameter actionStatus is to allow this routine to abort the build process for this product. If actionStatus returns a value of 1, the build continues. If actionStatus returns a value other than 1, the build aborts.

Dialog Forms Called

None


TCM_SupportMigration

File Name

tcmbuild.kb

Syntax

TCM_SupportMigration(VAL oldVersion: VERSION_REC, VAL newVersion: VERSION_REC, REF supportMigration: BOOLEAN) IS

Parameters

oldVersion - the old version from whichto be migrated

newVersion - the new version to which to migrate

supportMigration - flag to determine whether migration is supported

Returns

Nothing

Side Effects

None

Description

This procedure determines whether the migration of tables from the specified old version to the specified new version is supported for this product. supportMigration is set to TRUE if the migration is supported.

Dialog Forms Called

None