      ******************************************************************
      * Copyright (C) 1984-2002 Micro Focus International Ltd. 
      * All rights reserved.
      *
      * This demonstration program is provided for use by users of
      * Micro Focus products (the "Software") and may be used,
      * modified and distributed as part of your application provided
      * that you properly acknowledge the copyright of Micro Focus in
      * this material.
      *
      * All conditions, warranties and undertakings, express or implied,
      * statutory or otherwise, on the part of Micro Focus are excluded,
      * including without limitation those of merchantability or fitness
      * for purpose. This shall not, however, purport to exclude or
      * restrict the liability of Micro Focus to any extent not
      * permitted by law.
      *
      * IN NO EVENT WILL MICRO FOCUS BE LIABLE FOR ANY INDIRECT,
      * INCIDENTAL, SPECIAL, CONSEQUENTIAL OR OTHER DAMAGES ARISING OUT
      * OF THE USE OF THE DEMONSTRATION PROGRAM DISTRIBUTED WITH THE
      * SOFTWARE, WHETHER OR NOT INFORMED OF THE POSSIBILITIES OF
      * DAMAGES IN ADVANCE.  THESE LIMITATIONS APPLY TO ALL CAUSES OF
      * ACTION, INCLUDING BREACH OF CONTRACT, BREACH OF WARRANTY, STRICT
      * LIABILITY, AND ANY ACTIONS IN TORTS.
      ******************************************************************

      ************************************************************************
      *  COBOL definitions of the basic Java types.
      ************************************************************************
       01 jlong                            is typedef pic s9(18) comp-5.
       01 jint                             is typedef pic s9(9) comp-5.
       01 jboolean                         is typedef pic 99 comp-5.
       01 jchar                            is typedef pic 9(4) comp-5.
       01 jcharx                           is typedef pic xx comp-5.
       01 jshort                           is typedef pic s9(4) comp-5.
       01 jfloat                           is typedef comp-1.
       01 jdouble                          is typedef comp-2.
       01 jbyte                            is typedef pic s99 comp-5.
       01 jbytex                           is typedef pic x.

       01 mf-jstring is typedef.
                03 len 			jint.
                03 capacity             jint.
                03 ptr2string	        pointer.
       01 mf-jarray is typedef.
                03 no-of-elements	jint.
                03 ptr2array		pointer.

      $if intlevel(4) set
       01 mf-jbigdecimal             is typedef pic S9(19)V9(19) comp-3.
       01 mf-jbiginteger             is typedef pic S9(38) comp-3.
      $end

       01 mf-jsql-date is typedef.
           03 jyear     pic 9(4).
           03 filler    pic x.
           03 jmonth    pic 99.
           03 filler    pic x.
           03 jday      pic 99.

       01 mf-jsql-time is typedef.
           03 jhour     pic 99.
           03 filler    pic x.
           03 jminute   pic 99.
           03 filler    pic x.
           03 jseconds  pic 99.


      *  Useful JNI typedefs
       01 jobject                          is typedef pointer.
       01 jclass                           is typedef jobject.
       01 jfieldID                         is typedef pointer.
       01 jmethodID                        is typedef pointer.
       01 jsize                            is typedef jint.
       78 JNI-TRUE                         value 1.
       78 JNI-FALSE                        value 0.
       78 JNI-OK                           value 0.
       78 JNI-ERR                          value -1.

      *  The JNI function table for Java SDK 1.1. The
      *  first parameter to a native method call is
      *  a pointer to this table.  It contains a procedure
      *  pointer for every JNI function.
       01 JNINativeInterface is typedef.
       	03 Reserved0                       usage procedure-pointer.
       	03 Reserved1                       usage procedure-pointer.
       	03 Reserved2                       usage procedure-pointer.
       	03 Reserved3                       usage procedure-pointer.
       	03 GetVersion                      usage procedure-pointer.
       	03 DefineClass                     usage procedure-pointer.
       	03 FindClass                       usage procedure-pointer.
       	03 Reserved4                       usage procedure-pointer.
       	03 Reserved5                       usage procedure-pointer.
       	03 Reserved6                       usage procedure-pointer.
       	03 GetSuperClass                   usage procedure-pointer.
       	03 IsAssignableFrom                usage procedure-pointer.
       	03 Reserved7                       usage procedure-pointer.
       	03 Throw                           usage procedure-pointer.
       	03 ThrowNew                        usage procedure-pointer.
       	03 ExceptionOccurred               usage procedure-pointer.
       	03 ExceptionDescribe               usage procedure-pointer.
       	03 ExceptionClear                  usage procedure-pointer.
       	03 FatalError                      usage procedure-pointer.
       	03 Reserved8                       usage procedure-pointer.
       	03 Reserved9                       usage procedure-pointer.
       	03 NewGlobalRef                    usage procedure-pointer.
       	03 DeleteGlobalRef                 usage procedure-pointer.
       	03 DeleteLocalRef                  usage procedure-pointer.
       	03 IsSameObject                    usage procedure-pointer.
       	03 Reserved10                      usage procedure-pointer.
       	03 Reserved11                      usage procedure-pointer.
       	03 AllocObject                     usage procedure-pointer.
       	03 NewObject                       usage procedure-pointer.
       	03 NewObjectV                      usage procedure-pointer.
       	03 NewObjectA                      usage procedure-pointer.
       	03 GetObjectClass                  usage procedure-pointer.
       	03 IsInstanceOf                    usage procedure-pointer.
       	03 GetMethodID                     usage procedure-pointer.
       	03 CallObjectMethod                usage procedure-pointer.
       	03 CallObjectMethodV               usage procedure-pointer.
       	03 CallObjectMethodA               usage procedure-pointer.
       	03 CallBooleanMethod               usage procedure-pointer.
       	03 CallBooleanMethodV              usage procedure-pointer.
       	03 CallBooleanMethodA              usage procedure-pointer.
       	03 CallByteMethod                  usage procedure-pointer.
       	03 CallByteMethodV                 usage procedure-pointer.
       	03 CallByteMethodA                 usage procedure-pointer.
       	03 CallCharMethod                  usage procedure-pointer.
       	03 CallCharMethodV                 usage procedure-pointer.
       	03 CallCharMethodA                 usage procedure-pointer.
       	03 CallShortMethod                 usage procedure-pointer.
       	03 CallShortMethodV                usage procedure-pointer.
       	03 CallShortMethodA                usage procedure-pointer.
       	03 CallIntMethod                   usage procedure-pointer.
       	03 CallIntMethodV                  usage procedure-pointer.
       	03 CallIntMethodA                  usage procedure-pointer.
       	03 CallLongMethod                  usage procedure-pointer.
       	03 CallLongMethodV                 usage procedure-pointer.
       	03 CallLongMethodA                 usage procedure-pointer.
       	03 CallFloatMethod                 usage procedure-pointer.
       	03 CallFloatMethodV                usage procedure-pointer.
       	03 CallFloatMethodA                usage procedure-pointer.
       	03 CallDoubleMethod                usage procedure-pointer.
       	03 CallDoubleMethodV               usage procedure-pointer.
       	03 CallDoubleMethodA               usage procedure-pointer.
       	03 CallVoidMethod                  usage procedure-pointer.
       	03 CallVoidMethodV                 usage procedure-pointer.
       	03 CallVoidMethodA                 usage procedure-pointer.
       	03 CallNonVirtualObjectMethod      usage procedure-pointer.
       	03 CallNonVirtualObjectMethodV     usage procedure-pointer.
       	03 CallNonVirtualObjectMethodA     usage procedure-pointer.
       	03 CallNonVirtualBooleanMethod     usage procedure-pointer.
       	03 CallNonVirtualBooleanMethodV    usage procedure-pointer.
       	03 CallNonVirtualBooleanMethodA    usage procedure-pointer.
       	03 CallNonVirtualByteMethod        usage procedure-pointer.
       	03 CallNonVirtualByteMethodV       usage procedure-pointer.
       	03 CallNonVirtualByteMethodA       usage procedure-pointer.
       	03 CallNonVirtualCharMethod        usage procedure-pointer.
       	03 CallNonVirtualCharMethodV       usage procedure-pointer.
       	03 CallNonVirtualCharMethodA       usage procedure-pointer.
       	03 CallNonVirtualShortMethod       usage procedure-pointer.
       	03 CallNonVirtualShortMethodV      usage procedure-pointer.
       	03 CallNonVirtualShortMethodA      usage procedure-pointer.
       	03 CallNonVirtualIntMethod         usage procedure-pointer.
       	03 CallNonVirtualIntMethodV        usage procedure-pointer.
       	03 CallNonVirtualIntMethodA        usage procedure-pointer.
       	03 CallNonVirtualLongMethod        usage procedure-pointer.
       	03 CallNonVirtualLongMethodV       usage procedure-pointer.
       	03 CallNonVirtualLongMethodA       usage procedure-pointer.
       	03 CallNonVirtualFloatMethod       usage procedure-pointer.
       	03 CallNonVirtualFloatMethodV      usage procedure-pointer.
       	03 CallNonVirtualFloatMethodA      usage procedure-pointer.
       	03 CallNonVirtualDoubleMethod      usage procedure-pointer.
       	03 CallNonVirtualDoubleMethodV     usage procedure-pointer.
       	03 CallNonVirtualDoubleMethodA     usage procedure-pointer.
       	03 CallNonVirtualVoidMethod        usage procedure-pointer.
       	03 CallNonVirtualVoidMethodV       usage procedure-pointer.
       	03 CallNonVirtualVoidMethodA       usage procedure-pointer.
       	03 GetFieldID                      usage procedure-pointer.
       	03 GetObjectField                  usage procedure-pointer.
       	03 GetBooleanField                 usage procedure-pointer.
       	03 GetByteField                    usage procedure-pointer.
       	03 GetCharField                    usage procedure-pointer.
       	03 GetShortField                   usage procedure-pointer.
       	03 GetIntField                     usage procedure-pointer.
       	03 GetLongField                    usage procedure-pointer.
       	03 GetFloatField                   usage procedure-pointer.
       	03 GetDoubleField                  usage procedure-pointer.
       	03 SetObjectField                  usage procedure-pointer.
       	03 SetBooleanField                 usage procedure-pointer.
       	03 SetByteField                    usage procedure-pointer.
       	03 SetCharField                    usage procedure-pointer.
       	03 SetShortField                   usage procedure-pointer.
       	03 SetIntField                     usage procedure-pointer.
       	03 SetLongField                    usage procedure-pointer.
       	03 SetFloatField                   usage procedure-pointer.
       	03 SetDoubleField                  usage procedure-pointer.
       	03 GetStaticMethodID               usage procedure-pointer.
       	03 CallStaticObjectMethod          usage procedure-pointer.
       	03 CallStaticObjectMethodV         usage procedure-pointer.
       	03 CallStaticObjectMethodA         usage procedure-pointer.
       	03 CallStaticBooleanMethod         usage procedure-pointer.
       	03 CallStaticBooleanMethodV        usage procedure-pointer.
       	03 CallStaticBooleanMethodA        usage procedure-pointer.
       	03 CallStaticByteMethod            usage procedure-pointer.
       	03 CallStaticByteMethodV           usage procedure-pointer.
       	03 CallStaticByteMethodA           usage procedure-pointer.
       	03 CallStaticCharMethod            usage procedure-pointer.
       	03 CallStaticCharMethodV           usage procedure-pointer.
       	03 CallStaticCharMethodA           usage procedure-pointer.
       	03 CallStaticShortMethod           usage procedure-pointer.
       	03 CallStaticShortMethodV          usage procedure-pointer.
       	03 CallStaticShortMethodA          usage procedure-pointer.
       	03 CallStaticIntMethod             usage procedure-pointer.
       	03 CallStaticIntMethodV            usage procedure-pointer.
       	03 CallStaticIntMethodA            usage procedure-pointer.
       	03 CallStaticLongMethod            usage procedure-pointer.
       	03 CallStaticLongMethodV           usage procedure-pointer.
       	03 CallStaticLongMethodA           usage procedure-pointer.
       	03 CallStaticFloatMethod           usage procedure-pointer.
       	03 CallStaticFloatMethodV          usage procedure-pointer.
       	03 CallStaticFloatMethodA          usage procedure-pointer.
       	03 CallStaticDoubleMethod          usage procedure-pointer.
       	03 CallStaticDoubleMethodV         usage procedure-pointer.
       	03 CallStaticDoubleMethodA         usage procedure-pointer.
       	03 CallStaticVoidMethod            usage procedure-pointer.
       	03 CallStaticVoidMethodV           usage procedure-pointer.
       	03 CallStaticVoidMethodA           usage procedure-pointer.
       	03 GetStaticFieldID                usage procedure-pointer.
       	03 GetStaticObjectField            usage procedure-pointer.
       	03 GetStaticBooleanField           usage procedure-pointer.
       	03 GetStaticByteField              usage procedure-pointer.
       	03 GetStaticCharField              usage procedure-pointer.
       	03 GetStaticShortField             usage procedure-pointer.
       	03 GetStaticIntField               usage procedure-pointer.
       	03 GetStaticLongField              usage procedure-pointer.
       	03 GetStaticFloatField             usage procedure-pointer.
       	03 GetStaticDoubleField            usage procedure-pointer.
       	03 SetStaticObjectField            usage procedure-pointer.
       	03 SetStaticBooleanField           usage procedure-pointer.
       	03 SetStaticByteField              usage procedure-pointer.
       	03 SetStaticCharField              usage procedure-pointer.
       	03 SetStaticShortField             usage procedure-pointer.
       	03 SetStaticIntField               usage procedure-pointer.
       	03 SetStaticLongField              usage procedure-pointer.
       	03 SetStaticFloatField             usage procedure-pointer.
       	03 SetStaticDoubleField            usage procedure-pointer.
       	03 NewString                       usage procedure-pointer.
       	03 GetStringLength                 usage procedure-pointer.
       	03 GetStringChars                  usage procedure-pointer.
       	03 ReleaseStringChars              usage procedure-pointer.
       	03 NewStringUTF                    usage procedure-pointer.
       	03 GetStringUTFLength              usage procedure-pointer.
       	03 GetStringUTFChars               usage procedure-pointer.
       	03 ReleaseStringUTFChars           usage procedure-pointer.
       	03 GetArrayLength                  usage procedure-pointer.
       	03 NewObjectArray                  usage procedure-pointer.
       	03 GetObjectArrayElement           usage procedure-pointer.
       	03 SetObjectArrayElement           usage procedure-pointer.
       	03 NewBooleanArray                 usage procedure-pointer.
       	03 NewByteArray                    usage procedure-pointer.
       	03 NewCharArray                    usage procedure-pointer.
       	03 NewShortArray                   usage procedure-pointer.
       	03 NewIntArray                     usage procedure-pointer.
       	03 NewLongArray                    usage procedure-pointer.
       	03 NewFloatArray                   usage procedure-pointer.
       	03 NewDoubleArray                  usage procedure-pointer.
       	03 GetBooleanArrayElements         usage procedure-pointer.
       	03 GetByteArrayElements            usage procedure-pointer.
       	03 GetCharArrayElements            usage procedure-pointer.
       	03 GetShortArrayElements           usage procedure-pointer.
       	03 GetIntArrayElements             usage procedure-pointer.
       	03 GetLongArrayElements            usage procedure-pointer.
       	03 GetFloatArrayElements           usage procedure-pointer.
       	03 GetDoubleArrayElements          usage procedure-pointer.
       	03 ReleaseBooleanArrayElements     usage procedure-pointer.
       	03 ReleaseByteArrayElements        usage procedure-pointer.
       	03 ReleaseCharArrayElements        usage procedure-pointer.
       	03 ReleaseShortArrayElements       usage procedure-pointer.
       	03 ReleaseIntArrayElements         usage procedure-pointer.
       	03 ReleaseLongArrayElements        usage procedure-pointer.
       	03 ReleaseFloatArrayElements       usage procedure-pointer.
       	03 ReleaseDoubleArrayElements      usage procedure-pointer.
       	03 GetBooleanArrayRegion           usage procedure-pointer.
       	03 GetByteArrayRegion              usage procedure-pointer.
       	03 GetCharArrayRegion              usage procedure-pointer.
       	03 GetShortArrayRegion             usage procedure-pointer.
       	03 GetIntArrayRegion               usage procedure-pointer.
       	03 GetLongArrayRegion              usage procedure-pointer.
       	03 GetFloatArrayRegion             usage procedure-pointer.
       	03 GetDoubleArrayRegion            usage procedure-pointer.
       	03 SetBooleanArrayRegion           usage procedure-pointer.
       	03 SetByteArrayRegion              usage procedure-pointer.
       	03 SetCharArrayRegion              usage procedure-pointer.
       	03 SetShortArrayRegion             usage procedure-pointer.
       	03 SetIntArrayRegion               usage procedure-pointer.
       	03 SetLongArrayRegion              usage procedure-pointer.
       	03 SetFloatArrayRegion             usage procedure-pointer.
       	03 SetDoubleArrayRegion            usage procedure-pointer.
       	03 RegisterNatives                 usage procedure-pointer.
       	03 UnRegisterNatives               usage procedure-pointer.
       	03 MonitorEnter                    usage procedure-pointer.
       	03 MonitorExit                     usage procedure-pointer.
       	03 GetJavaVM                       usage procedure-pointer.
 
       *> JDK 1.2 specific
        03 GetStringRegion                 usage procedure-pointer.
        03 GetStringUTFRegion              usage procedure-pointer.
        03 GetPrimitiveArrayCritical       usage procedure-pointer.
        03 ReleasePrimitiveArrayCritical   usage procedure-pointer.
        03 GetStringCritical               usage procedure-pointer.
        03 ReleaseStringCritical           usage procedure-pointer.
        03 NewWeakGlobalRef                usage procedure-pointer.
        03 DeleteWeakGlobalRef             usage procedure-pointer.
        03 ExceptionCheck                  usage procedure-pointer.

       *> JDK 1.4 specific
        03 NewDirectByteBuffer             usage procedure-pointer.
        03 GetDirectBufferAddress          usage procedure-pointer.
        03 GetDirectBufferCapacity         usage procedure-pointer.



      ************************************************************************
      *  COBOL definitions of the types used by the 'jarray' 
      *  Object COBOL class.
      ************************************************************************
       78 JT-SHORT	    value 2.	*> short
					*> pic s9(4) comp-5
       78 JT-INTEGER	    value 3.	*> integer
					*> pic s9(9) comp-5
       78 JT-FLOAT	    value 4.	*> float
					*> comp-1
       78 JT-DOUBLE	    value 5.	*> double
					*> comp-2
       78 JT-CHAR	    value 8.	*> char
					*> pic 9(4) comp-5
       78 JT-OBJECT	    value 9.	*> Object
					*> object reference
       78 JT-BOOL	    value 11.	*> boolean
					*> pic x. 
       78 JT-BYTE	    value 16.	*> byte
					*> pic s99 comp-5
       78 JT-LONG	    value 20.	*> long
					*> pic s9(18) comp-5
