Scott,

I also noticed that the automatic formatting for free-format SQL in WDSCi
7 will create really awful looking code! It doesn't seem to align
anything correctly.

Or am I doing something wrong?

(cross-posted to WDSCi-L for possible follow-up)

Peter Colpaert
Application Developer
PLI - IT - Kontich, Belgium
-----
Yoda of Borg are we. Futile is resistance, assimilated will you be.
-----



Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/10/2007 07:18
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Free form SQL






Hi Pete,

Actually, I think Vern is wrong. You *can* use TGTRLS(*PRV), as long as
you're using an SQL precompiler that supports free-format.

Remember what the precompiler does! It converts your code into calls to
SQL APIs, then compiles that code. It doesn't matter whether your
original code is fixed or free, in either case, it converts your code to
fixed format calls to the APIs (it'll insert /end-free and /free as
appropriate, providing you have the latest PTFs... there were bugs in
the original implementation that caused the /end-free to be misplaced in
certain circumstances, but these are fixed in the latest PTFs -- make
sure you have the ones that supercede the original ones, don't just pick
the ones from the APAR)

Anyway.. the point is, the code that the precompiler creates will work
with TGTRLS(*PRV), no problem -- so it doesn't matter whether you use
TGTRLS(*PRV) or not. You *do* have to use SQL statements that are
supported on the target release (i.e. if you use a new SQL keyword that
requires V5R3, you'd have a problem). (But that would be a problem in
either fixed or free format.)

The only flaw in free-format SQL on V5R3 (that I'm aware of) is that the
syntax checker in WDSC 7.0 reports a strange error on free-format SQL
statements. (Something about a connection error, which it turns out had
nothing to do with what was wrong, what was really wrong was that the
RPG syntax checker in V5R3 didn't support free-format SQL.) Not sure if
they ever fixed that problem.

But that's only a problem in the editor. The precompiler and compiler
should work fine (assuming you have the right PTFs applied) even with
TGTRLS(*PRV).


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.