Information Catalog Manager Programming Guide and Reference

FLGListAssociates

Retrieves a list of associate instances for a specified object instance or object type. An associate can be any one of the following:

Authorization

Administrator or user

Syntax



APIRET  APIENTRY   FLGListAssociates( PSZ              pszInBuffer,
                                      FLGOPTIONS       Options,
                                      PFLGHEADERAREA * ppListStruct,
                                      PFLGEXTCODE      pExtCode );

Parameters

pszInBuffer (PSZ) -- input
Points to an input buffer containing either a 16-character, system-generated unique identifier of an object instance, or a 6-character, system-generated unique identifier of an object type, depending on what you are listing:

Attachments
Object instance ID (FLGID) of a non-Attachment category object instance

Comments
FLGID of a non-Comments type object instance

Contacts
FLGID of an Elemental or Grouping category object instance

Containees
FLGID of a Grouping category object instance

Links
FLGID of an Elemental or Grouping category object instance

Programs
Object type ID of a non-Program category object type

Options (FLGOPTIONS) -- input
Choose one of the following options:
FLG_LIST_ATTACHMENT
Retrieves object instances in an Attachment relationship with the specified instance.
FLG_LIST_COMMENTS
Retrieves Comments object instances attached to the specified instance. FLG_LIST_COMMENTS retrieves the same object instances as FLG_LIST_ATTACHMENT, but returns more information (Last Changed Date and Time, Creator) about each instance.
FLG_LIST_CONTACT
Retrieves Contact object instances associated with the specified instance.
FLG_LIST_CONTAIN
Retrieves object instances contained in the specified instance.
FLG_LIST_LINK
Retrieves object instances linked with the specified instance.
FLG_LIST_PROGRAM
Retrieves Programs object instances associated with the specified object type.

ppListStruct (PFLGHEADERAREA) -- output
Points to the address of the pointer to the output structure listing the associates. When there is no output structure, the pointer to the structure is set to NULL.

The output structure for each instance has the following information:

FLGID (16 characters)

Name (80 characters)

In addition, for FLG_LIST_CONTAIN, the output structure for each instance also has a flag (CHILDIND) indicating whether it is itself a container. For FLG_LIST_COMMENTS, the output structure for each instance also includes the following:

Last Changed Date and Time

Creator

All instances are sorted by object type name first, then object instance name, in ascending order according to collating order of the underlying database management system.

The maximum number of object instances that can be returned by FLGListAssociates is 5000.

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.

Usage

Freeing memory allocated for an output structure

If FLGListAssociates 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

This sample code retrieves a list of the Programs object instances associated with the Grouping object type, MYREGION. Figure 89 shows the C language code required to issue the FLGListAssociates call.

Figure 89. Sample C language call to FLGListAssociates

 
 APIRET           rc;               // reason code
 UCHAR            pszObjTypeID[FLG_OBJTYPID_LEN + 1];
 PFLGHEADERAREA * ppReturnObjList;   // ptr to output structure ptr
 FLGOPTIONS       Option=0;
 FLGEXTCODE       xc=0;             // extended code
   .
   .
   .
 Option=Option | FLG_LIST_PROGRAM;
 rc = FLGListAssociates (pszObjTypeID,
                         Option,
                         ppReturnObjList,
                         &xc); 

Figure 90 shows the output structure for the FLGListAssociates call in Figure 89.

Figure 90. Sample output structure for FLGListAssociates


Figure FLAA2027 not displayed.

This sample code retrieves the object instances contained in the Grouping object, MYBGROUP. Figure 91 shows the C language code required to issue the FLGListAssociates call.

Figure 91. Sample C language call to FLGListAssociates

 
 APIRET           rc;               // reason code
 UCHAR            objid[FLG_ID_LEN + 1];
 PFLGHEADERAREA * ppReturnObjList;   // ptr to output structure ptr
 FLGOPTIONS       Option=0;
 FLGEXTCODE       xc=0;             // extended code
   .
   .
   .
 Option=Option | FLG_LIST_CONTAIN;
 rc = FLGListAssociates (objid,
                         Option,
                         ppReturnObjList,
                         &xc);
 

