Enables deployment of application code by generating an SQL batch script that can be used with sqlcmd or SQL Server Management Studio to update the SQL Server database. Compiled OpenESQL code issues a call to SQL Server stored procedures, contained in the SQL batch script.


Note: Applies to SQL Server only.


The name of the bind file.


Default: BIND=prog-name

Where prog-name is the COBOL program name.


When you use BIND, to ensure that your application works, the SQL batch script created must be executed against your SQL Server database.


Used at compile time: Yes
Behavior at run time: Source file

See Scope - OpenESQL SQL Compiler Directive Options for more information.


  • Security can be applied separately to procedures and data so that application users can only access and update data via the application.
  • DBAs can review SQL that is to be deployed without having to access source code.


The filename extension for generated bind script files is .sql. For example, if you specify BIND=myprog, the generated bind script file name is myprog.sql.

To update the SQL Server database, run the generated bind script file using sqlcmd or from SQL Server Management Studio.

The generated bind script file contains commands to create a separate stored procedure in the schema specified by your SQL Server connection for each static SQL statement in the program.

If stored procedures from a previous compilation are present in the schema, OpenESQL drops them before creating new stored procedures.