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
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.
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.
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
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
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
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
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
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