Check for null or blank

Andrew2009

Well Known Member
Right now I have to have two checks, if a variable is equal to null or blank. Is there a better way to check for null and blank?

Thanks
 
Usually greater than Zero filters both Null and Blank for strings in ER. So you may can write your logic in Else loop of IF Greater than Zero
 
Look at an ASCII chart for DEC Hx Oct values.

You will see
NULL = worth 0 on an ASCII chart
Space = worth 20 on an ASCII chart
ZERO = worth 30 on an ASCII chart

http://www.asciitable.com/

So E1 will use it's greater than / less than based on this little gem deep down
 
Yes, That is right. It uses ASCII value to compare.

If our comparison string has ! or # then the greater than zero fails as ASCII values of them are less than 30; So as space and Null.
 
Are you talking about ER string comparisons?

If so (and you're on a fairly recent tools release), you can use the <is equal to or empty> condition and use <blank> as your right operand.
 
JMR...I like your approach. I'll use it to check for blank and null.

If I want to check for not null and not blank then I'll use the greater than Zero approach suggested by Lakshmi since there's no <is not equal to or empty> operator

Thanks
JDE 9.1
 
Last edited:
Back
Top