Java Typedefs

Restriction: This applies to native code only.

For convenience, copybook javatypes.cpy defines a set of COBOL data types corresponding to Java data types - you can use these as a shorthand way of declaring data items for use with Java in your COBOL programs. You can find the copybook in your $COBDIR/cpylib directory.

These typedefs all start with the prefix "j" and are shown in the following table:

Typedef COBOL Type
jbyte pic s99 comp-5
jshort pic s9(4) comp-5
jint pic s9(9) comp-5
jlong pic s9(18) comp-5

JNI-TRUE is true

JNI-FALSE is false

pic 99 comp-5
jchar pic 9(4) comp-5
jfloat comp-1
jdouble comp-2
jobject pointer
jbigdecimal pic s9(19)v9(19) comp-3
jbiginteger pic s9(38) comp-3

(in javatypes.cpy)

0x jyear pic 9(4).

0x filler pic x.

0x jmonth pic 99.

0x filler pic x.

0x jday pic 99.


(in javatypes.cpy)

0x jhour pic 99.

0x filler pic x.

0x jminute pic 99.

0x filler pic x.

0x jseconds pic 99.