In this tutorial, you create
an Eclipse COBOL project to use as you complete the remainder of these tutorials.
- Requirements
- Before attempting this tutorial, you must complete
Tutorial: Create a SQL Server Database.
- Launch
Enterprise Developer
for Eclipse
- This procedure varies depending on your Windows version. If you need instructions, see
To start
Enterprise Developer.
- Open the Team Developer Perspective
- By default, Eclipse opens the Team Developer Perspective and shows the
Application Explorer view; however, if this is not the case:
- In the Eclipse IDE, click
Window > Perspective > Open Perspective > Other.
- On the Open Perspective dialog box, select
Team Developer (default); then click
Open.
- Create a New COBOL Project
- In this set of tutorials, you create a COBOL application
that uses ODBC, and the OpenESQL
ODBC runtime.
- From the Eclipse IDE, click
File > New > COBOL Project.
Note: If
COBOL Project is not an option on the context menu:
- Click
Project.
- On the
New Project wizard, expand
Micro Focus COBOL.
- Select
COBOL Project; then click
Next.
- In the
Project name field, type
OESQLAssistantTutorial.
- Click
Finish.
Eclipse creates a new
project named
OESQLAssistantTutorial.
- Create a COBOL Program
- The new project contains no programs, so you need to add a new generic program to use in a later tutorial.
- From the Application Explorer view, right-click the
OESQLAssistantTutorial project and select
New > File > COBOL Program.
- Click
Finish. This creates a default COBOL program named
Program1.cbl, opens it in the COBOL editor, and compiles it automatically.
For now, leave the
Program1.cbl file open in the COBOL editor. You will need it there in a future tutorial.
- Set Project Properties
- By default, this application connects to the database via ODBC. To provide optimal cursor behavior, including isolation level
and lock concurrency settings, you must set the BEHAVIOR parameter for the SQL BEHAVIOR compiler directive option.
- From the
Application Explorer view, right-click the
OESQLAssistantTutorial project and select
Properties.
- Expand
Micro Focus > Project Settings > COBOL > SQL Preprocessor.
- Check
Use SQL Preprocessor.
- From the
Preprocessor Type drop-down list, select
OpenESQL.
- On the
Directives list, select
BEHAVIOR.
- From the corresponding
Value drop-down list, select
ANSI.
- Click
Apply and Close.