Information Catalog Manager Programming Guide and Reference

FLGManageUsers

Authorizes specified Information Catalog Manager users in your organization to perform the following object management tasks that are normally performed by an Information Catalog Manager administrator:

FLGManageUsers also updates primary and backup administrators for the information catalog.

Authorization

Administrator

Syntax



APIRET  APIENTRY   FLGManageUsers( FLGOPTIONS       Options,
                                   PFLGHEADERAREA   pListStruct,
                                   PFLGHEADERAREA * ppListStruct,
                                   PFLGEXTCODE      pExtCode );

Parameters

Action (FLGOPTIONS) -- input
Choose one of the following action options:
FLG_ACTION_CREATE
Adds the specified users to the list of users authorized to perform additional object management tasks for the current information catalog.
FLG_ACTION_UPDATE
Changes the primary or backup administrator.
FLG_ACTION_DELETE
Removes the specified users from the list of users authorized to perform additional object management tasks for the current information catalog.
FLG_ACTION_LIST
Returns a list of the following:

Administrator

Backup administrator

Users authorized to perform additional object management tasks for the current information catalog.

pListStruct (PFLGHEADERAREA) -- input
Points to the input structure that contains the new, changed, or deleted user IDs.

ppListStruct (PFLGHEADERAREA) -- output
Points to the address of the pointer to the output structure listing the primary and backup administrators and all users authorized to perform additional object management tasks for the current information catalog.

Each entry in the output structure has the following information:

All users are sorted by User Type first, then USERID, in ascending order according to collating order of the underlying database management system.

When there is no output structure, the pointer to the structure is set to NULL.

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

The Information Catalog Manager only allows one primary and one backup administrator and only the administrators can invoke FLGManageUsers. If FLGManageUsers affects the logged-on administrator user ID, then the change will not take effect until the current administrator logs off.

Freeing memory allocated for an output structure

If FLGManageUsers 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 FLGManageUsers successfully creates, updates, or deletes users. If FLGManageUsers does not create, update, or delete users successfully, you should include a call to FLGRollback (see FLGRollback).

Examples

This sample code adds two users to the list of administrators and users who are authorized to perform additional object management tasks. Figure 125 shows the C language code required to issue the FLGManageUsers call.

Figure 125. Sample C language call to FLGManageUsers

 
 APIRET           rc;               // reason code for API
 FLGOPTIONS       Action=0;
 PFLGHEADERAREA   pInList;
 FLGEXTCODE       xc=0;             // extended code
 
   .
   .  /*                                                 */
   .
 Action= Action | FLG_ACTION_CREATE;
 rc = FLGManageUsers (Action,
                      pInList,
                      NULL,
                      &xc);
 

Figure 126 shows the input structure for the FLGManageUsers call in Figure 125.

Figure 126. Sample input structure for FLGManageUsers


Figure FLAA2045 not displayed.

This sample code retrieves a current list of users who are authorized to perform additional object management tasks. Figure 127 shows the C language code required to issue the FLGManageUsers call.

Figure 127. Sample C language call to FLGManageUsers

 
 APIRET           rc;               // reason code for API
 FLGOPTIONS       Action=0;
 PFLGHEADERAREA  * ppOutList;
 FLGEXTCODE       xc=0;             // extended code
 
   .
   .  /*                                                 */
   .
 Action= Action | FLG_ACTION_LIST;
 rc = FLGManageUsers (Action,
                      NULL,
                      ppOutList,
                      &xc);
 

Figure 128 shows the output structure for the FLGManageUsers call in Figure 127.

Figure 128. Sample output structure for FLGManageUsers


Figure FLAA2046 not displayed.

This sample code updates the primary administrator. Figure 129 shows the C language code required to issue the FLGManageUsers call.

Figure 129. Sample C language call to FLGManageUsers

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

Figure 130 shows the input structure for the FLGManageUsers call in Figure 129. Because only the primary administrator is updated, the backup administrator remains the same.

Figure 130. Sample input structure for FLGManageUsers


Figure FLAA2047 not displayed.


[ Top of Page | Previous Page | Next Page ]