Walks you through the process of using the OpenESQL Assistant to generate a generic COBOL SQL program, embedding the program
into an existing COBOL program in the OESQLAsst project, and adding the generated SQL query to the program.
Generate a generic SQL Pprogram
- In the
OpenESQL Assistant, click the
Auxiliary Code tab.
- From the
Statement Type drop-down list, select
Generic SQL Program.
OpenESQL Assistant generates a generic SQL program in the
Generated Auxiliary Code box on the
Auxiliary Code tab.
Replace the code in
Program1.cbl with the code generated by the OpenESQL Assistant
- From the
Auxiliary Code tab, click
Add Query to temporary file ().
This copies the generated code to the clipboard.
- Click
Save temporary file (), and browse to your project work directory, which contains the
Program1.cbl file created earlier.
- Select
program1.cbl, then click
Save. A prompt appears, asking if you want to replace the current file.
- Click
Yes.
Embed the SQL Query into
program1.cbl
- From the
OpenESQL Assistant, click the
Query tab; then click
Add Query to temporary file.
- In
Eclipse, in the
COBOL Editor, place the cursor on the line just after the comment:
*> Put your program logic/SQL statements here
- Right-click; then select
Paste.
OpenESQL Assistant inserts the query into the program
- Click
File > Save to save
Program1.cbl.