CWBSO_SetParameter

Purpose

Sets the value of an attribute of an object. Multiple calls may be made to this API prior to calling CWBSO_SetObjAttr. This allows you to change several attributes for a specific object with one call to CWBSO_SetObjAttr.

Syntax

 
unsigned int CWB_ENTRY CWBSO_SetParameter(
                CWBSO_PARMOBJ_HANDLE parmObjHandle,     
                unsigned short usAttributeID,           
                char far* lpszValue,                    
                CWBSO_ERR_HANDLE errorHandle);          

Parameters

CWBSO_PARMOBJ_HANDLE parmObjHandle - input
A handle to a parameter object that was returned by a previous call to CWBSO_CreateParmObjHandle.
unsigned short usAttributeID - input
The attribute ID for the parameter to be set. The valid values for this parameter depend on the type of object. See the appropriate header files for the valid values:
  • cwbsojob.h
  • cwbsomsg.h
  • cwbsoprt.h
  • cwbsosfl.h
char far* lpszValue - input
A long pointer to an attribute value. Note that only ASCIIZ strings are accepted. Binary values must be converted to strings by using the appropriate library function. See SOA attribute special values for information on the special values that may be supplied for each type of object.
CWBSO_ERR_HANDLE errorHandle - input
A handle to an error object. If an error occurs that there is error text for, this handle may be used to retreive the error message and message help.

Return Codes

The following list shows common return values.

CWBSO_NO_ERROR
No error occurred.
CWBSO_BAD_PARMOBJ_HANDLE
The parameter object handle that is specified is not valid.
CWBSO_BAD_ERR_HANDLE
The error handle that is specified is not valid.
CWBSO_LOW_MEMORY
Not enough memory is available for the request.
CWBSO_ERROR_OCCURRED
An error occurred. Use error handle for more information.

Usage

CWBSO_CreateParmObjHandle must be called prior to calling this API. The parameter object handle that is returned by CWBSO_CreateParmObjHandle must be passed as input to this API. CWBSO_CreateErrorHandle must be called prior to calling this API. The error handle that is returned by CWBSO_CreateErrorHandle must be passed as input to this API. Calling this API does NOT update an object's attributes on the iSeries™ server. You must call CWBSO_SetObjAttr to actually update the attribute value or values on the iSeries server for the specified object.