> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[email protected]] On Behalf Of Henrique Seganfredo
> Sent: Wednesday, July 15, 2009 1:06 PM
> To: [email protected]
> Subject: DB2 precompiler (DSNHPC) ignores ifdefs
> 
> Hello folks,
> 
> I noticed that the DB2 precompiler does not deal with ifdefs, 
> not respecting 
> parts of code which are not intended to run when I push by example a 
> PARM='DEF(DEBUG)' in my C compiler options.
> 
> I tried to use the DEF() parm for DSNHPC, but it does not 
> recognize it as an 
> precompiler option.
> 
> Is there any option to force the precompiler to take ifdefs 
> in consideration?

I doubt it. But I'm curious. Why do you need the precompiler to ignore the 
things aren't going to be compiled anyway? Of course you could emulate this 
with a 3 stage method. First, run the C compiler with the PPONLY option to run 
the C precompiler, which would output the C code with all the #include and 
other #... functionality done with the output going to a temporary file. Then 
run the DB2 precompiler against that output as its input, writing to another 
temp file. Then run the C compiler again against the DB2 precomiler output 
file. Seems a bit unusual, to me.

Have you tried the DB2 coprocessor? As I understand it, it is dynamically 
invoked from the C compiler when it sees an EXEC SQL statement. So the C 
compiler will process the #ifdef's.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnapj15/5.1.1.1.2

--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to