storeCopy()

The system function JavaLib.storeCopy creates a new identifier based on another in the object space, so that both refer to the same object. If the source identifier is not in the object space, a null is stored for the target identifier and no error occurs. If the target identifier is already in the object space, the action is equivalent to the following steps:

JavaLib.storeCopy is one of several Java™ access functions.

  JavaLib.storeCopy(
    sourceId javaObjId in,
    targetId javaObjId in)
sourceId
An identifier that refers to an object in the object space or to null.

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

targetId
The new identifier, which refers to the same object.

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, as in a later example. 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:
  JavaLib.storeCopy( (objId)"sourceId", (objId)"targetId" );

No runtime errors are associated with JavaLib.storeCopy.

Related concepts
Syntax diagram for EGL functions

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

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