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. Load the project in Visual Studio.
  2. Select Project > Properties and click the Compile tab.
  3. In the Other options field, type -sql odbc –optsql “SQLPrecompilerOption [...]”.
  4. Press CTRL + S to save your updates.