Routines for tiv_db.kb


AddToWhere

File Name

tiv_db.kb

Syntax

AddToWhere( REF where: STRING, VAL column: STRING, VAL columnVal: STRING, VAL table: STRING, VAL alias: STRING, REF from: STRING )

Parameters

where - The current where clause

column - The column to be added to the where clause

This parameter should also include the

comparison operator

columnVal - The value to be added to the where clause

table - The name of the table to search against.

This parm is optional

alias - The alias of the table

from - The from clause

Returns

Nothing - By reference - The updated where clause

Side Effects

None

Description

Builds a where clause based on input parameters. Does not include 'where' in the result. The clause is structured to perform a join against the appropriate tables. Will also build a from clause if the table parm is passed.

Dialog Forms Called

None


GetColumnLength

File Name

tiv_db.kb

Syntax

GetColumnLength( VAL tbname: STRING, VAL column: STRING, REF LENGTH: INTEGER )

Parameters

tbname - The name of the table.

column - The column within the table.

Length - The length of the specified column

Returns

Nothing directly. By REFERENCE - Length

Side Effects

None

Description

Gets the length of a column as defined in the sai_syscolumns table.

Dialog Forms Called

None


GetTivoliInventory

File Name

tiv_db.kb

Syntax

GetTivoliInventory( REF tivoliInvList: LIST OF IS_InventoryRec, REF tivoliSelect: STRING )

Parameters

tivoliInvList - LIST OF IS_InventoryRec

tivoliSelect - The select statement used for the query

Returns

Nothing directly. By REFERENCE - tivoliInvList

Side Effects

None

Description

Executes a SQL statement based on criteria selected on Tivoli tab and finds any assets that match the criteria.

Dialog Forms Called

None


PopulateListBox

File Name

tiv_db.kb

Syntax

PopulateListBox( REF ComboBoxValues: LIST OF STRING, VAL Table: STRING, VAL Column: STRING )

Parameters

ComboBoxValues - A list of values used to populate a

combo box

Table - The name of the Tivoli table to query against

Column - The name of the column to use in the select stmt

Returns

Nothing directly. By REFERENCE - ComboBoxValues

Side Effects

None

Description

Executes a generic SQL statement based on parameters passed in creating a list that fills the combo boxes for the tivoli filter tab of the group maintainance dialog tab and finds any assets that match the criteria.

Dialog Forms Called

None


TIV_ConnectTivoliDataSource

File Name

tiv_db.kb

Syntax

TIV_ConnectTivoliDataSource( REF currentDataSource: INTEGER, REF tivoliDataSource: INTEGER, VAL tivoliDataSourceName: STRING, REF tivoliDBMSType: INTEGER )

Parameters

currentDataSource - The number of the currently connected data source

tivoliDataSource - The number of the Tivoli data source

tivoliDataSourceName - The name of the tivoli DSN to connect to

tivoliDBMSType - The DBMS type which is a return value from the

function TIV_GetDBMSVendor - see TIV_GetDBMSVendor

Returns

BOOLEAN: TRUE = successful connection. FALSE = unsuccessful.

Side Effects

Set the database connection to the Tivoli data source.

Description

Determines the name of and saves the current connection. Then, connects to the Tivoli data source.

Dialog Forms Called

None


TIV_DisConnectTivoliDataSource

File Name

tiv_db.kb

Syntax

TIV_DisConnectTivoliDataSource( REF advisorDataSource: INTEGER, REF tivoliDataSource: INTEGER )

Parameters

advisorDataSource - The integer representation of the

connection to the TSD data source

tivoliDataSource - The integer representation of the

connection to the Tivoli data source

Returns

Nothing

Side Effects

Set the database connection back to the TSD data source.

Description

Disconnects from the Tivoli data source. Then, re-connects to the TSD data source.

Dialog Forms Called

None


TIV_GetComputerSystem

File Name

tiv_db.kb

Syntax

TIV_GetComputerSystem( VAL w: WINDOW, VAL columns: STRING, VAL where: STRING, VAL orderby: STRING, VAL HWARE_SYS_ID: STRING )

Parameters

w - The calling window handle that holds the

fields to be set

columns - The columns to select from. Defaults to '*'

where - The where. If none, not included in result.

orderby - The orderby. If none, not included in result.

HWARE_SYS_ID - The value of the HWARE_SYS_ID as defined in

- the asset being viewed.

Returns

INTEGER: -1 if there is no data to be retrieved from the

