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



I don't think the autoformat was ever intended for SQL - only real RPG. Now if you want a formatter for SQL, google on a program called cutesql - very nice. Takes any statement you have put on the clipboard and reformats it according to your settings. Then you paste that result wherever. It does not probably do EVERYTHING exactly as you'd like, but the developer is very responsive to user suggestions and problems - or was 5 years ago. He took care of a couple things specific to iseries for me.

HTH
Vern

At 07:43 AM 2/20/2008, you wrote:

WDSCi 7.0.0.4 (all updates applied)

>From Preferences:

Automatic uppercasing is Custom, Keywords are Uppercase, Identifiers are Lowercase.
Automatic indent is on and set to 3 blanks.
Automatic formatting is on, New line on comma is End of line, New line on AND/OR keywords is After, On Case keyword is on.
Comments are Move to top.

Problem: It doesn't handle the JOIN and ON keywords the way I'd like. Example:

EXEC SQL
INSERT INTO fip020a
SELECT t2.f2cmpy, t1.f2styl, t1.f2clr, t1.f2size, t1.f2back,
t2.f2cust, ' ', 0, 0, 0, 0, 0, 0
FROM fip020r t1 INNER JOIN fip020 t2 ON t1.f2styl = t2.f2styl
AND
t1.f2clr = t2.f2clr AND
t1.f2size = t2.f2size AND
t1.f2back = t2.f2back LEFT EXCEPTION JOIN fip020a t3 ON
t1.f2styl = t3.f2styl AND
t1.f2clr = t3.f2clr AND
t1.f2size = t3.f2size AND
t1.f2back = t3.f2back
WHERE t1.f2cmpy = :wccmpy AND
t1.f2back = :wcback;

What I'd like to see:

EXEC SQL
INSERT INTO fip020a
SELECT t2.f2cmpy, t1.f2styl, t1.f2clr, t1.f2size, t1.f2back,
t2.f2cust, ' ', 0, 0, 0, 0, 0, 0
FROM fip020r t1
INNER JOIN fip020 t2 ON
t1.f2styl = t2.f2styl AND
t1.f2clr = t2.f2clr AND
t1.f2size = t2.f2size AND
t1.f2back = t2.f2back
LEFT EXCEPTION JOIN fip020a t3 ON
t1.f2styl = t3.f2styl AND
t1.f2clr = t3.f2clr AND
t1.f2size = t3.f2size AND
t1.f2back = t3.f2back
WHERE t1.f2cmpy = :wccmpy AND
t1.f2back = :wcback;

Is there any way to get it to do this now, or does it need to go on the 'wish list'?

Thanks!

Dave Shaw
Mohawk Industries
--
This is the Websphere Development Studio Client for iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.


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.