ajBigStrFIXCheckSum function
Available since AlchemyJ v4.2.1
Description
Returns the checksum of a big string FIX message.
Syntax
ajBigStrFIXCheckSum(memory_id, [response_type], [run_condition], [run_by_function_point_only])
Argument Name | Argument Type | Description |
---|---|---|
memory_id (big string ID) (required) | String | The memory address id that keeps the Big String text. A big string ID can be retrieved from ajBigStrSet() or configure Big String value from More Tools tab in AlchemyJ ribbon. |
response_type (Double) | String | If it equals 0, returns the checksum only. If it equals 1, returns the whole message with the checksum at the end. The default value is 0. |
run_condition (optional) | Boolean | The function will run when the value is TRUE. Otherwise will not run. The default value is TRUE. |
run_by_function_point_only (optional) | Boolean | If it equals FALSE, the function can be executed through ‘Excel Calculation’ (can be either Automatic or Manual, Calculate Now or Calculate Sheet) or Preview Function Point. If it equals TRUE, the function can be executed with Preview Function Point (AlchemyJ ribbon \ Preview Function Point) only. The default value is TRUE. |
The function will return:
1) Return Value: Big String
2) Return Type: Single Value
Example
Example 1
To use the ajBigStrFIXCheckSum formula, firstly we have to assign a big string ID to the input range. This is done using the ajBigstrSet formula.
After converting into a big string ID, we can then use the formula as shown in B8 and it will return the checksum value of the input FIX message.
In this example, the response type is 0. Only the checksum result will be returned.
To verify the result, we can use the ajBigStrValue formula in B10 to make it into a normal value in B11.
Example 2
In this example, the response type is 1. The return result will include the the original message with the checksum result appended.
Error Scenarios
It will return #VALUE! when missing any required parameter or mismatch parameter type. Besides, system will raise error for below scenario(s).
Error Scenario |
---|
Big String ID does not exist. |
Response type can only be 0 or 1. |