Analyze the TwoPackageSet Project

Guides you through the process of analyzing the TwoPackageSet COBOL program and project to become familiar with its use of SQL and to learn how it is compiled for HCOSS.

Analyze EXEC SQL in TwoPackageSet.cbl

  1. From the Eclipse IDE, click File > Import.
  2. Expand General, and select Existing Projects into Workspace; then click Next.
  3. Select Select root directory; then browse to the %PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\SQL\hcoss\TwoPackageSet directory, and click OK.
  4. On the Projects list, check TwoPackageSet.
  5. Check Copy projects into workspace.
  6. Click Finish. Eclipse loads the project and builds it automatically.
  7. From the COBOL Explorer, expand TwoPackageSet > COBOL Programs; then double-click the TwoPackageSet.cbl file to view its contents. Pay particular attention to the EXEC SQL statements.
  8. Close the code editor.

Analyze TwoPackageSet project properties

  1. Open the project properties for the TwoPackageSet project.
  2. Expand Micro Focus > Project Settings > COBOL; then select SQL Preprocessor. Several OpenESQL compiler directives have been set for you. The following table offers a brief description of each:
    SQL(BEHAVIOR=OPTIMIZED) Optimizes ambiguous cursor declarations
    SQL(DBMAN=ODBC) Uses an ODBC connection
    SQL(TARGETDB=MSSQLSERVER) Target database is SQL Server
    SQL(DB=HCODemo) SQL Server connection name is HCODemo
    SQL(DIALECT=MAINFRAME) HCOSS database syntax conversion is enabled
    SQL(DBRMLIB) EXEC-SQL commands are extracted and placed in database request module (DBRM)
    SQL(INIT) Initiates the database connection
    SQL(NOCHECK) No SQL compile-time checking performed
  3. Close the Properties window.