Pro*COBOL Programmer's Guide 9.2

Peter Kitson

ISBN : -

Order a printed copy of this book from Amazon --UNAVAILABLE--


Cover Design - Pro*COBOL Programmer's Guide 9.2
 

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)

Numbers

 




Sample Chapter From Pro*COBOL Programmer's Guide 9.2
     Copyright © Oracle Corp



The Pro*COBOL Precompiler

The Pro*COBOL Precompiler is a programming tool that enables you to embed SQL
statements in a host COBOL program. As Figure 1–1 shows, the precompiler accepts
the host program as input, translates the embedded SQL statements into standard
Oracle run-time library calls, and generates a source program that you can compile,
link, and execute in the usual way.

Advantages of the Pro*COBOL Precompiler

The Pro*COBOL Precompiler lets you pack the power and flexibility of SQL into your
application programs. You can embed SQL statements in COBOL. A convenient, easy
to use interface lets your application access Oracle directly.

Unlike many application development tools, Pro*COBOL lets you create highly
customized applications. For example, you can create user interfaces that incorporate
the latest windowing and mouse technology. You can also create applications that run
in the background without the need for user interaction.

Furthermore, with Pro*COBOL you can fine-tune your applications. It enables close
monitoring of resource usage, SQL statement execution, and various run-time
indicators. With this information, you can adjust program parameters for maximum
performance.

The SQL Language


If you want to access and manipulate Oracle data, you need SQL. Whether you use
SQL interactively or embedded in an application program depends on the job at hand.
If the job requires the procedural processing power of COBOL, or must be done on a
regular basis, use embedded SQL.

SQL has become the database language of choice because it is flexible, powerful, and
easy to learn. Being non-procedural, it lets you specify what you want done without
specifying how to do it. A few English-like statements make it easy to manipulate
Oracle data one row or many rows at a time.

You can execute any SQL (not SQL*Plus) statement from an application program. For
example, you can:
  • CREATE, ALTER, and DROP database tables dynamically.
  • SELECT, INSERT, UPDATE, and DELETE rows of data.
  • COMMIT or ROLLBACK transactions.
Before embedding SQL statements in an application program, you can test them
interactively using SQL*Plus. Usually, only minor changes are required to switch from
interactive to embedded SQL.