CWBSO_SetListFilter

Purpose

Sets a filter value for a list. Depending on the type of list, various filter values may be set. The filter values control which objects will be included in the list when the list is built by a call to CWBSO_OpenList.

Syntax

 
unsigned int CWB_ENTRY CWBSO_SetListFilter(
                CWBSO_LIST_HANDLE listHandle,           
                unsigned short usFilterID,              
                char far* lpszValue);                   

Parameters

CWBSO_LIST_HANDLE listHandle - input
A handle to a list that was returned by a previous call to CWBSO_CreateListHandle or CWBSO_CreateListHandleEx.
unsigned short usFilterID - input
The filter identifier specifies which portion of the filter to set. The valid values for this parameter depend on the type of objects in the list. See the appropriate header files for the valid values:
  • cwbsojob.h
  • cwbsomsg.h
  • cwbsoprt.h
  • cwbsosfl.h
char far* lpszValue - input
The value for the filter attribute. If multiple items are specified, they must be separated by commas. Filter value items that specify iSeries™ object names must be in uppercase. Qualified object names must be in the form of library/object. Qualified job names must be in the form of job-number/user/job-name. Filter value items specifying special values (beginning with asterisk) must be specified in upper case. See SOA attribute special values for information on the special values that may be supplied for each type of object.

Return Codes

The following list shows common return values.

CWBSO_NO_ERROR
No error occurred.
CWBSO_BAD_LIST_HANDLE
The list handle that is specified is not valid.
CWBSO_BAD_FILTER_ID
The filter ID specified is not valid for the type of list.

Usage

CWBSO_CreateListHandle must be called prior to calling this API. The list handle that is returned by CWBSO_CreateListHandle must be passed as input to this API. This API has no effect on a list that has been opened. In order for the filter criteria to take effect, the list must be opened after calling this API. Caution should be used when requesting complex filters as list performance may be adversely affected.