Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

JCI_GetArray

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 JCI-object
Array object whose elements are to be copied.

start

Data field of the type JCI-size
Position of the first element in the Java array which is to be transferred (beginning with 1).

num

Data field of the type JCI-size
Maximum number of elements which are to be transferred.
After the call, num contains the number of elements which were actually transferred.

r

A structure of the form MethodRes
Return value and error information (see section "Arguments and event values of Java methods").
ResType must be set in accordance with the COBOL data type of the table elements. Neither RES-OBJECT nor RES-ANUM-STRING nor RES-NAT-STRING is permissible.
The address of the COBOL table to which the elements are to be copied is always transferred in the ResValAddr field, regardless of the data type.


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.