This documentation supports the 9.1 to 9.1 Service Pack 3 version and its patches of BMC Atrium Core. The documentation for version 9.1.04 and its patches is available here.

To view the latest version, select the version from the Product version menu.

CMDBGetListInstance function

The CMDBGetListInstance function retrieves a list of instances. You can limit the instance list to entries that match particular conditions by specifying the qualifier parameter.

Synopsis


#include "ar.h"
#include "arextern.h"
#include "cmdb.h"

int CMDBGetListInstance(
      ARControlStruct *control,
      CMDBClassNameId *classNameId,
      ARNameType datasetId,
      usigned int getMask,
      CMDBQualifierStruct *qualifier, 
      ARNameList *attributeGetList,
      CMDBSortList *sortList,
      unsigned int firstRetrieve,
      unsigned int maxRetrieve,
      ARNameList *instanceIdList,
      CMDBAttributeValueListList *attributeValueListList,
      unsigned int *numMatches,
      ARStatusList *status)

Input arguments



Input argument

Description

control

The control record for the operation, which contains information about the user requesting the operation and the server on which the operation is to be performed.

classNameId

The name of the class for which to retrieve the instances. The classNameID argument contains the namespace name and the unique class name.

datasetId

The unique identifier for the dataset. The data in the return values are based on the dataset ID specified in this parameter.

getMask

The ID that specifies the type of dataset on which to perform the operation.

  • 0: None--Based on the datasetId being passed, instances are retrieved from either the overlay or the original dataset (CMDB_GET_MASK_NONE ).
  • 1<<0: Current Mode--Allows you to retrieve instances from the current dataset only (CMDB_GET_DATASET_MODE_CURRENT ).

qualifier

A query that determines the set of entries to retrieve. The qualification can include one or more subclasses and any combination of conditional, relational, and arithmetic operations. For more information about how to construct a qualifier, see "Building qualifications and expressions" in the BMC Remedy Action Request System Workflow Objects Guide.

attributeGetList

A list of attribute names to retrieve.

sortList

A list of zero or more attributes that identifies the sort order for the retrieved data. Specify a NULL value for this parameter to use no specific sort order.

firstRetrieve

The first instance to retrieve for the qualification. If you do not specify a value for this parameter, the default value of CMDB_START_WITH_FIRST_ENTRY is used and the function retrieves the first entry.

maxRetrieve

The maximum number of entries to retrieve. Use this parameter to limit the amount of data returned if the qualification does not narrow the list. Specify CMDB_NO_MAX_LIST_RETRIEVE to assign no maximum.

Return values



Return value

Description

instanceIdList

The list of instance IDs that match the criteria.

attributeValueListList

A list of one or more attribute and value pairs retrieved for the specified instances.

numMatches

The total number of entries that match the qualification criteria. This value does not represent the number of entries returned unless the number of matching entries is less than or equal to the maxRetrieve value. Set this parameter to NULL to improve the system performance, if you do not want to retrieve the number of entries that match the qualification criteria.

status

A list of zero or more notes, warnings, or errors generated from a call of this function.

Was this page helpful? Yes No Submitting... Thank you

Comments