Information Catalog Manager Programming Guide and Reference

FLGWhereUsed

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

pszFLGID (PSZ) -- input
Points to the system-generated unique ID for the contained instance (16 characters).

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.

ppListStruct (PFLGHEADERAREA) -- output
Points to the address of the pointer to the output structure listing the container objects.

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.

pExtCode (PFLGEXTCODE) -- output
Points to an extended code associated with the reason code. See Appendix D, Information Catalog Manager reason codes to see if a meaningful extended code is associated with the returned reason code.

Reason code (APIRET)
Represents the execution result of this API call.

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


Figure FLAA2066 not displayed.

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.

Examples

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


Figure FLAA2067 not displayed.

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.


[ Top of Page | Previous Page | Next Page ]