Previous Topic Next topic Print topic


COBOL Properties

The COBOL properties preset in the HCOSS templates include a post-build event to automatically bind your application immediately at the conclusion of the build process.

The HCOSS post-build event executes the DSN Bind utility, which binds the application and database. The default syntax of the DSN command executed is:

DSN SYSTEM(HCODB) @"$(ProjectDir)Application1.hcodsn"
Before building your application, you must make some changes to accommodate the specifics of your application.
  1. Replace HCODB with the data source name of your SQL Server database.
  2. Do one of the following:
    • Edit the Application1.hcodsn bind script file to include the BIND commands required to bind your application. By default, Application1.hcodsn contains the following BIND command:
      bind plan(PROGRAM1) action(REPLACE) MEMBER(PROGRAM1)
    • Specify an alternate bind script file:
      1. Create a new bind script file either using the Manage Packages and Plans tool, or by coding it manually.
        Note: For a listing of commands that are valid in HCOSS bind script files, see the topic Bind Script Commands.
      2. Add the bind script file to your Visual Studio project.
      3. Then edit the DSN command in your post-build event, replacing Application1.hcodsn with the name of your new bind script file.
Previous Topic Next topic Print topic