× 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.



All:

For those of you using free-format SQL embedded in RPGLE, have you tried
putting mod-marks in columns 1-5 on the SQL lines?  I'm getting a
pre-compiler error on the following code:

V102S    exec sql
V102S      insert
V102S        into cltdebitpf
V102S      values (
V102S             :alphaclt,
V102S             :name,
V102S             :alphaaba,
V102S             :acctnbr,
V102S             :trancode,
V102S             :alphaamt
V102S             );

Here is the error message:
MSG ID  SEV  RECORD  TEXT                                                  
SQL0104  30    1004  Position 17 Token V102S was not valid. Valid tokens: (
                     END GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER  
                     BEGIN.                                                

Removing the mod-marks from all but the first line eliminates the problem,
as the following compiles cleanly:

V102S    exec sql
           insert
             into cltdebitpf
           values (
                  :alphaclt,
                  :name,
                  :alphaaba,
                  :acctnbr,
                  :trancode,
                  :alphaamt
                  );

SEU and WDSc are consistent with the pre-compiler...all indicate that the
first example is an error.  Does free-form SQL in RPGLE use columns 1-5?  No
other free-form statements do.  Is this documented somewhere?

I am on V5R4 and should be pretty current with PTFs.  Anyone have any
information on this?

Thanks,
--Bruce Guetzkow




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.