Routines for dutl_db.kb


DeleteExternalMap

File Name

dutl_db.kb

Syntax

DeleteExternalMap( VAL InTran: BOOLEAN, VAL ext_map_id: INTEGER )

Parameters

InTran - in a transaction or not

ext_map_id - external map record ID

Returns

SQL return result

Side Effects

None

Description

This function deletes the EXTERNAL_MAP record and handles any database errors.

Dialog Forms Called

None


DltInv_ConnectionRecs

File Name

dutl_db.kb

Syntax

DltInv_ConnectionRecs( VAL InTran: BOOLEAN, VAL Inv_ID: INTEGER )

Parameters

InTran - in a transaction or not

Inv_ID - inventory ID

Returns

SQL return result

Side Effects

None

Description

This function deletes an inventory connection record.

Dialog Forms Called

None


DltInv_PeopleRecs

File Name

dutl_db.kb

Syntax

DltInv_PeopleRecs( VAL InTran: BOOLEAN, VAL Inv_ID: INTEGER )

Parameters

InTran - in a transaction or not

Inv_ID - inventory ID

Returns

SQL return result

Side Effects

None

Description

This function deletes an inventory people record.

Dialog Forms Called

None


FindNetCensusSMSInventoryRecord

File Name

dutl_db.kb

Syntax

FindNetCensusSMSInventoryRecord( VAL id: STRING, REF is_inventory_idList: LIST OF INTEGER )

Parameters

id - SMS or NetCensus ID

is_inventory_idList - list of inventory IDs

Returns

SQL return result

Side Effects

None

Description

This procedure assumes that the connection is to the TAM database and not to the NetCensus database.

Dialog Forms Called

None


GetContractList

File Name

dutl_db.kb

Syntax

GetContractList( REF kList: LIST OF ContractRec )

Parameters

klist - list of contract records

Returns

SQL return result

Side Effects

None

Description

This function retrieves a list of contract records.

Dialog Forms Called

None


GetDescription

File Name

dutl_db.kb

Syntax

GetDescription( VAL id: STRING, REF name: STRING )

Parameters

None

Returns

SQL return code

Side Effects

None

Description

This function retrieves a category name.

Dialog Forms Called

None


GetExistingMapRecord

File Name

dutl_db.kb

Syntax

GetExistingMapRecord( VAL external_app_name: STRING, VAL sql_cfg_name: STRING, VAL ext_id_1: STRING, VAL ext_id_2: STRING, VAL ext_id_3: STRING, VAL ext_id_4: STRING, VAL ext_id_5: STRING, VAL ext_id_6: STRING, VAL ext_id_7: STRING, VAL ext_id_8: STRING, VAL ext_id_9: STRING, VAL ext_id_10: STRING, VAL is_inventory_id: INTEGER, VAL people_id: INTEGER, VAL location_id: STRING )

Parameters

EXTERNAL_APP_NAME - external application name

SQL_CFG_NAME - SQL configuration name

Parameter Mapping For Tivoli

EXT_ID_1 - exteralMapID (Inventory)

EXT_ID_2 - hardwareSysID

EXT_ID_3 - tme_object_id

EXT_ID_4 - tme_object_label

EXT_ID_5 - migrationRelease

EXT_ID_6 - $unknown

EXT_ID_7 - $unknown

EXT_ID_8 - $unknown

EXT_ID_9 - $unknown

EXT_ID_10 - $unknown

IS_INVENTORY_ID - is_inventory.is_inventory_id (TAM table)

EXT_ID_1 - externalMapID (Location)

EXT_ID_2 - tiv table location.location_id

EXT_ID_3 - migrationRelease

EXT_ID_4 - $unknown

EXT_ID_5 - $unknown

EXT_ID_6 - $unknown

EXT_ID_7 - $unknown

EXT_ID_8 - $unknown

EXT_ID_9 - $unknown

EXT_ID_10 - $unknown

LOCATION_ID - location.location_id (TAM table)

EXT_ID_1 - externalMapID (People)

EXT_ID_2 - personID

EXT_ID_3 - migrationRelease

EXT_ID_4 - $unknown

EXT_ID_5 - $unknown

EXT_ID_6 - $unknown

EXT_ID_7 - $unknown

EXT_ID_8 - $unknown

EXT_ID_9 - $unknown

EXT_ID_10 - $unknown

PEOPLE_ID - people.people_id (TAM table)

Parameter Mapping for NetCensus

EXT_ID_1 - externalMapID (Inventory)

EXT_ID_2 - config_id

EXT_ID_3 - prod_id

EXT_ID_4 - mapping choice - MapChoice

EXT_ID_5 - demographics option - demog

EXT_ID_6 - component values option - comp

EXT_ID_7 - logon option -j logon

EXT_ID_8 - number of records to migrate - ChunckSize

EXT_ID_9 - $unknown

EXT_ID_10 - netCensusPath

IS_INVENTORY_ID - is_inventory.is_inventory_id (TAM table)

Parameter Mapping for SMS

EXT_ID_1 - externalMapID (Inventory)

EXT_ID_2 - assetTag

EXT_ID_3 - alternateTag

EXT_ID_4 - smsID; comparing this will tell the mapping

EXT_ID_5 - MigrateInvent - inventory checkbox

EXT_ID_6 - MigrateUsers - users checkbox

