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



Hi Steve,

I created PMR 33488,031,724.

Feel free to use my example source. It is Open Source and belongs to the
iRPGUnit plug-in.

Regards,

Thomas.

Am 30.05.2019 um 14:32 schrieb Steve Ferrell via WDSCI-L:
Hi Thomas,

Would you please contact IBM support and open a PMR so we can get it addressed?

I'll add an Internal defect this morning that will track to the IBM APAR once it's opened.

May I use your example source in the defect tracking?

Thanks!

Steve Ferrell

-----Original Message-----
From: WDSCI-L <wdsci-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Tools/400
Sent: Wednesday, May 29, 2019 3:38 AM
To: wdsci-l@xxxxxxxxxxxxxxxxxx
Subject: [WDSCI-L] RDi 9.6.0.6 - Refactoring constants produces invalid source code

Hi,

I updated my RDi to 9.6.0.6 and tried the new "Extract constant" feature.

"Extract constant" produces invalid source code, when the name of the constant matches an existing field name.

For example:

Before:

//----------------------------------------------------------------------
// GLOBAL VARIABLES
//----------------------------------------------------------------------

// Number of assertions called.
D assertCalled s 10i 0

// Latest assertion failure event information. Can be blank if no // assertion failure event since last assertion.
D assertFailEvt ds likeds(AssertFailEvtLong_t)

//----------------------------------------------------------------------
// Assert equality between two alphanumeric variables.
//----------------------------------------------------------------------
P aEqual...
P b export
D pi
D expected 32565a const
D actual 32565a const
D fieldName 64a const varying options(*nopass: *omit)

D msg s like(msgText_t) inz

/free

if (%parms() >= 3 and %addr(fieldName) <> *NULL);
msg = %trim(fieldName) + ': ';
endif;

msg = msg
+ 'Expected ' + QUOTE + %trimr(expected) + QUOTE + ','
+ ' but was ' + QUOTE + %trimr(actual ) + QUOTE + '.';
doAssert(expected = actual: msg: ONE_CALL_STK_LVL_ABOVE: 'aEqual');

/end-free
P e

After extracting 'Expected ' to EXPECTED:

//----------------------------------------------------------------------
// GLOBAL VARIABLES
//----------------------------------------------------------------------

// Number of assertions called.
D EXPECTED C 'Expected ' // <=== Inserted line
D assertCalled s 10i 0

// Latest assertion failure event information. Can be blank if no // assertion failure event since last assertion.
D assertFailEvt ds likeds(AssertFailEvtLong_t)

//----------------------------------------------------------------------
// Assert equality between two alphanumeric variables.
//----------------------------------------------------------------------
P aEqual...
P b export
D pi
D expected 32565a const
D actual 32565a const
D fieldName 64a const varying options(*nopass: *omit)

D msg s like(msgText_t) inz

/free

if (%parms() >= 3 and %addr(fieldName) <> *NULL);
msg = %trim(fieldName) + ': ';
endif;

msg = msg
+ EXPECTED + QUOTE + %trimr(expected) + QUOTE + ','
+ ' but was ' + QUOTE + %trimr(actual ) + QUOTE + '.';
doAssert(expected = actual: msg: ONE_CALL_STK_LVL_ABOVE: 'aEqual');

/end-free
P e

The compiler error message is "RNF7421 Operands are not compatible with the type of operator." in procedure, which is stored in the same module:

//----------------------------------------------------------------------
// Assert equality between two integers.
//----------------------------------------------------------------------
P iEqual...
P b export
D pi
D expected 31s 0 const
D actual 31s 0 const
D fieldName 64a const varying options(*nopass: *omit)

D msg s like(msgText_t) inz

/free

if (%parms() >= 3 and %addr(fieldName) <> *NULL);
msg = %trim(fieldName) + ': ';
endif;

msg = msg
+ EXPECTED + %char(expected) + ','
+ ' but was ' + %char(actual ) + '.';
doAssert(expected = actual: msg: ONE_CALL_STK_LVL_ABOVE: 'iEqual');

/end-free
P e

Can somebody confirm the problem?

Regards,

Thomas.


--
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@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/wdsci-l.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com



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.