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