Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : NUM_CHK

NUM_CHK
Determines if a given string satisfies the TIBCO Object Service Broker definition of a numeric literal. (F)
Invocation
verify = NUM_CHK(val)
 
On return, contains the value Y if val is a numeric literal or N if val is not a numeric literal.
See Also
TIBCO Object Service Broker Programming in Rules for a description of valid TIBCO Object Service Broker numeric literals.
Example
Rule Using NUM_CHK
The following rule verifies that you provide a number for a rule:

 
VERIFY_INPUT(INPUT);
_ LOCAL NUMBER;
_ ---------------------------------------------------------------------
_ NUM_CHK(INPUT) = 'Y'; | Y N
_ ------------------------------------------------------------+--------
_ NUMBER = INPUT; | 1
_ CALL CALCULATE; | 2
_ CALL ENDMSG(INPUT || ' IS NOT A VALID NUMBER.'); | 1
_ ---------------------------------------------------------------------

 
If you provide valid input, for example, VERIFY_INPUT(56), the CALCULATE rule is called to perform arithmetic operations on the number.
If the input is not valid, for example, VERIFY_INPUT(AB), you receive the message:
AB IS NOT A VALID NUMBER

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved