×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




No. It doesn't work like that, AND, compiler directives cannot be used
in program code to condition things. That is if you /DEFINE DEBUG, you
cannot use an IF  DEBUG   statement in the calc specs, only /IF
DEFINED(DEBUG) would work. Those variables are processed by the
preprocessor and are not part of the program itself.

Bob Cozzi
cozzi@rpgiv.com
Visit the new on-line iSeries Forums at: http://www.rpgiv.com/forum

> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]
On
> Behalf Of James Rich
> Sent: Monday, August 13, 2001 6:51 PM
> To: rpg400-l@midrange.com
> Subject: if defined syntax in sql rpg?
> 
> I need to use the following in an sql-rpg program (created with
> CRTSQLRPGI):
> 
> F/if defined(BMP)
> F/define USE_NUM_COLOC
> F/endif
> 
> later in the calcs USE_NUM_COLOC is used to conditionally compile an
SQL
> portion of the program.  The BMP define needs to be defined by the
> compiler.  When compiling non-sql rpg programs this is no problem -
the
> DEFINE keyword on the CRTRPGMOD and CRTBNDRPG commands does this.  But
> CRTSQLRPGI does not have a DEFINE keyword.  How can I tell the
> preprocessor to define BMP when using CRTSQLRPGI?
> 
> James Rich
> james@eaerich.com
> 
> _______________________________________________
> RPG400-L mailing list
> RPG400-L@midrange.com
> http://lists.midrange.com/cgi-bin/listinfo/rpg400-l



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.