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



That jogs my memory a bit. The other day I got a "misplaced construct error" in RDi 9.1.1.1 due to a cursor declaration being ahead of dcl-s ... in a sub-procedure apparently RDi expects all "exec sql" statements to be in the area that you would normally expect to find C specs. It probably works on compile since "exec sql declare ..." and "exec sql set options ..." are not executable, and the SQL pre-compiler comments all that out.

I always set my sql options immediately after the last module level declaration. Declaring cursors is a bit more complex, but I do that in the sub-procedure that contains the associated open, and I place it just after the last declaration in the procedure.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----Kurt Anderson <Kurt.Anderson@xxxxxxxxxxxx> wrote: -----
To: "Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries" <wdsci-l@xxxxxxxxxxxx>
From: Kurt Anderson <Kurt.Anderson@xxxxxxxxxxxx>
Date: 02/11/2016 11:12AM
Subject: Re: [WDSCI-L] No outline for one sqlrpgle source in RDi 9.1


Just an FYI, I have a ticket open in regard to a "misplaced construct" within an SQLRPGLE source. In my case I'm setting the SQL options up in the control specs. No APAR yet to share.

Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform

-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Koester, Michael
Sent: Wednesday, February 10, 2016 5:48 PM
To: Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Subject: Re: [WDSCI-L] No outline for one sqlrpgle source in RDi 9.1

Interesting.
Not applicable to my issue, though -- a problem like that should yield the same result when I copy the source into my development library. When I bring in a "clean" copy of the program source to my source file, it's "outlined" (even before I mess with it).
And I'm not seeing any yellow stuff.

Michael Koester
-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck
Calabro
Sent: Wednesday, February 10, 2016 4:33 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] No outline for one sqlrpgle source in RDi 9.1

On 2/10/2016 2:58 PM, Jon Everton wrote:

Based on this:

If I put the cursor over the yellow box, it says "misplaced
construct(s)", which is a Java error. The program compiles and runs
on the iSeries without issues.

I did some poking around. I found that I can get the 'misplaced
construct' and the loss of the outline if I move 'exec sql' statements
like declare cursor... above the dcl-s statements.

fqsysprt o f 132 printer oflind(*inof)

exec sql
set option naming = *sys, closqlcsr = *endactgrp, commit =
*none;

dcl-s first char(15);

This compiles and runs on 7.2.

--
--buck

Visit wiki.midrange.com and register for an account. Edit a page that
helps you, and because it's public, you'll help someone else, too!

--

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