COMPUTER_SYSTEM table, 0 if successful.

Side Effects

None

Description

Retrieves data from Tivoli's COMPUTER_SYSTEM table

Dialog Forms Called

None


TIV_GetDBMSVendor

File Name

tiv_db.kb

Syntax

TIV_GetDBMSVendor

Parameters

None

Returns

INTEGER code for the DBMS of the source named

Side Effects

None

Description

This function sets the two global database identifier variables. tiv_DBMS contains the value returned by ASE. tiv_DBMS_VENDOR is then set bassed upon that value. tiv_DBMS can contain several different values per database platform depending upon version number. tiv_DBMS_VENDOR always contains one of the 5 database vendor constants of the form tiv_DBMS_V_ORACLE. See tiv_gl.kb for all the constants used..

Dialog Forms Called

None


TIV_GetNTInfo

File Name

tiv_db.kb

Syntax

TIV_GetNTInfo( VAL w: WINDOW, VAL columns: STRING, VAL where: STRING, VAL orderby: STRING, VAL HWARE_SYS_ID: STRING )

Parameters

w - The calling window handle that holds the

fields to be set

columns - The columns to select from. Defaults to '*'

where - The where. If none, not included in result.

orderby - The orderby. If none, not included in result.

HWARE_SYS_ID - The value of the HWARE_SYS_ID as defined in

- the asset being viewed.

Returns

INTEGER: -1 if there is no data to be retrieved from the

EFMNTInfoVw view, 0 if successful.

Side Effects

None

Description

Retrieves data from the TSD view EFMNTInfoVw for display

Dialog Forms Called

None


TIV_GetSystemMemory

File Name

tiv_db.kb

Syntax

TIV_GetSystemMemory( VAL w: WINDOW, VAL columns: STRING, VAL where: STRING, VAL orderby: STRING, VAL HWARE_SYS_ID: STRING )

Parameters

w - The calling window handle that holds the

fields to be set

columns - The columns to select from. Defaults to '*'

where - The where. If none, not included in result.

orderby - The orderby. If none, not included in result.

HWARE_SYS_ID - The value of the HWARE_SYS_ID as defined in

- the asset being viewed.

Returns

INTEGER: -1 if there is no data to be retrieved from the

EFM_CSMEM_VW view, 0 if successful.

Side Effects

None

Description

Retrieves data from the TSD view EFM_CSMEM_VW for display

Dialog Forms Called

None


Tivoli_DeleteMigFileRec

File Name

tiv_db.kb

Syntax

Tivoli_DeleteMigFileRec( VAL where: STRING, REF advHandle: INTEGER)

Parameters

where - the criteria for the deletion

advHandle - the main handle for the TSD database

Returns

INTEGER - Return value from the database delete

Side Effects

None

Description

This delete a record from the I_TIV_MIGRATION table

Dialog Forms Called

None


Tivoli_GetSettingsFileList

File Name

tiv_db.kb

Syntax

Tivoli_GetSettingsFileList( REF SettingsFileList: LIST OF TivoliMigrationsSettingsRec VAL where: STRING, REF advHandle: INTEGER )

Parameters

SettingFileList - the list of records

where - either populated (during a scheduled run) or not

populated (while setting up a scheduled run)

advHandle - the main handle for the TSD database

Returns

INTEGER - Return value from the database query

By REFERENCE - SettingsFileList

Side Effects

None

Description

This returns a list of records from the I_TIV_MIGRATION table

Dialog Forms Called

None


Tivoli_InsertMigFileRec

File Name

tiv_db.kb

Syntax

Tivoli_InsertMigFileRec( REF SettingsFileRec: TivoliMigrationsSettingsRec, REF advHandle: INTEGER )

Parameters

SettingsFileList - record to insert

advHandle - the main handle for the TSD database

Returns

INTEGER - Return value from the database insert

Side Effects

None

Description

This inserts a record into the I_TIV_MIGRATION table

Dialog Forms Called

None


Tivoli_UpdateMigFileRec

File Name

tiv_db.kb

Syntax

Tivoli_UpdateMigFileRec( REF SettingsFileRec: TivoliMigrationsSettingsRec, VAL where: STRING, REF advHandle: INTEGER )

Parameters

SettingsFileList - record to update

advHandle - the main handle for the TSD database

Returns

INTEGER - Return value from the database update

Side Effects

None

Description

This updates a record in the I_TIV_MIGRATION table

Dialog Forms Called

None