EXT_ID_7 - MigrateConnect - connection checkbox

EXT_ID_8 - MigrateOrg - organization checkbox

EXT_ID_9 - SMSSite - site that was migrated

EXT_ID_10 - migrateOrganizationID - org ID for visible_org

Returns

string - external map record

Side Effects

None

Description

This function takes the input parameters, builds a select statement, and searches against the EXTERNAL_MAP. The record found, if any, is returned.

Dialog Forms Called

None


GetH_ObjectID

File Name

dutl_db.kb

Syntax

GetH_ObjectID( VAL h_name: STRING )

Parameters

h_name - category name

Returns

string - category ID

Side Effects

None

Description

This function returns a category ID for the specified category name.

Dialog Forms Called

None


GetInvAltTag

File Name

dutl_db.kb

Syntax

GetInvAltTag( VAL alt_tag: STRING )

Parameters

alt_tag - inventory alternate tag

Returns

string - is_inventory_id

Side Effects

None

Description

This function returns the inventory ID based on the alternate tag supplied.

Dialog Forms Called

None


GetInventoryRecordsCount

File Name

dutl_db.kb

Syntax

GetInventoryRecordsCount

Parameters

None

Returns

SQL return result

Side Effects

None

Description

This procedure returns the number of inventory records that exist in the is_inventory table.

Dialog Forms Called

None


GetOrCreatePMObjectID

File Name

dutl_db.kb

Syntax

GetOrCreatePMObjectID( REF pm_object_id: STRING, REF inv: IS_InventoryRec )

Parameters

pm_object_id - container ID

inv - inventory record

Returns

SQL return result

Side Effects

None

Description

This function retrieves the container ID. A container ID is created if no container record with the specified ID exists.

Dialog Forms Called

None


GetSomePhysAttribList

File Name

dutl_db.kb

Syntax

GetSomePhysAttribList( REF lst: LIST OF PhysAttribRec, VAL pm_object_id: STRING, VAL attrib_id: INTEGER )

Parameters

lst - list of attribute records

pm_object_id - container ID

attrib_id - attribute ID

Returns

SQL return result

Side Effects

None

Description

This function retrieves a list of attributes for a specified container.

Dialog Forms Called

None


InsertExternalMap

File Name

dutl_db.kb

Syntax

InsertExternalMap( VAL InTran: BOOLEAN, REF external_map: ExternalMapRec )

Parameters

InTran - in a transaction or not

external_map - external map record

Returns

SQL return result

Side Effects

None

Description

This function inserts the EXTERNAL_MAP record passed in and handles any database errors.

Dialog Forms Called

None


InsertOrgRec

File Name

dutl_db.kb

Syntax

InsertOrgRec( VAL InTran: BOOLEAN, REF InsertRec: OrganizationRec )

Parameters

InTran - in a transaction or not

InsertRec - organization record to be inserted

Returns

SQL return result

Side Effects

None

Description

This function inserts a new organization record.

Dialog Forms Called

None


InsertPM_ObjectFromInv

File Name

dutl_db.kb

Syntax

InsertPM_ObjectFromInv( VAL InTran: BOOLEAN, REF InsertRec: PM_ObjectRec, REF Inv: IS_InventoryREc )

Parameters

InTran - in a transaction or not

InsertRec - container record to be inserted

Inv - inventory record

Returns

SQL return result

Side Effects

None

Description

This function inserts a container record.

Dialog Forms Called

None


TIV_Build_Select

File Name

dutl_db.kb

Syntax

TIV_Build_Select( VAL columns: STRING, VAL tablename: STRING, VAL where: STRING, VAL orderby: STRING )

Parameters

columns - the columns from which to select. Defaults to '*'

tablename - the table from which to select

where - the Where clause. If none, not included in result.

orderby - the order by. If none, not included in result.

select - the resulting SQL select statement

Returns

Boolean - TRUE = successful; FALSE = unsuccessful

Side Effects

None

Description

This function builds a standard SQL select statement based on data passed to it.

Dialog Forms Called

None


UpdateCharacterCounter

File Name

dutl_db.kb

Syntax

UpdateCharacterCounter(VAL tableName: STRING, VAL primaryKey: STRING)

Parameters

tableName - name of table for which the counter must be updated

primaryKey - the primary key for the table

Returns

SQL return result

Side Effects

None

Description

This function determines the maximum value of the primary key in the appropriate table and updates the counters table.

Dialog Forms Called

None


UpdateExternalMap

File Name

dutl_db.kb

Syntax

UpdateExternalMap( VAL InTran: BOOLEAN, VAL new_external_map: ExternalMapRec, VAL orig_external_map: ExternalMapRec )

Parameters

InTran - in a transaction or not

new_external_map - new external map record

orig_external_map - original external map record

Returns

SQL return result

Side Effects

None

Description

This function updates the EXTERNAL_MAP record and handles any database errors.

Dialog Forms Called

None


UpdateIntegerCounter

File Name

dutl_db.kb

Syntax

UpdateIntegerCounter(VAL tableName: STRING, VAL primaryKey: STRING)

Parameters

tableName - name of table for which the counter must be updated

primaryKey - the primary key for the table

Returns

SQL return result

Side Effects

None

Description

This function determines the maximum value of the primary key in the appropriate table and updates the counters table.

Dialog Forms Called

None