mecca_search_program_info_c

	status.i4.v = mecca_search_program_info_c(pattern.i1a.r,
						  field.i4.v,
						  options.i4.v,
						  results.sa.r,
						  max_return.i4.v,
						  num_returned.i4.r,
						  total_matches.i4.r)

	This routine returns information about primary applications (PAs),
	secondary applications (SAs), user libraries (ULs), or central
	services (CSs).

	pattern		pattern for which to search
			(database wildcards (e.g. '%') are treated as such
			 if the no exact option is specified)
	field		field in which to search for the pattern
			Possible values are to be taken from the
			MECCA_INFO_FIELD enumeration constants:
			(MECCA_INFO_FIELD_KEEPER     
			 MECCA_INFO_FIELD_AUTHOR     
			 MECCA_INFO_FIELD_DESCRIPTION
			 MECCA_INFO_FIELD_PROGRAM    
			 MECCA_INFO_FIELD_BACKUP)     
	options		options to control the search
			Possible values are to be taken from the
			MECCA_SEARCH_OPT enumeration constants:
			MECCA_SEARCH_OPT_EXACT - pattern is unmodified
			MECCA_SEARCH_OPT_NO_EXACT - a '%', the sybase
			wildcard, is prepended and appended to pattern.
			This means the selected field need only contain
			the pattern not completely match it.  Sybase
			metacharacters, e.g., '%', will also be treated
			as such in the pattern.
			The type of 'program' to be included in search
			is specified by a bit-wise or (|) of the following
			enumeration constants:
			(MECCA_SEARCH_OPT_PAS - primary applications
			 MECCA_SEARCH_OPT_SAS - seconday applications
			 MECCA_SEARCH_OPT_ULS - user libraries
			 MECCA_SEARCH_OPT_SERVICES - central services
			 MECCA_SEARCH_OPT_ALL - all of the above)
			If none of the above is provided all is used.
			MECCA_SEARCH_OPT_ACTIVE - include active programs in
						  results
			MECCA_SEARCH_OPT_OBSOLETE - include obsolete programs
						    in results
			MECCA_SEARCH_OPT_ABANDONED - include abandoned programs in results
						     abandoned programs
						     where created but never
						     finished/used
			MECCA_SEARCH_OPT_UNKNOWN - include program's whose status
						   is unknown in results
			If none of the above is provided programs of any status
			other than "obsolete" will be returned.
	results		pointer to the results array which is to be
			allocated by the caller and populated by this
			routine with all the matches found, subject to
			the max_return constraint.
	max_return	size of results array
	num_returned	number of results placed in results array,
			will never be more than max_return.    
	total_matches	number of matches to the caller's query.  Will
			be num_returned if the caller's results buffer was
			large enough to hold all matches, if not then it
			will be greater than num_returned and CLIB_TRUNCATED
			will be returned as the status.  A good way to
			size the results buffer is to call the routine
			the first time with max_return = 0 just for the 
			purpose of getting the total_matches.

	This function returns status values as follows:

       OK			success
	CLIB_INVARG		invalid argument, e.g., for the field
				or the pattern is too long
	CLIB_TRUNCATED		partial results - caller's array length
				provided by max_return was less than the
				number of matching results.
	CLIB_NO_SUCH		no matches what so ever -> total_matches == 0
	CLIB_BUGCHK		if this function gets to some should
				not happen but does situation

	This function requires the following include files:

	cbslib_h, cns_data_structs_h

	Related functions:

	mecca_minmax_program_number_c, application_description_c,
	application_info, pa_to_index_page_c, index_page_pa,
	index_page_title_c, central_service_info

	C/C++ usage:

	const char	*pattern = "PA0052";
	int	status;
	int	max_return = sizeof(results) / sizeof(results[0]);
	int	num_returned;
	int	total_matches;
	MECCA_INFO_FIELD	field = MECCA_INFO_FIELD_PROGRAM;
	MECCA_SEARCH_OPT	options = MECCA_SEARCH_OPT_EXACT;
	MECCA_PROGRAM_INFO	results[1];

	status = mecca_search_program_info_c(pattern,field,options,results,
					     max_return,&num_returned,
					     &total_matches);