isNull()

The system function JavaLib.isNull returns a value (1 for true, 0 for false) to indicate whether a specified identifier refers to a null object. JavaLib.isNull is one of several Java™ access functions.

  JavaLib.isNull(identifier javaObjId in)
  returns (result INT)
result
A numeric field that receives one of two values: 1 for true, 0 for false. Use of a non-numeric field causes an error at validation time.
identifier

An identifier that refers to an object in the object space.

This argument is either a string literal or an item of type CHAR, DBCHAR, MBCHAR, STRING, or UNICODE. The identifier must be cast to objID. EGL strips single- and double-byte blanks from the beginning and end of the argument value, which is case sensitive.

An example is as follows:
  // test whether an object is null
  // and process accordingly
  isNull = JavaLib.isNull( (objId)valueId );
  
  if( isNull == 1 )
    error = 12;
  end 

An error during processing of JavaLib.isNull can set SysVar.errorCode to a value listed in the next table.

Value in sysVar.errorCode Description
00001001 The specified identifier was not in the object space

Related concepts
Syntax diagram for EGL functions

Related reference
EGL library JavaLib
getField()
invoke()
isObjID()
qualifiedTypeName()
remove()
removeAll()
setField()
store()
storeCopy()
storeField()
storeNew()

Related tasks
Syntax diagram for EGL statements and commands

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.