This function copies elements of a Java array to a COBOL table provided.It is equivalent to the JNI functions Get<PrimitiveType>ArrayRegion
.
Call
CALL 'JCI_GetArray' USING
aObj start num res
aObj | Array object |
start | Start position |
num | Number |
r | Result description |
Arguments
aObj | Data field of the type |
start | Data field of the type |
num | Data field of the type |
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-EINDAOB
num is less than 0 or start is less than 1 or greater than the number of elements in the array.
JCI-RET-ERESVERS
The statically generated version number in res is invalid (possibly overwritten).
JCI-RET-ERESTYPE
The value of the ResType
field is invalid.
JCI-RET-ERESCONV
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.
All elements up to the faulty element are transferred; all subsequent fields of the COBOL table remain unchanged.
Notes
A maximum of (number of array elements - start + 1) or num elements are transferred.