Hi Paul
I was trying to reproduce the issue of conflict between the SQL formatter
and the RPG formatter.
First of all, without my fix to prevent the hang, I don't see how you could
do anything. Thankfully my hang fix is working will be available as a test
fix soon.
Secondly, even with my hang fix, the only way I could reproduce the issue
is to
a) turn off SQL formatting
b) turn off "preserve relative indentation of continued lines" on the RPG
Formatting preferences (which is NOT the default)
c) run Ctrl-Shift-F - which now indents all of the continued SQL at the
same level
d) turn back on SQL formatting
e) touch the SQL.
BTW I don't recommend (b) to avoid this type of scenario where you may have
formatted the continued line the way you like.
If there is some other way, I would love to know about it.
Maybe you want to wait until the test fix is available for the hang,
because otherwise, this would be extremely frustrating.
Edmund
From: Edmund Reinhardt/Toronto/IBM@IBMCA
To: Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Date: 10/14/2015 09:10 AM
Subject: Re: [WDSCI-L] Formatting RPGLE /FREE code strangements
Sent by: "WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx>
Thanks Paul,
The infinite loop happens if there is embedded SQL. There is an APAR for
that. I am actively working on a fix.
But the conflicting formatting of SQL is something that needs to be
considered. Thanks for bringing it up. I would accept a PMR on that.
The shifting of FOR lines to column 6. I have a fixed APAR for when any
line has an end of line comment that extends beyond column 80. But the
particular code that you pasted in here, formats correctly for me.
An error after hitting format twice. I have not seen that. Unless the
first format caused the shift to column 6 bug above. If it is unrelated, I
would really like to see a PMR so that I can fix that. I want to focus on
clean up the bugs with Ctrl-Shift-F in the next fix pack, so please open
PMRs on it now.
Thanks,
Edmund
From: Paul Bailey <PaulBailey@xxxxxxxxxx>
To: wdsci-l <wdsci-l@xxxxxxxxxxxx>
Date: 10/14/2015 07:13 AM
Subject: [WDSCI-L] Formatting RPGLE /FREE code strangements
Sent by: "WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx>
Hi,
I have been using the CTRL-SHIFT-F formatting option introduced with RDi
9.5, and it works well apart from a few little things.
If you do not select any code lines then press CTRL-SHIFT-F, RDi goes into
some infinite loop and needs killing. I think this was mentioned before,
but I thought I would note it just in case.
If you format the code and there is embedded SQL in there, the formatted
SQL changes so that the second line (after the exec sql) is not indented.
If you type in the SQL line then the standard formatter rearranges it
according to SQLRPGLE preferences, but if you use CTRL-SHIFT-F
(intentionally on the SQL lines, or otherwise) it then rearranges it to its
own preferences.
If you format some code with a FOR (RPGLE) statement in it, the FOR is
sometimes dragged back to column 6 and RDi then insists the line is an
F-spec for fixed format RPG, even though the lines around it are
free-format and formatted correctly. See this snippet:
(Select these lines)
----> // Send emails as well, if applicable
----> If w#SendEmails = *ON;
----> For w#bkno = 0 To 1;
----> processedCount = 0;
...
----> EndFor;
----> EndIf;
(then press CTRL-SHIFT-F)
----> // Send emails as well, if applicable
----> If w#SendEmails = *ON;
!!!!>For w#bkno = 0 To 1;
----> processedCount = 0;
...
----> EndFor;
----> EndIf;
(first 5 columns are just my notes and are not in the actual source)
Finally, if you try to format the same lines of code twice, you get an
error above the LPEX command-line: "Formatting failed due to "null"".
Usually I can work around this by changing the selected lines, but
sometimes it then formats a couple of unselected lines below the selection.
Has anyone else seen any of this? (RDi 9.5 on Win7x64, over IBM i v6.1)
-Paul.
---------------------------------------------------------------------------------------
Important This email transmission and any files with it are strictly
confidential to the intended recipient and may be legally privileged. Any
views or opinions presented are solely those of the author and do not
necessarily represent those of BHSF. If you are not the intended recipient,
you must not copy, disclose or distribute its contents in any way.
If you have received this email in error, please notify the sender and
delete the email from your system. We have taken steps to ensure this email
and attachments are free from any virus but do not accept any
responsibility once this e-mail has been transmitted. You should scan any
attachments for viruses. No contract may be concluded on behalf of BHSF
Group Limited or its subsidiary companies by email.
Registered Office: BHSF Group Limited, Gamgee House, 2 Darnley Road,
Birmingham B16 8TE. Registered in England number 04767689. BHSF is
authorised and regulated by the Financial Conduct Authority and Prudential
Regulation Authority.
This email has been scanned for email related threats and delivered safely
by Mimecast. For more information please visit
https://www.mimecast.com
---------------------------------------------------------------------------------------
--
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.
--
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.