Why Does an Unassigned Identifier in the Rules Language Equate to Zero? (Doc ID 1270616.1)

Last updated on DECEMBER 16, 2010

Applies to:

Oracle Utilities Load Profiling and Settlement - Version: 4.5 and later   [Release: and later ]
LODESTAR EIP - Version: 4.5 and later ]
Oracle Utilities Meter Data Management - Version: 04.50 and later    [Release: 4.5 and later]
Oracle Utilities Billing Component - Version: 4.5 and later ]
Oracle Utilities Portfolio Management - Version: 4.5 and later ]
Information in this document applies to any platform.

Goal

How does the Rules Language treat empty variables and why isn't an error returned if an empty uninitialized identifier is used in a calculation?

Consider the following:

IF NON_ASSIGNED_VARIABLE <> 0
THEN
X = "Null is not equating to zero";
ELSE
Y = "Null is equating to zero";
END IF;
//
IF NON_ASSIGNED_VARIABLE = 0
THEN
Y = "Null is equating to zero";
ELSE
X = "Null is not equating to zero";
END IF;
//

In both cases, Y is returned.  This behavior can be confusing because NON_ASSIGNED_VARIABLE is not actually equal to zero. 

Why is this happening? 
How can one differentiate between zero and null if the above Rules Language won't do it?


Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms