PreviousPointer UpJava Support Classes runtimeObjectNext

mfcobol
Class runtime

java.lang.Object
  |
  +--mfcobol.runtime
Direct Known Subclasses:
runtimeObject

public class runtime
extends java.lang.Object

Object COBOL Java domain for SX 2.0 and NE 3.1 (Frozen)

Since:
JDK1.1

Field Summary
static short A_BLINK
          Screen attribute flag
static short A_BOLD
          Screen attribute flag
static short A_DIM
          Screen attribute flag
static short A_NORMAL
          Screen attribute flag
static short A_REVERSE
          Screen attribute flag
static short A_UNDER
          Screen attribute flag
static int BY_CONTENT
          BY_CONTENT is used in non-OO calls to COBOL in the usageDescription array.
static int BY_REFERENCE
          BY_REFERENCE is used in non-OO calls to COBOL in the usageDescription array.
static int BY_VALUE
          BY_VALUE is used in non-OO calls to COBOL in the usageDescription array.
protected static long cblClassHandle
          COBOL proxy class handle, if one exists
protected  long cblInstanceHandle
          COBOL proxy instance handle, if one exists
protected static boolean isWindows
          Running under Windows operating system
protected static java.lang.String osName
          Operating system name

 

Constructor Summary
runtime()
           

 

Method Summary
static void ccall(java.lang.Object retValue, java.lang.String program, java.lang.Object[] array, int[] usageDescription)
          Calls a c function with a set of parameters which returns an object as a parameter
static int ccall(java.lang.String program, java.lang.Object[] array, int[] usageDescription)
          Calls a c function with a set of parameters which returns an object as a parameter
static void cobaddstr(int attribute, java.lang.String name)
          Displays the specified string on the screen at the virutal cursor's current position.
static void cobaddstr(java.lang.String name)
          Displays the specified string on the screen at the virutal cursor's current position.
static void cobassocclass(java.lang.String fileName, java.lang.Class javaClass)
          Associates a Java class and COBOL class
static void cobassocclass(java.lang.String fileName, java.lang.String javaClass)
          Associates a Java class and COBOL class
