Previous Topic Next topic Print topic


Loading a COBOL Program or Library

Restriction: This applies to native code only.

If your COBOL programs are linked into a library file, or if you want to expose entry-points inside a COBOL program, you need to load the library file or programs before making any calls. You can do this using the runtime.cobload() method in runtime.class. For example, to load the programs inside mycbl:

{  
  if (RuntimeSystem.cobload("mycbl") != 0)
     System.out.println("Could not load library\n") ;
  else
     System.out.println("Library loaded successfully\n") ;
}
Previous Topic Next topic Print topic