× 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: Re: sql precompiler and conditional compile
  • From: "Rolf Mittag" <rm@xxxxxxxxxxxx>
  • Date: Tue, 12 Dec 2000 10:29:02 +0100
  • Organization: r m e d v

Hi Barbara,
thank's a lot for your comment. My statement was based on
experiences from the last year(s). In november I had (still have)
some serious problems with dynamic sql and odbc which caused
an installation of several ptf's (somewhere in the middle lost the track)
the latest cum tape and the db2/400 fix pack.

Before answering your mail I gave it a try and found that deeply
hidden within those must have been a fix for the sql precompiler
for rpgiv (unfortunately the precompiler for c still refuses curley
and sqare brackets from source files with ccsid 273). I have to
correct my statement. The following code works

rgds Rolf

--- tstcpy --------

      /if defined(test1)
     dtest1            s             10i 0
      /endIf
      /if defined(test2)
     dtest1            s             10s 0
      /endIf

**** end of source ****

--- main program ----------
      /define test1
      /copy prtIfsDir/zz,tstCpy

     c/Exec Sql
     c+   declare c cursor for test
     c/End-Exec

     c                   eval      *inLr = *on
     c                   return

**** end of source ****

--------- compile listing -------------

Nummer
....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8.
..
                            Q u e l l e n l i s t e
     1  /define test1
     2  *copy prtIfsDir/zz,tstCpy
     3  /if defined(test1)
     4 dtest1            s             10i 0
     5  /endIf
     6  /if defined(test2)
            LINES EXCLUDED: 1
     7  /endIf

     8
     9 D*      SQL Communications area
SQL
 < snip >
    38 D*  End of SQLCA
SQL
    39 D  SQFRD          C                   CONST(2)
SQL
    40 D  SQFCRT         C                   CONST(8)
SQL
    41 D  SQFOVR         C                   CONST(16)
SQL
    42 D  SQFAPP         C                   CONST(32)
SQL
    43 c*Exec Sql
    44 c*   declare c cursor for test
    45 c*End-Exec
    46
    47 c                   eval      *inLr = *on
    48 c                   return
              * * * * *   E N D E   D E R   Q U E L L E   * * * * *

**** end of compile listing ****

Dipl.Inf.(FH) Rolf P Mittag
IBM Partner In Development
Leipziger Str. 50
D-69214 Eppelheim
eMl: rm@r-m-e-d-v.de
Fon: +49 (6221) 76 78 60
Fax: +49 (6221) 76 80 26

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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 ...

Replies:

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.