Information Catalog Manager Programming Guide and Reference

FLGManageCommentStatus

Sets the list of available status choices for users to assign to Comments objects they create in the information catalog using the Information Catalog Manager interface. For example, status choices might be: Open, Pending, Action required, and Closed.

Authorization

Administrator; user (FLG_ACTION_GET only)

Syntax



APIRET  APIENTRY   FLGManageCommentStatus( FLGOPTIONS       Action,
                                           FLGHEADERAREA  * pStatusStruct,
                                           PFLGHEADERAREA * ppStatusStruct,
                                           PFLGEXTCODE      pExtCode );

Parameters

Action (FLGOPTIONS) -- input
Choose one of the following action options:
FLG_ACTION_GET
Retrieves a list of current status choices for Comments object instances
FLG_ACTION_UPDATE
Adds, changes, or deletes entries from the list of status choices for Comments object instances

pStatusStruct (PFLGHEADERAREA) -- input
Points to the input structure that contains the updated list of status choices for Comments object instances for FLG_ACTION_UPDATE.

ppStatusStruct (PFLGHEADERAREA) -- output
Points to the output structure that contains the current list of status choices for Comments object instances for FLG_ACTION_GET.

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

Each time you call FLGManageCommentStatus, you must include the entire 10-entry definition area and corresponding 10 entries in the object area. Use zeros for status areas that you want to leave blank (see Figure 119).

Freeing memory allocated for an output structure

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

Controlling updates to your information catalog

To keep your program as synchronized as possible with your information catalog, you should include a call to FLGCommit (see FLGCommit) after FLGManageCommentStatus completes successfully. If FLGManageCommentStatus does not complete successfully, include a call to FLGRollback (see FLGRollback).

Examples

This sample code retrieves the status structure. Figure 118 shows the C language code required to issue the FLGManageCommentStatus call.

Figure 118. Sample C language call to FLGManageCommentStatus

 APIRET           rc;               // reason code for API
 FLGOPTIONS       Action=0;
 PFLGHEADERAREA   pStatusStruct;
 FLGEXTCODE       xc=0;             // extended code
 
   .
   .  /*                                                 */
   .
 Action= Action | FLG_ACTION_GET;  //set get option
 rc = FLGManageCommentStatus (Action,
                              NULL,
                              &pStatusStruct,
                              &xc);
 

Figure 119 shows the output structure for the FLGManageCommentStatus call in Figure 118.

Figure 119. Sample output structure for FLGManageCommentStatus


Figure FLAA2043 not displayed.

This sample code updates the status structure with an additional status field. Figure 120 shows the C language code required to issue the FLGManageCommentStatus call.

Figure 120. Sample C language call to FLGManageCommentStatus

 
 APIRET           rc;               // reason code for API
 FLGOPTIONS       Action=0;
 PFLGHEADERAREA   pStatusStruct;
 FLGEXTCODE       xc=0;             // extended code
 
   .
   .  /*                                                 */
   .
 Action= Action | FLG_ACTION_UPDATE;  //update option
 rc = FLGManageCommentStatus (Action,
                              pStatusStruct,
                              NULL,
                              &xc);
 

Figure 121 shows the input structure for the FLGManageCommentStatus call in Figure 120.

Figure 121. Sample input structure for FLGManageCommentStatus


Figure FLAA2044 not displayed.


[ Top of Page | Previous Page | Next Page ]