Retrieves a list of all orphan instances of the Attachment, Contact, or Program category. Orphans are Attachment, or Contact objects that are not associated with other object instances, or Program objects that are not associated with any object type.
You can use this list to clean up your information catalog by associating orphan object instances to other objects or by deleting orphan instances.
Authorization
Administrator or user
Syntax
APIRET APIENTRY FLGListOrphans( PSZ pszObjTypeID,
FLGOPTIONS Options,
PFLGHEADERAREA * ppListStruct,
PFLGEXTCODE pExtCode );
Parameters
If pszObjTypeID is NULL, then the Information Catalog Manager returns orphans of all object types in the Attachment category (when FLG_LIST_ATTACHMENT is specified), or in the Contact category (when FLG_LIST_CONTACT is specified).
The output structure for each instance has the following information:
FLGID (16 characters)
Name (80 characters)
In addition, 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 FLGListOrphans is 1600.
See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.
Usage
Restrictions
If a user uses FLGListOrphans to list orphan Comments, FLGListOrphans only returns the Comments for which the user is also the creator.
Freeing memory allocated for an output structure
If FLGListOrphans 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 all orphan Program category object instances. Figure 107 shows the C language code required to issue the FLGListOrphans call.
Figure 107. Sample C language call to FLGListOrphans
APIRET rc; // reason code
PFLGHEADERAREA * ppReturnObjList; // ptr to output structure ptr
FLGOPTIONS Option=0;
FLGEXTCODE xc=0; // extended code
.
.
.
Option=Option | FLG_LIST_PROGRAM;
rc = FLGListOrphans (NULL,
Option,
ppReturnObjList,
&xc);
Figure 108 shows the output structure for the FLGListOrphans call in Figure 107.
Figure 108. Sample output structure for FLGListOrphans
This sample code retrieves all orphan Contact category object instances. Figure 109 shows the C language code required to issue the FLGListOrphans call.
Figure 109. Sample C language call to FLGListOrphans
APIRET rc; // reason code
PFLGHEADERAREA * ppReturnObjList; // ptr to output structure ptr
FLGOPTIONS Option=0;
FLGEXTCODE xc=0; // extended code
.
.
.
Option=Option | FLG_LIST_CONTACT;
rc = FLGListOrphans (NULL,
Option,
ppReturnObjList,
&xc);
Figure 110 shows the output structure for the FLGListOrphans call in Figure 109.
Figure 110. Sample output structure for FLGListOrphans
This sample code retrieves all orphan Attachment category object instances. Figure 111 shows the C language code required to issue the FLGListOrphans call.
Figure 111. Sample C language call to FLGListOrphans
APIRET rc; // reason code
PFLGHEADERAREA * ppReturnObjList; // ptr to output structure ptr
FLGOPTIONS Option=0;
FLGEXTCODE xc=0; // extended code
.
.
.
Option=Option | FLG_LIST_ATTACHMENT;
rc = FLGListOrphans (NULL,
Option,
ppReturnObjList,
&xc);
Figure 112 shows the output structure for the FLGListOrphans call in Figure 111.
Figure 112. Sample output structure for FLGListOrphans
This sample code retrieves all orphan Attachment category object instances that are of the Comments object type. Figure 113 shows the C language code required to issue the FLGListOrphans call.
Figure 113. Sample C language call to FLGListOrphans
APIRET rc; // reason code
PFLGHEADERAREA * ppReturnObjList; // ptr to output structure ptr
FLGOPTIONS Option=0;
FLGEXTCODE xc=0; // extended code
.
.
.
Option=Option | FLG_LIST_COMMENTS;
rc = FLGListOrphans (NULL,
Option,
ppReturnObjList,
&xc);
Figure 114 shows the output structure for the FLGListOrphans call in Figure 113. This particular output structure has two additional property values.
Figure 114. Sample output structure for FLGListOrphans