× 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 have seen this before, and I've just reproduced the unexpected behavior
in RDi 9.5.1.

I turn off the auto SQL formatting usually because it keeps interfering
while I'm typing a SQL statement in, to the extent that it will sometimes
combine the following RPG line into the SQL statement if I press enter
before adding a semi-colon, and then it becomes impossible to create a
new-line.

For example (RDi 9.5.1) tick all the RPGLE SQL formatting options in the
preferences. In a /FREE section type EXEC SQL on a blank line before an RPG
line, then press ENTER but you won't get any new-lines. Press ENTER again,
maybe ALT-S (split line) a few times, add a semi-colon to the EXEC SQL and
see if that helps (it doesn't!) The only way to get it working properly is
to type a complete valid SQL statement on the same line as the EXEC SQL and
end it with a semi-colon. I just turn the auto-formatting off instead
because few SQL statements can fit on a single line in the LPEX editor! If
I want to format the SQL statements in a SQLRPGLE program source, I just do
all the work without auto-formatting, save it, then switch the
auto-formatting on (temporarily) and add a space to the end of each EXEC
SQL statement.

-Paul.


On 8 December 2016 at 21:20, Brian Parkins <goodprophet.bp@xxxxxxxxx> wrote:

I think I’ve found a tiny – but irritating – bug in the LPEX editor when
coding SQLRPGLE source. Anyone care to verify?

Consider the following piece of simple code:

===========================
Dcl-S ServerName Char(10);

Dcl-S Message Char(30) Inz('Server is:');

EXEC SQL
VALUES Current_Server INTO :Servername; // Line 1

Message = %TrimR(Message) + ' ' + ServerName; // Line 2

Dsply Message '*REQUESTER';

*InLR = *On;
===========================

- From the RDi menu bar select, Window > Preferences
- Select the preference for, Remote Systems > Remote Systems LPEX Editor >
IBM i Parsers > ILE RPG > Free-form SQL Formatting
- Tick the choice for Automatic Uppercasing, (I also have Style:
Custom/Uppercase/Initial Character selected)
- Click Apply and OK

CASE A). UNEXPECTED BEHAVIOUR
In the above source, position the cursor immediately before the ‘//’ in
Line 1.
Press ENTER a few times:
The cursor moves on to the next line and stays fixed in that position; at
each subsequent press of ENTER, new lines are added AFTER the cursor line.

CASE B). EXPECTED BEHAVIOUR
Now position the cursor immediately before the ‘//’ in Line 2.
Press ENTER a few times:
The cursor moves on to the next line; at each subsequent press of ENTER,
new lines are added BEFORE the cursor line AND the cursor moves down.

The Expected Behaviour can be achieved in CASE A). if the Automatic
Uppercasing is deselected in the Preferences.

(RDi 9.5.1 under Windows 7 and Windows 10.)

Brian Parkins
--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & 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 ...

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.