Walks you through the process of defining a post-build event that automatically binds the application after building the project.
Define a post-build event
- In the
Properties window,
expand
Micro Focus > Build Configurations > Events.
- In the Post build event command line field, type the following command:
DSN SYSTEM(HCODemo) @"FunctionEmulation.hcodsn"
This command calls the DSN Bind utility, specifies the SQL database connection to use, and states the location and name of
a bind script file.
Eclipse executes this event immediately after building the application, automatically binding the application at that time.
- Click
Apply and Close. Eclipse builds the native application automatically.
- Close the
Properties window.
View the contents of the bind script file
- From the
COBOL Explorer, open and review the contents of
FunctionEmulation.hcodsn. This bind script file contains one BIND PLAN command that binds the FunctionEmulation member into a plan named FunctionEmulation.
Verify the results
- Using Microsoft SQL Server Management Studio, connect to your SQL Server instance.
- On the
Object Explorer, expand
Databases > HCO_Test > Programmability > Stored Procedures to see the stored procedures HCOSS created when you executed your packages and plan.
- Open one of the stored procedures that contains
PLN as part of its name.
In this, you see your application code making the calls to the user-defined functions.