A "Selection evaluation error" may occur if a selection is made against a table with a primary or secondary key defined with Syntax "C" and a numeric value is used for the right-hand side of the selection criteria.
book
Article ID: KB0086249
calendar_today
Updated On:
Products
Versions
TIBCO Object Service Broker for z/OS
-
Not Applicable
-
Description
Resolution: Description: ============ If you have a table, let us call it "<table_name>", defined with a primary or secondary key with Syntax "C" and you code a selection against the table including a numeric value on the right-hand side of the selection criteria, a rule failure may result with a "Selection evaluation error".
Environment: ========== * both z/OS and Open Systems environments * using TIBCO Object Service Broker for z/OS or TIBCO Object Service Broker for Open Systems * a rule numeric selection coded against a key field with Syntax "C" such as "FORALL table_name WHERE FIELD_SYNTAX_C < 12345"
Symptoms: ========= Rule failure may result with the following type of messages in Information Log: Error detected in rule "<rule_name>" at action <action_number> Access error on table "<table_name>" FORALL "<table_name>" WHERE FIELD_SYNTAX_C < numeric_value Selection evaluation error on table "<table_name>" Bad data detected when converting FIELD "FIELD_SYNTAX_C" FIXED STRING to a BINARY ...
Cause: ===== The left hand side table value is coerced to a numeric value and compared against the right-hand side selection value. If the string "C" table field contains some values that cannot be converted (eg non-numeric data) then a failure will result.
Resolution: ========= You can correct the failure by coding quotes around the right hand side of the selection statement: "FORALL table_name WHERE FIELD_SYNTAX_C < QUOTE(12345)" Ensure that the resulting string on the right hand side of the selection term represents the actual format of your data. For instance, the value 123 may be stored into a 5 byte string field in several formats such as: "123bb" "bb123" "00123" where "b" represents a blank. You will need to be consistent in creating the right hand quoted value (string) to match your table field Syntax "C" data format.
TIBCO recommends that applications not store numeric data as strings to avoid issues such as previously described. Using the correct syntax for table field definitions will simplify coding, avoid run-time failures and provide consistent results.
References: ========== ObjectStar Support Flash Release 4.0-12 originally discussed this issue. TIBCO Object Service Broker Programming in Rules
Issue/Introduction
A "Selection evaluation error" may occur if a selection is made against a table with a primary or secondary key defined with Syntax "C" and a numeric value is used for the right-hand side of the selection criteria.