Enable Language Environment (LE) Support

You enable Language Environment (LE) support by using either the INITCALL"MFLEINIT" Compiler directive, or by adding a call to MFLEINIT in your code, or by setting the ES_LE370_SUPPORT environment variable. The method used depends on how you intend to use the support.
Enable LE support depending on your application type:

JCL

LE support is enabled by default unless the name of the program you are running begins with 'MF'; in which case, set the INITCALL"MFLEINIT" Compiler directive.

Use the environment variable MF_LE_CBLOPTS to determine the PARM syntax form. If MF_LE_CBLOPTS=N, or the dialect is ENTCOBOL, or it is a language other than COBOL, PARM syntax is of the form [run-time options] [/program-options]; otherwise, the syntax is of the form [program-options] [/run-time-options].

Enterprise Server (Excluding JCL)

For all other applications running in Enterprise Server, set the environment variable ES_LE370_SUPPORT=Y.

Other Native COBOL Use

For any other method, for example, an IMS or standard COBOL program, set the INITCALL"MFLEINIT" Compiler directive.

JVM COBOL

The Language Environment utilities are also available in JVM COBOL code applications. To use them, include the mfle370.jar file on the classpath.
  • On Windows:
    • For 32-bit environments use the mfle370.jar file located at %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\bin.
    • For 64-bit environments you must use a 64-bit JVM. The mfle370.jar file is located at %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\bin64.
  • On UNIX:
    • For 32-bit environments use the mfle370.jar file located at $COBDIR/lib.
    • For 64-bit environments you must use a 64-bit JVM. The mfle370_64.jar file is located at $COBDIR/lib.
In your JVM COBOL program, include the Compiler option ILUSING"com.microfocus.le370". For a Java program include the statement import com.microfocus.le370.*;.

Enabling LE Support in an Eclipse Project

JVM COBOL
For JVM COBOL applications, add the mfle370.jar file to the project JVM build path.
  1. Right-click the JVM COBOL project, and then click Properties.
  2. Click Micro Focus > JVM Build Path.
  3. Click the Libraries tab.
  4. Click Add External JARs.
  5. Navigate to the location of the mfle370.jar file, and then click Open.
  6. Click OK.
  7. There are two ways to apply this to your application:
    • In your code:
      1. Set the ILUSING directive with the com.microfocus.le370 namespace.
    • In your Additional directives in the project properties:
      1. Click Project > Properties > Micro Focus > Build Configuration.
      2. In the Additional directives field, click The ellipsis button, type ILUSING"com.microfocus.le370" into the Additional directives dialog box, then click OK.
Java
For Java applications, add the mfle370.jar, mfcobol.jar and mfcobolrts.jar files to the project build path.
  1. Right-click the Java project, and then click Properties.
  2. Click Java Build Path.
  3. Click the Libraries tab.
  4. Click Add External JARs.
  5. Navigate to the location of the mfle370.jar file, and then click Open.
  6. Repeat the previous two steps for the mfcobol.jar and mfcobolrts.jar files.
  7. Click OK.
  8. In your code, add the import statement import com.microfocus.le370.*;.