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 Visual Studio

  1. Open your project properties and click the SQL tab.
  2. From the ESQL Preprocessor drop-down list, select OpenESQL.
  3. Click Add.
  4. Select a directive from the Available Directives list.
  5. If required, provide details using the controls under Directive Details.
  6. Click OK. The directive is added to the SQL Directives field.
  7. Repeat this procedure to add additional directives.