<Null> value handling in ER



Legendary Poster

Merry Christmas and Happy New Year!

Has anybody any solution about how to assign <Null> value to an ER left value object (control, variable, etc.) in Event Rules?

As you know, we can not use Literal in the selection part of Table I/Os (Select, FetchSingle, Update) only objects based on data items.

On the other hand, any coins, tricks, summary of experiments relating to <Null> value in OW will be appreciated.


B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)

Declare a variable. And assign the same to it like

szNull is variable suppose

It will be always blank. Use this left side of ER.

I hope you know this. But I know only this method.

Happy Xmas

JDE CNC Consultant

Your suggestion makes no sense. OW initializes variables according to their type to either 0 or blank. Blank is not null. Zero is not null.

Larry Jones
[email protected]
OneWorld B733.1, SP 11.3
HPUX 11, Oracle SE 8.1.6
Thanks for your clarification.
You exactly described what is my pain.

Merry Christmas,

P.S.: If you read this in e-mail instead on the Forum and see "&lt" and
"&gt" literals then replace them with LessThan and GreaterThan signs in


B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
Hi Zoltan,

According to JDE documentation “Null” is ASCII “\0”. Use any “ZeroTerminatedString“ type like DL01; set to “space” and “ltrim” it for “space”.


VA rpt_NullTest is DD type DL01.

0001 VA rpt_NullTest = " " //
0002 VA rpt_NullTest = ltrim([VA rpt_NullTest]," ")

You can test that later with:

0003 If VA rpt_NullTest is equal to <Null>
0004 // OK message//
0005 Else
0006 // Error Message//
0007 End If


Hi Bojan,
Thanks your suggestion.
It sounds good!
Let me some further questions.

1.) What is the JDE documentation that you have mentioned?
2.) What is the two slash character on the end of
0001 VA rpt_NullTest = " " //
3.) Have you ever tested this method? If yes, on which OW version? If you haven't then I will do but only after Christmas.

I have to tell that in the past I was struggling a lot with trailing blanks (results of rtrim) when I made our translation extractation/transportation tools for B7331. E.g. when I rtrimmed A variable and assigned its value to B and concatenated an ltrimmed C to B, sometimes caused blanks between A and C values in B variable (generally as many space as needed to pad A to its length).
For example A is 5, B is 40 and C is 5 char lenth and the initial values are:
then after
the value of B is "abc__zxy"

I'amnt sure, this was the typical case but in any case, manipulating strings with assignments and string functions caused that sometimes, somewhere the effect of an earlier RTRIM has been lost.

Thanks again &

Merry Christmas!


B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
Hi Zoltan,

JDE documentation is OW Explorer, Help, Contents, Tools, Technical and Foundation, Development Tools. Two slash are beginning of comment I didn’t copy/paste, sorry. Should be:

0001 VA rpt_NullTest = “ “ // VA rpt_NullTest is DL01 DD Item //.

I tested it on B733.2, SP10, SQL 7, NT 4.0 and works well. I have been told that “sz” (String) variable is really “zero terminated string” and it should work on any OW version.
I never had any problem with “ltrim” or “rtrim” function in OW. Are you shore you didn’t use: A=rtrim(A,"") instead of: A=rtrim(A,"_").

I agree that string operations in OW are not perfect and sometimes is necessary to develop custom BFs for string manipulation. An example is "find string in string" function.

Please feel free to contact me if you have any further questions or concerns regarding this.

Merry Christmas!

I am sure that when I had problems with rtrim then I used a space between the qutation marks, didn't used null string.
Once upon a time a had sent this problem and solution to Tony St.Pierre who issued and maintained the "OneWorld Developers Tips and Traps" and the last edition contained it.
Now I Copy/Paste it here:
String Concatenation and variables padded with blanks from the right(B733, B732???)
Sometimes OneWorld pads string variables (or other data holders) with blanks from the right as long as the Data Item length. If it is so and you use this variable as the first argument of a string concatenation function then the results will not be the required.

"evt_ExitText" variable and "BF Exit Text" Business Function
parameter are based DS80 Data Item in a NER BSFN.
"evt_ExitText" has the contents "Form" from a previous Table I/O.
ER lines:

evt_ExitText = rtrim(evt_ExitText, " ")
BF Exit Text = evt_ExitText
BF Exit Text = concat(BF Exit Text, " Exits")

Required contents of BF Exit Text is "Form Exits" but it can be only

Resolution is in this example to insert the row:

BF Exit Text = rtrim(BF Exit Text, " " )

before the last ER line.

Generally: Always rtrim blanks from the right of the first argument of a concat statement before use it in the concat function.

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)