OpenESQL Compiler Options for Open PL/I

Syntax

This syntax sets OpenESQL compiler options for the Open PL/I compiler.

mfplx pliProgName –sql odbc –optsql "SQLPrecompilerOption [...]"

Recommended Options

These OpenESQL compiler options are recommended for PL/I when emulating mainframe settings using SQL.

  • BEHAVIOR=OPTIMIZED
  • CHECKDUPCURSOR
  • CHECKSINGLETON
  • DATE=[LOCAL COUNTRY]
  • TIME=[LOCAL COUNTRY]
  • DETECTDATE

Examples

This example compiles a batch program to qualify tables using MAINFRAME and DATE options.

mfplx TESTPGM.PLI –sql odbc –optsql "BEHAVIOR=OPTIMIZED  DATE=USA"
This example compiles three subroutines and a main program that calls routines to object files so it can be linked.
mfplx testpgm0.pli -sql odbc –optsql  "BEHAVIOR=OPTIMIZED DATE=USA"  –c
mfplx testsub1.pli -sql odbc -optsql  "BEHAVIOR=OPTIMIZED DATE=USA " –c
mfplx testsub2.pli -sql odbc –optsql  "BEHAVIOR=OPTIMIZED DATE=USA " –c
mfplx testsub3.pli -sql odbc -optsql  "BEHAVIOR=OPTIMIZED DATE=USA " –c
This example to links the object files and creates an executable file.
ldpli testpgm0.obj testsub1.obj testsub2.obj testsub3.obj -out:test.exe

Setting Project Options to Compile from Eclipse

  1. Open your project properties and expand Micro Focus > Project Settings > COBOL > SQL Preprocessor.
    Note: You can also set compiler directive options under Micro Focus > Build Configurations > COBOL > SQL Preprocessor. If you do this, the setting applies only when the build configuration is active, and the compiler directive option is not set to something else in the Project Settings or on the program level.
  2. If unchecked, check Enable configuration specific settings and Use SQL Preprocessor.
  3. From the Preprocessor Type drop-down list, select OpenESQL.
  4. Use the grid to select a directive and set appropriate values. Click Apply after each setting.
  5. Repeat this procedure to add additional directives.
  6. When all directives have been added, click Apply and Close.