Information Catalog Manager Programming Guide and Reference

FLGListOrphans

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

pszObjTypeID (PSZ) -- input
Points to the 6-character, system-generated unique identifier (object type ID) of an object type for which to retrieve a list of instances that exist, but are not currently associated with any object instances. The object type ID you specify depends on what you want to list:

Attachments
Attachment category object type ID

Comments
This parameter is ignored.

Contacts
Contact category object type ID

Programs
Program category object type ID

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

Options (FLGOPTIONS) -- input
Choose one of the following options:

FLG_LIST_ATTACHMENT
Retrieves Attachment category object instances that are currently unattached.

FLG_LIST_COMMENTS
Retrieves Comments object instances that are currently unattached. 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 category object instances that are currently unattached.

FLG_LIST_PROGRAM
Retrieves Programs object instances that are not currently associated with any object type.

ppListStruct (PFLGHEADERAREA) -- output
Points to the address of the pointer to the output structure listing the orphans. 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_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.

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

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.

Examples

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


Figure FLAA2037 not displayed.

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


Figure FLAA2038 not displayed.

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


Figure FLAA2039 not displayed.

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


Figure FLAA2040 not displayed.


[ Top of Page | Previous Page | Next Page ]