This function copies a COBOL table to the elements of a Java array.It is equivalent to the JNI functions Set<PrimitiveType>ArrayRegion
.
Call
CALL 'JCI_SetArray' USING
aObj start num arg res
aObj | Array object |
start | Start position |
num | Number |
arg | Argument description |
r | Result description |
Arguments
aObj | Data field of the type |
start | Data field of the type |
num | Data field of the type |
arg | A structure of the form |
r | A structure of the form |
Return value (RETURN-CODE)
JCI-RET-OK
The call was successful.
JCI-RET-ENOVM
No Java VM has been started.
JCI-RET-ENULLOBJ
aObj is JCI-NULL
.
JCI-RET-EARGUMENT
aObj is not an array object.
JCI-RET-EARGVERS
The statically generated version number in elem is invalid (possibly overwritten).
JCI-RET-ERESVERS
The statically generated version number in res is invalid (possibly overwritten).
JCI-RET-EARGTYPE
The value of the ArgType
field is invalid.
JCI-RET-EARGCONV
An error occurred while the table elements were being converted.
The ResErrIndex
field contains the number of the COBOL table element (beginning with 1), the ResErrCode
field a more precise error code.
If a conversion error occurs in an element, no transfer takes place, i.e. all fields of the Java array remain unchanged.
JCI-RET-EINDAOB
num is less than 0 or start is less than 1 or greater than the number of elements in the array.
Notes
A maximum of (number of array elements - start + 1) or num elements are transferred.