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_SetArray

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

start

Data field of the type JCI-size
Position of the first element in the Java array which is to be overwritten (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, and in the case of an error 0.

arg

A structure of the form MethodArg
Description of the array elements.
Only the ArgType(1) and ArgValAddr(1) fields are required.
ArgType(1) must be set in accordance with the COBOL data type of the table elements. Neither ARG-OBJECT nor ARG-ANUM-STRING nor ARG-NAT-STRING is permissible.
The address of the COBOL table from which the elements are to be copied is always transferred in the ArgValAddr(1) field, regardless of the data type.

r

A structure of the form MethodRes
Error information (output only).


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.