Information Catalog Manager Programming Guide and Reference

FLGListPrograms

Retrieves a list of Programs objects for a non-Program object type.

Authorization

Administrator or user

Syntax



APIRET  APIENTRY  FLGListPrograms( PSZ              pszObjTypeID,
                                   PFLGHEADERAREA * ppListStruct,
                                   PFLGEXTCODE      pExtCode );

Parameters

pszObjTypeID (PSZ) -- input
Points to the 6-character, system-generated unique identifier (object type ID) of the object type for which to retrieve a list of associated Programs objects.

ppListStruct (PFLGHEADERAREA) -- output
Points to the address of the pointer to the output structure listing the Programs instances. When there is no output structure, the pointer to the structure is set to NULL.

This output structure contains the 16-character FLGID of a Programs object instance and its 80-character external name.

Entries in the list are sorted by the external name (value of the NAME property); the actual order of the list depends on the collating sequence used by the database management system used for your information catalog.

The maximum number of Programs object instances that can be returned by FLGListPrograms is approximately 5000, depending on the storage available on your machine.

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.

Output structure

FLGListPrograms produces an output structure containing a list of Programs objects, as shown in Figure 115.

The object area of the output structure contains a list of all the Programs objects associated with the specified object type. These Programs objects are identified by the values of the FLGID and the external name of the object instance.

Figure 115. FLGListPrograms output structure


Figure FLAA2041 not displayed.

Usage

Freeing memory allocated for an output structure

If FLGListPrograms 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

Figure 116 shows the C language code required to invoke the FLGListPrograms API call.

This sample code retrieves a list of programs that the object type named REPORT is associated with.

There are two programs created to use with REPORT: Read report and Update report.

Figure 116. Sample C language call to FLGListPrograms

 
 APIRET          rc;               // reason code from FLGListPrograms
 UCHAR           pszObjTypeID[FLG_OBJTYPID_LEN + 1];
 PFLGHEADERAREA * ppListStruct;   // pointer to output structure pointer
 FLGEXTCODE      ExtCode=0;             // extended code
   .
   .  /* set object type ID to ID of 'REPORT'                 */
   .
 rc = FLGListPrograms (pszObjTypeID,
                       ppListStruct,
                       &ExtCode);
 

Figure 117 shows the output structure for this API call.

Figure 117. Sample output structure for FLGListPrograms


Figure FLAA2042 not displayed.


[ Top of Page | Previous Page | Next Page ]