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



In **free the ruler line stops at 7....+....8 rather than the end of the
line when the cursor is inside an exec sql block.

On to formatting:

This is a formatted SQL Statement:
exec sql
select r.jobyr, r.jobno, j.cusno, j.cbrno, j.jexpd, j.jprior,
c.cname, r.dgpno, p.dgprv, partdescription(r.jobyr,
r.jobno, r.dgpno), s.dqtpr, r.rstep, r.rdesc
into :rec
from jcrwmp r
join jcjobf j on j.jobyr = r.jobyr
and j.jobno = r.jobno
join jccusf c on c.cusno = j.cusno
and c.cbrno = j.cbrno
join jcdgpf p on p.jobyr = r.jobyr
and p.jobno = r.jobno
and p.dgpno = r.dgpno
join table(utf_summarizedbillofmaterials(r.jobyr, r.jobno,
'')) s on s.jobyr =
r.jobyr
and s.jobno = r.jobno
and s.dpcno = r.dgpno
where r.jobyr = :jobyr
and r.jobno = :jobno
and r.dgpno = :dgpno
and r.rstep = :rstep;

This is what I want it to look like:
exec sql
select r.jobyr, r.jobno, j.cusno, j.cbrno, j.jexpd, j.jprior,
c.cname, r.dgpno, p.dgprv,
PartDescription(r.jobyr, r.jobno, r.dgpno), s.dqtpr,
r.rstep, r.rdesc
into :rec
from jcrwmp r
join jcjobf j on j.jobyr = r.jobyr and j.jobno = r.jobno
join jccusf c on c.cusno = j.cusno and c.cbrno = j.cbrno
join jcdgpf p
on p.jobyr = r.jobyr
and p.jobno = r.jobno
and p.dgpno = r.dgpno
join table(utf_SummarizedBillOfMaterials(r.jobyr, r.jobno, '')) s
on s.jobyr = r.jobyr
and s.jobno = r.jobno
and s.dpcno = r.dgpno
where r.jobyr = :jobyr
and r.jobno = :jobno
and r.dgpno = :dgpno
and r.rstep = :rstep;

On Thu, Mar 15, 2018 at 7:28 AM, Ken Killian <kkillian@xxxxxxxxxxxx> wrote:

Mike,

Okay, I tried that and it works...

I guess the parser once again does not match the compiler.

I look forward to when this APAR gets implemented.

Thanks.

-Ken Killian-

-----Original Message-----
From: WDSCI-L <wdsci-l-bounces@xxxxxxxxxxxx> On Behalf Of Mike Hockings
Sent: Wednesday, March 14, 2018 5:54 PM
To: Rational Developer for IBM i / Websphere Development Studio Client for
System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Subject: Re: [WDSCI-L] SQL Formatter - give me your poor huddled messes


I believe that there is an APAR for the case when ": customer" won't show
in the outline but if you change it to ":customer" then it will...

Basically the parser does not recognise the host variable if there is space
(s) between the ':' and the field name. I am sure y'all can figure out
the work-around ;)

Found it:
APAR SE68904 - RDI 9.6.0.1 SQL HOST VARIABLES NOT ALWAYS RECOGNIZED BY THE
SQLRPGLE PARSER

Mike

Mike Hockings, M.Eng., P.Eng.
DevOps for Enterprise
IBM Developer for z Systems and Power Systems Software Technical Support
IBM Canada Ltd. Laboratory hockings@xxxxxxxxxx




From: Ken Killian <kkillian@xxxxxxxxxxxx>
To: Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Date: 2018/03/14 11:59
Subject: Re: [WDSCI-L] SQL Formatter - give me your poor huddled
messes
Sent by: "WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx>



Edmund,

The outline view & the toggle-marking-occurrences does not work with SQL...

Example:

**free
ctl-opt Debug( *Yes ) Option( *SrcStmt : *NoDebugIO : *SecLvl ) DftActGrp
( *No ) ActGrp( *STGMDL ) BndDir('TOOLS') ;

dcl-s customer zoned(7);

customer = get_Order_customer(123456789);

*inlr = *on;
return;

dcl-proc get_Order_customer;
dcl-pi *n like(customer);
Order_number packed(9) const;
end-pi;

dcl-s customer zoned(7);

exec sql select Order_customer into : customer from order_file where
order# = : Order_number;

return customer;

end-proc;


So the " : Customer" & ": Order_Number" are not show in the outline view.
Nor do they show in the Toggle-Mark-Occurrence. <disappointment>

Hope I do not need an RFE, for something that should work... <LOL>


-Ken Killian-


-----Original Message-----
From: WDSCI-L <wdsci-l-bounces@xxxxxxxxxxxx> On Behalf Of Edmund Reinhardt
Sent: Tuesday, March 13, 2018 6:21 PM
To: Wdsci-L <wdsci-l@xxxxxxxxxxxx>
Cc: Ken Guo1 <Ken.Guo1@xxxxxxx>
Subject: [WDSCI-L] SQL Formatter - give me your poor huddled messes



Hi Everybody
I have somebody who is getting deep into the bowels of the SQL Formatter
code to fix an APAR. This is some non-trivial code and now that we have
somebody up to speed on it, it would be a good time to address all of the
pain points you are all feeling with the SQL Formatter.
I have heard (and seen) some pretty poor formatting, so if you can send me
the EXEC SQL statements to ken.guo1@xxxxxxx. We might have a chance to
address some of these issues.

Thanks


|

|

|Edmund Reinhardt

|

|Rational Developer for i Architect

|

|IBM

|p:

| 905 413 3125

|w:

| ibm.biz/rdi_hub e:

| edmund.reinhardt@xxxxxxxxxx

|




--
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:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.
midrange.com_mailman_listinfo_wdsci-2Dl&d=DwICAg&c=jf_
iaSHvJObTbx-siA1ZOg&r=wo0uDJijITU2f7aW2HWa1KiNWzc2cb
7dgMN4W-85iwI&m=dZLlBNMj_yZV0klr8PL3CQwa5eTF3qK3DQZ-tUM7yVM&s=B2GVfDy_dr5-
VMrzq5UozEQKm6z5LFhOfqBD7nenfM0&e=

or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=https-3A__
archive.midrange.com_wdsci-2Dl&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=
wo0uDJijITU2f7aW2HWa1KiNWzc2cb7dgMN4W-85iwI&m=dZLlBNMj_
yZV0klr8PL3CQwa5eTF3qK3DQZ-tUM7yVM&s=zGinwUvhWnCMPrlMzI8A9MYM3wsPaG
uUgff3OWusiRM&e=
.
--
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:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.
midrange.com_mailman_listinfo_wdsci-2Dl&d=DwICAg&c=jf_
iaSHvJObTbx-siA1ZOg&r=wo0uDJijITU2f7aW2HWa1KiNWzc2cb
7dgMN4W-85iwI&m=dZLlBNMj_yZV0klr8PL3CQwa5eTF3qK3DQZ-tUM7yVM&s=B2GVfDy_dr5-
VMrzq5UozEQKm6z5LFhOfqBD7nenfM0&e=

or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=https-3A__
archive.midrange.com_wdsci-2Dl&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=
wo0uDJijITU2f7aW2HWa1KiNWzc2cb7dgMN4W-85iwI&m=dZLlBNMj_
yZV0klr8PL3CQwa5eTF3qK3DQZ-tUM7yVM&s=zGinwUvhWnCMPrlMzI8A9MYM3wsPaG
uUgff3OWusiRM&e=
.



--
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: https://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://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: https://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://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.