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



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

Pete Helgren wrote:
However, your pointer on *PRV probably saved me much time since I would have never thought to compile *CURRENT (*PRV is the default) and would have chased my tail even further.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.