To bind as a post-build event

  1. Build your application using the DBRMLIB SQL compiler option to create DBRMs from your source code.
  2. Create a bind script file using the Manage Packages and Plans tool, or manually in a text editor. If you create the file in a text editor, be sure to give it a file extension of .hcodsn.
    Note: For a listing of commands that are valid in HCOSS bind script files, see the topic Bind Script Commands.
  3. Using the Manage Connections tool, connect to your SQL Server database with a login ID and password that grants you permission to update the SYSIBM table.
  4. In Visual Studio, open the properties for the project that contains your application.
  5. In the Properties window, click the COBOL tab; then click Advanced .
  6. Click Build Events.
  7. In the Post-build event command line field, type the following:

    DSN SYSTEM(SQLServerConnection) @"bindScriptFile"

    where SQLServerConnection is the name of your SQL Server connection, and bindScriptFile is the full path to and filename of your bind script file.

  8. Click OK twice to close both the Build Events and Advanced COBOL Settings dialog boxes.