Figure 92 shows the output structure for the FLGListAssociates call in Figure 91.

Figure 92. Sample output structure for FLGListAssociates


Figure FLAA2028 not displayed.

This sample code retrieves the Contact object instances for the Grouping object, MYBGROUP. Figure 93 shows the C language code required to issue the FLGListAssociates call.

Figure 93. Sample C language call to FLGListAssociates

 
 APIRET           rc;               // reason code
 UCHAR            objid[FLG_ID_LEN + 1];
 PFLGHEADERAREA * ppReturnObjList;   // ptr to output structure ptr
 FLGOPTIONS       Option=0;
 FLGEXTCODE       xc=0;             // extended code
   .
   .
   .
 Option=Option | FLG_LIST_CONTACT;
 rc = FLGListAssociates (objid,
                         Option,
                         ppReturnObjList,
                         &xc);
 

Figure 94 shows the output structure for the FLGListAssociates call in Figure 93.

Figure 94. Sample output structure for FLGListAssociates


Figure FLAA2029 not displayed.

This sample code retrieves the Attachment category object instances for the Grouping object, MYBGROUP. Figure 95 shows the C language code required to issue the FLGListAssociates call.

Figure 95. Sample C language call to FLGListAssociates

 
 APIRET           rc;               // reason code
 UCHAR            objid[FLG_ID_LEN + 1];
 PFLGHEADERAREA * ppReturnObjList;   // ptr to output structure ptr
 FLGOPTIONS       Option=0;
 FLGEXTCODE       xc=0;             // extended code
   .
   .
   .
 Option=Option | FLG_LIST_ATTACHMENT;
 rc = FLGListAssociates (objid,
                         Option,
                         ppReturnObjList,
                         &xc);
 

Figure 96 shows the output structure for the FLGListAssociates call in Figure 95.

Figure 96. Sample output structure for FLGListAssociates


Figure FLAA2030 not displayed.

This sample code retrieves the Comments object instances attached to the Elemental object, MYREPORT. Figure 97 shows the C language code required to issue the FLGListAssociates call.

Figure 97. Sample C language call to FLGListAssociates

 
 APIRET           rc;               // reason code
 UCHAR            objid[FLG_ID_LEN + 1];
 PFLGHEADERAREA * ppReturnObjList;   // ptr to output structure ptr
 FLGOPTIONS       Option=0;
 FLGEXTCODE       xc=0;             // extended code
   .
   .
   .
 Option=Option | FLG_LIST_COMMENTS;
 rc = FLGListAssociates (objid,
                         Option,
                         ppReturnObjList,
                         &xc);
 

Figure 98 shows the output structure for the FLGListAssociates call in Figure 97.

Figure 98. Sample output structure for FLGListAssociates


Figure FLAA2031 not displayed.

This sample code retrieves the object instances with which the Grouping object, MYBGROUP, is linked. Figure 99 shows the C language code required to issue the FLGListAssociates call.

Figure 99. Sample C language call to FLGListAssociates

 
 APIRET           rc;               // reason code
 UCHAR            objid[FLG_ID_LEN + 1];
 PFLGHEADERAREA * ppReturnObjList;   // ptr to output structure ptr
 FLGOPTIONS       Option=0;
 FLGEXTCODE       xc=0;             // extended code
   .
   .
   .
 Option=Option | FLG_LIST_LINK;
 rc = FLGListAssociates (objid,
                         Option,
                         ppReturnObjList,
                         &xc);
 

Figure 100 shows the output structure for the FLGListAssociates call in Figure 99.

Figure 100. Sample output structure for FLGListAssociates


Figure FLAA2032 not displayed.


[ Top of Page | Previous Page | Next Page ]