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



Which is one of the reasons I prefer /free to fixed: Indentation makes the closures (or lack thereof) easier to see. And, yet, I still missed it.

When I opened the source member, even before I added the missing ENDIF, the IF that was previously in BLUE was now in RED (which it should have been all along), and I was able to place it where I wanted it, which I had not been able to do yesterday when it was BLUE. All before, as I said, I added the missing ENDIF.

After yesterday's post, I saved and closed the member (got a higher priority project sent to me) so other than the save/close nothing was done on the member until I opened it this morning. Strange, very strange. I'll lay odds that I will not be able to duplicate the issues no matter how hard I try - but it'll rear its ugly head when I least expect it.

Thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of DeLong, Eric
Sent: Monday, December 14, 2009 4:37 PM
To: Websphere Development Studio Client for iSeries
Subject: Re: [WDSCI-L] Another SQLRPGLE Problem in WDSc v7

You're missing an ENDIF... You have three Ifs nested, and only to
ends....

-Eric DeLong

-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jerry Adams
Sent: Monday, December 14, 2009 12:05 PM
To: Midrange-WDSc (wdsci-l@xxxxxxxxxxxx)
Subject: [WDSCI-L] Another SQLRPGLE Problem in WDSc v7

orderCount += 1;
IF datepi > prevdate;
prevdate = datepi;
ENDIF;

Normally I would format the IF to begin right under the 'O' in
orderCount. In fact, I did, but WDSc insists upon pushing the statement
two positions further to the right. In addition, though it can't be
shown in this example, the IF is color-coded BLUE (in fact, the whole
line is colored blue). IF's are color-coded RED; at least mine are
(excepting this one). SQL statements are (for me, anyway) colored Blue.

Plus, referring to my earlier post about WDSc returning to the line
after the last SQL statement after entering a non-SQL statement, WDSc's
cursor is returning to the line after the IF statement. Except for the
abhorrent behavior of WDSc's cursor, everything was going fine until the
IF statement above. There doesn't seem to be anything out of the
ordinary in the preceding code, but here the whole section anyway:

/free

EXEC SQL
Declare Cursor AllOrders for
Select dncust,
dnref#,
dndate
From HISTORY / BWDNAMH01
WHERE dndate > 20081231 AND
dnjrcd = 'AR' AND
IN (SELECT customer
from LAYTRACK)
Order By dncust,
dndate;

EXEC SQL
Open AllOrders;

DOW 1 = 1;

EXEC SQL
Fetch Next from AllOrders Into :custpi, :ref#pi, :datepi;

IF SQLState = '02000'
OR SQLCode < *Zeros;
LEAVE;
ENDIF;

IF custpi <> prevCust;
IF prevCust <> *Zeros;
CHAIN prevcust LAYTRACK;
IF %found(LAYTRACK);
lastorddt = prevDate;
orders2009 = ordercount;
UPDATE LAYTRACKR;
ENDIF;
prevCust = custpi;
prevDate = *Zeros;
orderCount = *Zeros;
ENDIF;

orderCount += 1;
IF datepi > prevdate;
prevdate = datepi;
ENDIF;

This is driving me nuts.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


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.