Title: How do I set up isCOBOL ESQL Generator for use with Microsoft SQL Server?

Follow these steps:

  1. Compile your program with these variables set to use the Database Bridge (EasyDB) to generate bridge programs containing ESQL statements to access your Sql Server database:
       iscobol.compiler.easydb=1
       iscobol.compiler.easydb.sqlserver=1
    
  2. Put the JDBC driver in the CLASSPATH
    1. Download the Microsoft JDBC Drivers for your version of SQL Server from http://msdn.microsoft.com/en-us/data/aa937724.aspx.
    2. Open the compressed folder you downloaded and choose the .jar file you need, based on the version of Java you're using.
      For instance the jdbc driver for SQL Server version 11.2 to use with Java 1.8 would be called "mssql-jdbc-11.2.0.jre8.jar".
    3. Put this jar file in the CLASSPATH. The easiest way to do this is to put it in the %ISCOBOL%\jars folder, since this folder is automatically added to the CLASSPATH when you use the isCOBOL wrappers.
  3. Create an extended file descriptor (optional)
    1. Compile your COBOL program that has the SELECT and FD for this file with the -efd compiler option.
  4. Run your program using the correct settings in your runtime properties file
    1. Set your file index to easydb, and your prefix to the default SQL Server prefix:
         iscobol.file.index=easydb
         iscobol.easydb.prefix=srv
      
    2. Set your JDBC driver name and URL. Here's an example:
         iscobol.jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
         iscobol.jdbc.url=jdbc:sqlserver://localhost:1433;user=sa;password=sa;encrypt=false;DatabaseName=master
      
    3. We suggest you also set the ESQL internal cursor type to the SQL Server specific value of 1009, instead of the default 1007:
         iscobol.jdbc.cursor.concurrency=1009
      
NOTE: To use ISMIGRATE to move data to SQL Server from another format (for instance, Vision flat indexed file data), Repeat steps 1-3 above, and use these settings in ISMIGRATE, either by entering them manually in the Wizard, or setting them in a configuration file
   iscobol.ismigrate_input_file_index=vision
   iscobol.ismigrate_output_file_index=easydb
   iscobol.jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
   iscobol.jdbc.url="your URL - see above step 4b"
There is a video demonstration of ISMIGRATE using EasyDB here: https://youtu.be/YliamjSiuDI

Authored by: Veryant Support on Wed, Sep 2nd, 2009 at 7:00 PM
This question has been viewed 7971 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=61

Powered by PHPKB Knowledge Base Software