Using functions for data field assignment
In data field assignment, the type and value attributes of an assignment element can also be used to call a function and provide parameters. The result returned from calling the function is assigned to the target data field.
The following XML shows an example of using a function in an assignment
element.
<assignments>
<assignment field="fieldName" type="BusDate" value="ibmNprBdDate, ibmIntPartnerId, '5'"/>
</assignments>This assignment statement calls the BusDate function with the following parameters
ibmNprBdDate,
ibmIntPartnerId, '5'. The BusDate function:- Calculates the business date. It uses the holiday table for partner ibmIntPartnerId to calculate the business date.
- Moves the business date by five (5) business days.
- Assigns the result to the fieldName field.
When using an assignment element to call a function, the element must conform to the following requirements:
- The function names are case sensitive.
- Constants must be specified between two single quotation mark (') characters.
- The parameters for the function must be separated by commas.
- Only parameters that are defined as optional by the function can be omitted.
- The parameters must be specified in the order that is defined by the function. Use a space to skip an
optional parameter. To omit the second parameter for the BusDate function in this example, the value attribute
would be
value="ibmNprBdDate, ,'5'".
The following topics describe the functions that can be called using the assignment element.