× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: SQL precompiler ignores directives?
  • From: "Goodbar, Loyd (AFS-Water Valley)" <LGoodbar@xxxxxxxxxxxxxx>
  • Date: Mon, 4 Jun 2001 10:25:48 -0400

I have a source member for /COPY of a subprocedure that look like this:

 /if defined (prototypes)
 d DateCheck pr
...
 /endif
 /if defined (procedures)
 d DateCheck b
 d DateCheck pi
...
 /endif

In my RPG (ILE) program, I have this:

 * Definitions
 /define prototypes
 /copy toolssrc/subproc,datecheck
 /undefine prototypes
... main program
 /define procedures
 /copy toolssrc/subproc,datecheck
 /undefine prototypes

This works very well until I tried out embedded SQL. When compiling a SQL
RPG program with defined /copy directives, I receive error SQL1106 (RPG
specification out of order). The SQL precomiler does not honor the /if
defined directives in copied source the same manner as the RPG compiler; it
copies the entire source at the /copy position. If I inline my subprocedure
source into the SQLRPGLE program, the precompiler works.

I can separate the /copy source into the prototype and procedure, but I have
many subprocedures using the above "unified" format. (I won't debate the
argument of using a service program; I have service programs coded in much
the same manner and will face the same problem.)

Has anyone else noticed this behavior? I looked through the APARs but didn't
see anything relevant. Running V4R5.

Also, is the only way to change compiler options now in the H spec, when
using the SQL precompiler? The SQL programming guide wasn't really clear.

Thanks,
Loyd
--
Loyd Goodbar
Programmer/Analyst
BorgWarner Incorporated
Air/Fluid Systems, Water Valley, MS

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2024 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.