Boolean Returned Expressions
Boolean returned expressions evaluate to TRUE or FALSE based on logical conditions.
Boolean returned expressions include:
value_returned_expression { '>=' | '<=' | '>' | '<' | '<>' | '=' } value_returned_expression: Compares two expressions using operators (>=,<=,>,<,<>,=).Example:CUSTOMERS.CUST_YEAR_OF_BIRTH >= 2000expression [NOT] BETWEEN value_returned_expression AND value_returned_expression: Checks if the value of the expression falls within the specified range.Example:CUSTOMERS.CUST_CREDIT_LIMIT BETWEEN 50000 AND 100000match_expression [NOT] LIKE pattern: Matches a string match expression against a specified pattern with the following valid wildcard characters (%,_,[],[^]).- match_expression: A string that's evaluated against a pattern.
- pattern: A string specifying the pattern for matching with valid wildcard characters:
%,_,[],[^].
CUSTOMERS.FIRST_NAME LIKE 'J%n'expression IS [NOT] NULL: Checks if the expression is (or is not) NULL.Example:CUSTOMERS.CUST_EMAIL IS NOT NULLISNULL '(' expression ')': Returns asTrueif the expression isNull, or isFalseotherwise.Example:ISNULL(CUSTOMERS.CUST_VALID)NOT boolean_returned_expression: Negates a boolean expression.Example:NOT CUSTOMERS.CUST_YEAR_OF_BIRTH >= 2000boolean_returned_expression AND boolean_returned_expression: Combines conditions using the logicalAND.Example:CUSTOMERS.CUST_YEAR_OF_BIRTH >= 2000 AND CUSTOMERS.CUST_EMAIL IS NOT NULLboolean_returned_expression OR boolean_returned_expression:Combines conditions using the logicalOR.Example:CUSTOMERS.CUST_YEAR_OF_BIRTH >= 2000 OR CUSTOMERS.CUST_EMAIL IS NOT NULLexpression [NOT] IN in_expr: Checks if the value of the expression exists (or doesn't exist) in the list ofin_exprvalues (value returned expression list).Example:CUSTOMERS.CUST_VALID IN ('A', 'I')'('boolean_returned_expression')': Groups expressions for logical evaluation.Example:(CUSTOMERS.CUST_YEAR_OF_BIRTH >= 2000 AND CUSTOMERS.CUST_EMAIL IS NOT NULL)
Usage Example
DEFINE VERSIONED DATASET CUSTOMERS_D
//use of boolean_returned_expression
ROWSOURCE CUSTOMERS WHERE CUSTOMERS.CUST_YEAR_OF_BIRTH IS NOT NULL AND CUSTOMERS.CUST_SRC_ID IS NULL;
THIS = CUSTOMERS;
PRIMARYKEY[CUST_ID];
END