Retrieves a list of Grouping object instances that contain a specific object instance.
Authorization
Administrator or user
Syntax
APIRET APIENTRY FLGWhereUsed( PSZ pszFLGID,
PFLGHEADERAREA * ppListStruct,
PFLGEXTCODE pExtCode );
Parameters
Characters 1-6 of this ID identify the object type of this instance.
Characters 7-16 of this ID are the system-generated unique instance identifier.
The output structure includes some property specifications and the property values of the container objects. Each container object has the following information:
All instances are first sorted by object type name, and then sorted by Name; the actual order of the instances depends on the collating sequence used by the database management system for the information catalog.
The maximum number of object instances that can be returned by FLGWhereUsed is approximately 5000, depending on the storage available on your machine.
When there is no output structure, the pointer to the structure is set to NULL.
See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.
Output structure
FLGWhereUsed produces an output structure containing a list of objects that contain the specified object, as shown in Figure 160.
The object area of the output structure contains a list of all the Grouping objects that contain the specified object instance. The returned object instances are identified by the values of the FLGID and object instance external name.
Figure 160. FLGWhereUsed output structure
Usage
Freeing memory allocated for an output structure
If FLGWhereUsed returned data in the output structure, you must save the data returned in the output structure and then call FLGFreeMem (see FLGFreeMem). Do not use other methods, for example, C language instructions, to free memory.
Figure 161 shows the C language code required to issue the FLGWhereUsed API call. This sample code issues the FLGWhereUsed API call.
Figure 161. Sample C language call to FLGWhereUsed
APIRET rc; // reason code from FLGWhereUsed
UCHAR pszFLGID[FLG_ID_LEN + 1]; // Information Catalog Manager ID
PFLGHEADERAREA * ppListStruct; // pointer to output structure pointer
FLGEXTCODE ExtCode=0; // extended code
.
. /* provide values for input parameters */
.
strcpy (pszFLGID, "0000770000003333");
rc = FLGWhereUsed (pszFLGID,
ppListStruct, // address of output structure pointer
&ExtCode);
Figure 162 shows the resulting output structure.
Figure 162. Sample output structure for FLGWhereUsed
The specified object instance is contained by three instances in two different object types. The object type name for the object type ID 000056 is alphabetically less than the object type name for the object ID 000022, and therefore appears first.