SELECTIONFAILexception documentation

SELECTIONFAILexception documentation

book

Article ID: KB0084418

calendar_today

Updated On:

Products Versions
TIBCO Object Service Broker for z/OS -
Not Applicable -

Description

Resolution:
Description:
============
Documenting the causes of the rules exception SELECTIONFAIL

Environment:
============
o All TIBCO® Object Service Broker for z/OS (OSB) releases above R5.0 hotfix 13.

Symptoms:
=========
The SELECTIONFAIL exception can be encountered in rules.

Cause:
======
When performing selection on a table if the keyfield is a string and the requested value is numeric then a table sweep and numeric comparison is performed to find the required rows. Nonnumeric key values then cause SELECTIONFAIL to be raised.

E.G.  GET table WHERE KEY = 1

if key is a 4 character string field then we sweep the table looking for the first key that matches numeric one.

This could be the KEY values '   1', '0001', '1.00', '01.0', etc etc.  

If during the sweep for keys matching the number 1, we encounter a non-numeric key value which is perfectly possible, the SELECTIONFAIL exception is raised and the table access is terminated.

Resolution:
===========
Change the rule to supply a string value in the format required instead of a number, allowing a direct indexed get to be performed.

References:
===========
TIBCO® Object Service Broker Programming in Rules Software Release 5.2.0 August 2010
TIBCO® Object Service Broker Release Notes Software Release 5.2.0 August 2010

Issue/Introduction

SELECTIONFAILexception documentation