Re: Pro-c, Pro-Cobol

From: Keith Thompson <mcdoo_at_worldgate.edmonton.ab.ca>
Date: 15 Mar 1995 04:12:06 GMT
Message-ID: <3k5pem$1b8_at_scanner.worldgate.edmonton.ab.ca>


In article <795070652snz_at_davechur.demon.co.uk>, David_at_davechur.demon.co.uk (David) says:
>
>Could anyone inform me as to what these two languages are and how they
>relate to ORACLE database systems development. Also how do they differ from
>'c' and COBOL.
>

C and Cobol compilers in their natural habitat do not know anything about accessing an Oracle database. Try including the statement 'select * from customer' in a source code file and compiling it and you'll see what I mean. This is true for other databases as well.

In order for us to be able to write programs in these languages, database vendors produce products called pre-compilers. Pre-compilers allow us to put database calls in our source code using the database's native syntax.

Using a pre-compiler, the compilation process is a two step affair:

  1. The pre-compile. Your original source code file (containing the 'select * from customer' command) is used as input to the precompiler. The output from the pre-compiler is a temporary source code file with the database commands replaced by commands in the 'host' language's syntax. These replacement commands can be *very* complex.
  2. The compile. The temporary source code file is then submitted to your compiler and the executable is created.

Pro*C and Pro*Cobol are Oracle Corp's pre-compilers for C and Cobol, respectively. As such, they are not 'languages' in their own right. They simply allow us to put Oracle calls in C or Cobol programs.

Hope this helps
Keith     Received on Wed Mar 15 1995 - 05:12:06 CET

Original text of this message