static boolean cobcall_boolean(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a boolean
static java.lang.Boolean cobcall_Boolean(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a Boolean
static byte cobcall_byte(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a String
static java.lang.Byte cobcall_Byte(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a Byte
static float cobcall_float(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a float
static java.lang.Float cobcall_Float(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a Float
static int cobcall_int(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a int
static java.lang.Integer cobcall_Integer(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a Integer
static void cobcall_object(java.lang.Object retValue, java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns an object
static short cobcall_short(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a short
static java.lang.Short cobcall_Short(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a Short
static java.lang.String cobcall_String(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a String
static void cobcall(java.lang.Object retValue, java.lang.String program, java.lang.Object[] array, int[] usageDescription)
          Calls a COBOL function with a set of parameters which returns an object * as a parameter
static void cobcall(java.lang.Object retValue, java.lang.String program, java.lang.Object[] array, int[] usageDescription, boolean passJNIEnv_and_self)
          Calls a COBOL function with a set of parameters which returns an object * as a parameter
static int cobcall(java.lang.String program, java.lang.Object[] array)
          Calls a COBOL program with a set of parameters which returns a int
static void cobcancel(java.lang.String program)
          Causes the runtime to CANCEL the program specified.
static void cobclear()
          Clears the screen and positions the cursor at line 0, column 0 strings.
static int cobcols()
          Returns the number of columns on the screen
static void cobfinalize(java.lang.Object o)
          Destroys a COBOL proxy object
static char cobgetch()
          Gets a character from the keyboard
static java.lang.String cobgetenv(java.lang.String name)
          Allows you to find a COBOL/System environment variable
 boolean cobinvoke_boolean(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning a boolean
 byte cobinvoke_byte(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning a byte
 char cobinvoke_char(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning a char
 double cobinvoke_double(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning a double
 float cobinvoke_float(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning a float
 int cobinvoke_int(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning an int
 long cobinvoke_long(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning a long
 java.lang.Object cobinvoke_object(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning an object
 short cobinvoke_short(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters returning a short
 void cobinvoke_void(java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL instance with a set of parameters
static boolean cobinvokestatic_boolean(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning a boolean
static byte cobinvokestatic_byte(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning a byte
static char cobinvokestatic_char(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning a char
static double cobinvokestatic_double(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning a double
static float cobinvokestatic_float(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning a float
static int cobinvokestatic_int(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning an int
static long cobinvokestatic_long(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning a long
static java.lang.Object cobinvokestatic_object(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning an object
static short cobinvokestatic_short(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters returning a short
static void cobinvokestatic_void(java.lang.Class classObject, java.lang.String methodName, java.lang.Object[] params)
          Invokes a COBOL class with a set of parameters
static int coblines()
          Returns the number of lines on the screen
static int cobload(java.lang.String libName, java.lang.String fileName)
          Loads a COBOL library and/or program
static int cobloadclass(java.lang.String libName, java.lang.String fileName)
          Loads a COBOL library and/or a class within that library.
static int cobloadclass(java.lang.String libName, java.lang.String fileName, java.lang.Class javaClass)
          Loads a COBOL library and/or a class within that library and associates it with a particular Java class.
static int cobloadclass(java.lang.String libName, java.lang.String fileName, java.lang.String javaClassname)
          Loads a COBOL library and/or a class within that library and associates it with a particular Java class of a given name.
static void cobmove(int y, int x)
          Returns the number of lines on the screen
static int cobputenv(java.lang.String name)
          Allows you to dynamically change the COBOL environment a runtime
static int cobrescanenv()
          Causes the runtime to rescan the environment for COBOL environment strings.
static void cobtidy()
          Causes the runtime to tidy itself up.
static void main(java.lang.String[] args)
          Run this class in order to obtain the COBJVM environment variable for the current Java installation
Setup CLASSPATH to include mfcobol.jar and use:
java -Dmfcobol.getcobjvmenv=off mfcobol.runtime

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BY_VALUE

public static final int BY_VALUE
BY_VALUE is used in non-OO calls to COBOL in the usageDescription array. BY_REFERENCE is the default if usageDescription is not used
See Also:
cobcall(Object retValue, String program, Object[] array, int[] usageDescription), ccall(Object retValue, String program, Object[] array, int[] usageDescription), ccall(String program, Object[] array, int[] usageDescription)

BY_REFERENCE

public static final int BY_REFERENCE
BY_REFERENCE is used in non-OO calls to COBOL in the usageDescription array. BY_REFERENCE is the default if usageDescription is not used
See Also:
cobcall(Object retValue, String program, Object[] array, int[] usageDescription), ccall(Object retValue, String program, Object[] array, int[] usageDescription), ccall(String program, Object[] array, int[] usageDescription)

BY_CONTENT

public static final int BY_CONTENT
BY_CONTENT is used in non-OO calls to COBOL in the usageDescription array. BY_REFERENCE is the default if usageDescription is not used
See Also:
cobcall(Object retValue, String program, Object[] array, int[] usageDescription), ccall(Object retValue, String program, Object[] array, int[] usageDescription), ccall(String program, Object[] array, int[] usageDescription)

A_NORMAL

public static final short A_NORMAL
Screen attribute flag
See Also:
cobaddstr(int attribute,String name)

A_BOLD

public static final short A_BOLD
Screen attribute flag
See Also:
cobaddstr(int attribute,String name)

A_UNDER

public static final short A_UNDER
Screen attribute flag
See Also:
cobaddstr(int attribute,String name)

A_REVERSE

public static final short A_REVERSE
Screen attribute flag
See Also:
cobaddstr(int attribute,String name)

A_BLINK

public static final short A_BLINK
Screen attribute flag
See Also:
cobaddstr(int attribute,String name)

A_DIM

public static final short A_DIM
Screen attribute flag
See Also:
cobaddstr(int attribute,String name)

isWindows

protected static final boolean isWindows
Running under Windows operating system

osName

protected static final java.lang.String osName
Operating system name

cblClassHandle

protected static final long cblClassHandle
COBOL proxy class handle, if one exists

cblInstanceHandle

protected final long cblInstanceHandle
COBOL proxy instance handle, if one exists
Constructor Detail

runtime

public runtime()
Method Detail

main

public static void main(java.lang.String[] args)
Run this class in order to obtain the COBJVM environment variable for the current Java installation
Setup CLASSPATH to include mfcobol.jar and use:
java -Dmfcobol.getcobjvmenv=off mfcobol.runtime

cobcall

public static void cobcall(java.lang.Object retValue,
                           java.lang.String program,
                           java.lang.Object[] array,
                           int[] usageDescription,
                           boolean passJNIEnv_and_self)
                    throws COBOLException,
                           java.lang.Exception
Calls a COBOL function with a set of parameters which returns an object * as a parameter
Parameters:
retValue - an Object that contains the return value
program - a string
array - array of objects
passJNIEnv_and_self - - pass JNIENv *, jclass self to COBOL program
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example:

To call a COBOL program called "myfunc" with one integer parameter passed in "by reference".



Java Example
Integer myOneInt    = new Integer(41);
Object myParms[] = { myOneInt };
int usageUpdate[] = { runtime.BY_REFERENCE } ;

System.out.println("By Reference test");
runtime.cobcall(null,"myfunc",myParms,usageUpdate,false);
System.out.println("myfunc returned "+myOneInt);


COBOL Example (myfunc.cbl)
working-storage section.
copy "javatypes.cpy".
linkage section.
01 a usage jint.
procedure division using a.
add 1 to a
exit program returning 0.

 

cobcall

public static void cobcall(java.lang.Object retValue,
                           java.lang.String program,
                           java.lang.Object[] array,
                           int[] usageDescription)
                    throws COBOLException,
                           java.lang.Exception
Calls a COBOL function with a set of parameters which returns an object * as a parameter
Parameters:
retValue - an Object that contains the return value
program - a string
array - array of objects
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

ccall

public static void ccall(java.lang.Object retValue,
                         java.lang.String program,
                         java.lang.Object[] array,
                         int[] usageDescription)
                  throws COBOLException,
                         java.lang.Exception
Calls a c function with a set of parameters which returns an object as a parameter
Parameters:
retValue - an Object that contains the return value
program - a string
array - array of objects
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

ccall

public static int ccall(java.lang.String program,
                        java.lang.Object[] array,
                        int[] usageDescription)
                 throws COBOLException,
                        java.lang.Exception
Calls a c function with a set of parameters which returns an object as a parameter
Parameters:
program - a string
array - array of objects
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_object

public static void cobcall_object(java.lang.Object retValue,
                                  java.lang.String program,
                                  java.lang.Object[] array)
                           throws COBOLException,
                                  java.lang.Exception
Calls a COBOL program with a set of parameters which returns an object
Parameters:
retValue - an Object that contains the return value
program - a string
array - array of objects
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobgetenv

public static java.lang.String cobgetenv(java.lang.String name)
                                  throws COBOLException,
                                         java.lang.Exception
Allows you to find a COBOL/System environment variable
Parameters:
name - A name specifying the environment variable to be searched for and returned.
Returns:
String
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example: System.out.println("PATH is "+runtime.cobgetenv("PATH"));

cobputenv

public static int cobputenv(java.lang.String name)
                     throws COBOLException,
                            java.lang.Exception
Allows you to dynamically change the COBOL environment a runtime
Parameters:
name - A string to placed into the environment, with the format NAME=VALUE
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example:
runtime.cobputenv("MYVAR=Hi");
System.out.println("MYVAR is "+runtime.cobgetenv("MYVAR"));

cobclear

public static void cobclear()
                     throws COBOLException,
                            java.lang.Exception
Clears the screen and positions the cursor at line 0, column 0 strings.
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example: runtime.cobclear();

cobaddstr

public static void cobaddstr(java.lang.String name)
                      throws COBOLException,
                             java.lang.Exception
Displays the specified string on the screen at the virutal cursor's current position.
Parameters:
name - text to be displayed on the screen
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
xample: runtime.cobaddstr("Hello world\n");

cobaddstr

public static void cobaddstr(int attribute,
                             java.lang.String name)
                      throws COBOLException,
                             java.lang.Exception
Displays the specified string on the screen at the virutal cursor's current position.
Parameters:
attribute - screen attribute to display the text in
name - text to be displayed on the screen
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example: runtime.cobaddstr( runtime.A_REVERSE, "Text in A_REVERSE");

cobgetch

public static char cobgetch()
                     throws COBOLException,
                            java.lang.Exception
Gets a character from the keyboard
Returns:
char
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example:To get a single character from the keyboard
char a=runtim.cobgetch();

cobcols

public static int cobcols()
                   throws COBOLException,
                          java.lang.Exception
Returns the number of columns on the screen
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example: int cols=runtim.cobcols();

coblines

public static int coblines()
                    throws COBOLException,
                           java.lang.Exception
Returns the number of lines on the screen
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example: int lines=runtim.coblines();

cobmove

public static void cobmove(int y,
                           int x)
                    throws COBOLException,
                           java.lang.Exception
Returns the number of lines on the screen
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example: runtime.cobmove(10,10);

cobrescanenv

public static int cobrescanenv()
                        throws COBOLException,
                               java.lang.Exception
Causes the runtime to rescan the environment for COBOL environment strings.
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcancel

public static void cobcancel(java.lang.String program)
                      throws COBOLException,
                             java.lang.Exception
Causes the runtime to CANCEL the program specified.
Parameters:
name - name of program to be CANCEL'ed
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example: runtime.cobcancel("myprog");

cobtidy

public static void cobtidy()
                    throws COBOLException,
                           java.lang.Exception
Causes the runtime to tidy itself up. WARNING: No COBOL code should be called after the use of this method.
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception
Example: runtime.cobtidy(); System.exit(100);

cobcall_int

public static int cobcall_int(java.lang.String program,
                              java.lang.Object[] array)
                       throws COBOLException,
                              java.lang.Exception
Calls a COBOL program with a set of parameters which returns a int
Parameters:
program - a string
array - array of objects
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall

public static int cobcall(java.lang.String program,
                          java.lang.Object[] array)
                   throws COBOLException,
                          java.lang.Exception
Calls a COBOL program with a set of parameters which returns a int
Parameters:
program - a string
array - array of objects
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_byte

public static byte cobcall_byte(java.lang.String program,
                                java.lang.Object[] array)
                         throws COBOLException,
                                java.lang.Exception
Calls a COBOL program with a set of parameters which returns a String
Parameters:
program - a string
array - array of objects
Returns:
byte
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_boolean

public static boolean cobcall_boolean(java.lang.String program,
                                      java.lang.Object[] array)
                               throws COBOLException,
                                      java.lang.Exception
Calls a COBOL program with a set of parameters which returns a boolean
Parameters:
program - a string
array - array of objects
Returns:
boolean
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_short

public static short cobcall_short(java.lang.String program,
                                  java.lang.Object[] array)
                           throws COBOLException,
                                  java.lang.Exception
Calls a COBOL program with a set of parameters which returns a short
Parameters:
program - a string
array - array of objects
Returns:
short
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_float

public static float cobcall_float(java.lang.String program,
                                  java.lang.Object[] array)
                           throws COBOLException,
                                  java.lang.Exception
Calls a COBOL program with a set of parameters which returns a float
Parameters:
program - a string
array - array of objects
Returns:
float
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_Integer

public static java.lang.Integer cobcall_Integer(java.lang.String program,
                                                java.lang.Object[] array)
                                         throws java.lang.Exception,
                                                COBOLException
Calls a COBOL program with a set of parameters which returns a Integer
Parameters:
program - a string
array - array of objects
Returns:
String
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_Byte

public static java.lang.Byte cobcall_Byte(java.lang.String program,
                                          java.lang.Object[] array)
                                   throws java.lang.Exception,
                                          COBOLException
Calls a COBOL program with a set of parameters which returns a Byte
Parameters:
program - a string
array - array of objects
Returns:
Boolean
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_Boolean

public static java.lang.Boolean cobcall_Boolean(java.lang.String program,
                                                java.lang.Object[] array)
                                         throws java.lang.Exception,
                                                COBOLException
Calls a COBOL program with a set of parameters which returns a Boolean
Parameters:
program - a string
array - array of objects
Returns:
Boolean
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_Short

public static java.lang.Short cobcall_Short(java.lang.String program,
                                            java.lang.Object[] array)
                                     throws java.lang.Exception,
                                            COBOLException
Calls a COBOL program with a set of parameters which returns a Short
Parameters:
program - a string
array - array of objects
Returns:
Short
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_Float

public static java.lang.Float cobcall_Float(java.lang.String program,
                                            java.lang.Object[] array)
                                     throws java.lang.Exception,
                                            COBOLException
Calls a COBOL program with a set of parameters which returns a Float
Parameters:
program - a string
array - array of objects
Returns:
Float
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobcall_String

public static java.lang.String cobcall_String(java.lang.String program,
                                              java.lang.Object[] array)
                                       throws java.lang.Exception,
                                              COBOLException
Calls a COBOL program with a set of parameters which returns a String
Parameters:
program - a string
array - array of objects
Returns:
String
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobassocclass

public static void cobassocclass(java.lang.String fileName,
                                 java.lang.Class javaClass)
Associates a Java class and COBOL class
Parameters:
fileName - file name of COBOL class
javaClass - Java class

cobassocclass

public static void cobassocclass(java.lang.String fileName,
                                 java.lang.String javaClass)
Associates a Java class and COBOL class
Parameters:
fileName - file name of COBOL class
javaClass - full name of Java class

cobloadclass

public static int cobloadclass(java.lang.String libName,
                               java.lang.String fileName)
Loads a COBOL library and/or a class within that library. Called in the static initializer for any class that inherits from runtime. Used only if the full Java class name is identical to the COBOL file name

Example:
static {
cobloadclass("DllName", "MyCOBOLClass");
}
 
Parameters:
libName - library name, if required
fileName - file name of COBOL class
Returns:
int - success value (0 for success)
See Also:
cobloadclass(String libName, String fileName, Class javaClass), cobloadclass(String libName, String fileName, String javaClassname)

cobloadclass

public static int cobloadclass(java.lang.String libName,
                               java.lang.String fileName,
                               java.lang.Class javaClass)
Loads a COBOL library and/or a class within that library and associates it with a particular Java class. Called in the static initializer for any class that inherits from runtime. Used when a non-default class loader loads the class.

Example:
static {
cobloadclass("DllName", "MyCOBOLClass", MyPackage.MyJavaClass.class));
}
 
Parameters:
libName - library name, if required
fileName - file name of COBOL class
javaClass - Java class
Returns:
int - success value (0 for success)
See Also:
cobloadclass(String libName, String fileName), cobloadclass(String libName, String fileName, String javaClassname)

cobloadclass

public static int cobloadclass(java.lang.String libName,
                               java.lang.String fileName,
                               java.lang.String javaClassname)
Loads a COBOL library and/or a class within that library and associates it with a particular Java class of a given name. Called in the static initializer for any class that inherits from runtime.

Example:
static {
cobloadclass("DllName", "MyCOBOLClass", "MyPackage.MyJavaClass");
}
 
Parameters:
libName - library name, if required
fileName - file name of COBOL class
javaClassname - full name of Java class
Returns:
int - success value (0 for success)
See Also:
cobloadclass(String libName, String fileName), cobloadclass(String libName, String fileName, Class javaClass)

cobload

public static int cobload(java.lang.String libName,
                          java.lang.String fileName)
Loads a COBOL library and/or program
Parameters:
libName - library name
filenName - name of COBOL program
Returns:
int - success value (0 for success)

cobinvoke_boolean

public boolean cobinvoke_boolean(java.lang.String methodName,
                                 java.lang.Object[] params)
                          throws COBOLException,
                                 java.lang.Exception
Invokes a COBOL instance with a set of parameters returning a boolean
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
boolean
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_byte

public byte cobinvoke_byte(java.lang.String methodName,
                           java.lang.Object[] params)
                    throws COBOLException,
                           java.lang.Exception
Invokes a COBOL instance with a set of parameters returning a byte
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
byte
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_char

public char cobinvoke_char(java.lang.String methodName,
                           java.lang.Object[] params)
                    throws COBOLException,
                           java.lang.Exception
Invokes a COBOL instance with a set of parameters returning a char
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
char
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_short

public short cobinvoke_short(java.lang.String methodName,
                             java.lang.Object[] params)
                      throws COBOLException,
                             java.lang.Exception
Invokes a COBOL instance with a set of parameters returning a short
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
short
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_int

public int cobinvoke_int(java.lang.String methodName,
                         java.lang.Object[] params)
                  throws COBOLException,
                         java.lang.Exception
Invokes a COBOL instance with a set of parameters returning an int
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_long

public long cobinvoke_long(java.lang.String methodName,
                           java.lang.Object[] params)
                    throws COBOLException,
                           java.lang.Exception
Invokes a COBOL instance with a set of parameters returning a long
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
long
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_float

public float cobinvoke_float(java.lang.String methodName,
                             java.lang.Object[] params)
                      throws COBOLException,
                             java.lang.Exception
Invokes a COBOL instance with a set of parameters returning a float
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
float
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_double

public double cobinvoke_double(java.lang.String methodName,
                               java.lang.Object[] params)
                        throws COBOLException,
                               java.lang.Exception
Invokes a COBOL instance with a set of parameters returning a double
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
boolean
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_void

public void cobinvoke_void(java.lang.String methodName,
                           java.lang.Object[] params)
                    throws COBOLException,
                           java.lang.Exception
Invokes a COBOL instance with a set of parameters
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvoke_object

public java.lang.Object cobinvoke_object(java.lang.String methodName,
                                         java.lang.Object[] params)
                                  throws COBOLException,
                                         java.lang.Exception
Invokes a COBOL instance with a set of parameters returning an object
Parameters:
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
Object
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_boolean

public static boolean cobinvokestatic_boolean(java.lang.Class classObject,
                                              java.lang.String methodName,
                                              java.lang.Object[] params)
                                       throws COBOLException,
                                              java.lang.Exception
Invokes a COBOL class with a set of parameters returning a boolean
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
boolean
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_byte

public static byte cobinvokestatic_byte(java.lang.Class classObject,
                                        java.lang.String methodName,
                                        java.lang.Object[] params)
                                 throws COBOLException,
                                        java.lang.Exception
Invokes a COBOL class with a set of parameters returning a byte
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
byte
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_char

public static char cobinvokestatic_char(java.lang.Class classObject,
                                        java.lang.String methodName,
                                        java.lang.Object[] params)
                                 throws COBOLException,
                                        java.lang.Exception
Invokes a COBOL class with a set of parameters returning a char
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
char
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_short

public static short cobinvokestatic_short(java.lang.Class classObject,
                                          java.lang.String methodName,
                                          java.lang.Object[] params)
                                   throws COBOLException,
                                          java.lang.Exception
Invokes a COBOL class with a set of parameters returning a short
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
short
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_int

public static int cobinvokestatic_int(java.lang.Class classObject,
                                      java.lang.String methodName,
                                      java.lang.Object[] params)
                               throws COBOLException,
                                      java.lang.Exception
Invokes a COBOL class with a set of parameters returning an int
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
int
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_long

public static long cobinvokestatic_long(java.lang.Class classObject,
                                        java.lang.String methodName,
                                        java.lang.Object[] params)
                                 throws COBOLException,
                                        java.lang.Exception
Invokes a COBOL class with a set of parameters returning a long
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
long
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_float

public static float cobinvokestatic_float(java.lang.Class classObject,
                                          java.lang.String methodName,
                                          java.lang.Object[] params)
                                   throws COBOLException,
                                          java.lang.Exception
Invokes a COBOL class with a set of parameters returning a float
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
float
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_double

public static double cobinvokestatic_double(java.lang.Class classObject,
                                            java.lang.String methodName,
                                            java.lang.Object[] params)
                                     throws COBOLException,
                                            java.lang.Exception
Invokes a COBOL class with a set of parameters returning a double
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
boolean
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_void

public static void cobinvokestatic_void(java.lang.Class classObject,
                                        java.lang.String methodName,
                                        java.lang.Object[] params)
                                 throws COBOLException,
                                        java.lang.Exception
Invokes a COBOL class with a set of parameters
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobinvokestatic_object

public static java.lang.Object cobinvokestatic_object(java.lang.Class classObject,
                                                      java.lang.String methodName,
                                                      java.lang.Object[] params)
                                               throws COBOLException,
                                                      java.lang.Exception
Invokes a COBOL class with a set of parameters returning an object
Parameters:
classObject - the Java class
methodName - the method to invoke
params - an array of objects containg the method parameters
Returns:
Object
Throws:
COBOLException - - COBOL Exception
java.lang.Exception - - NON COBOL Exception

cobfinalize

public static void cobfinalize(java.lang.Object o)
                        throws java.lang.Throwable
Destroys a COBOL proxy object
Parameters:
o - an object which has a COBOL proxy associated with it
Throws:
java.lang.Throwable - - throwable


Copyright © 2001 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.