Operating System - HP-UX
1846601 Members
2337 Online
110256 Solutions
New Discussion

Re: compiling Pro*C code without tables

 
Manish Srivastava
Trusted Contributor

compiling Pro*C code without tables

Hi All,

I am involved in a porting POC in which I have the Pro*C code but do not have the databse definitions as yet. I want to compile the Pro*C programs without the database definitions.Is it possible to do this? if yes then how?

I am a first time Oracle user so a detailed reply will really help.

Regards,
Manish.
6 REPLIES 6
Hemanth Gurunath Basrur
Honored Contributor

Re: compiling Pro*C code without tables

Hi Manish,

Check if the foll. link helps:

http://tahiti.oracle.com/pls/tahiti/tahiti.show_mindex?letter=c

There is lot of information on compilation here.

HTH.

Regards,
Hemanth
R. Allan Hicks
Trusted Contributor

Re: compiling Pro*C code without tables

SQLCHECK=NONE will cause it to ignore most of the sql. It will not allow you to create a usable program, just let you know if the non-sql is good.
"Only he who attempts the absurd is capable of achieving the impossible
Manish Srivastava
Trusted Contributor

Re: compiling Pro*C code without tables

Hi Allan,

This helps me only in very few files. Most of the files no not show any difference with and without the SQHCHECK=NONE in the makefile.

manish
Manish Srivastava
Trusted Contributor

Re: compiling Pro*C code without tables

Hi,

Will it be a good idea to mask off all the SQL's and then compile the files. I just want to check that there is no problemin the C code part of the .pc files.

manish
R. Allan Hicks
Trusted Contributor

Re: compiling Pro*C code without tables

Commenting out all of the EXEC SQL's should help. I'd think you might run into some problems with the host values.

One question I should have asked on the front end......

Why don't you want to compile against the tables? Is it because you don't want to have the space associated with the tables?

You can get a PC version of the server from OTN.
Create a database link to your production database.
Create a table as create foo as select * from foo@data_link where 1=2;
The above creates the table with no data. The pro*c code should be happy because it is only validating the table structure and you get to find any SQL problems.

Hope this helps
"Only he who attempts the absurd is capable of achieving the impossible
Jean-Luc Oudart
Honored Contributor

Re: compiling Pro*C code without tables

Hi Manish,

If your code contains PL/SQL blocks you will require SQLCHECK=SEMANTIC and therefore a connection to a database with table description is then required.

Regards,
Jean-Luc
fiat lux