× 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's an idea, but I was trying to have it include any trailing spaces, hence the pipe characters before and after.

I did try %subst(gNewPwd:1:10), but same message.  Removing the CCSID(37) is the only thing that fixed it so far.

Brian's method worked, as expected.


On 2/9/2021 2:01 PM, x y wrote:
%TRIM(gNewPwd), perhaps?

On Tue, Feb 9, 2021 at 1:58 PM Peter Dow <petercdow@xxxxxxxxx> wrote:

Thanks Brian. I'll use that method, but it does seem like a bug.


On 2/9/2021 1:21 PM, Brian Parkins wrote:
I get the same error with regular RPG IV code. Looks like a bug on the
DSPLY op-code.

This worked for me:

D gNewPwd s 10a ccsid(37) Inz('Password')

D UserId S 10A Inz(*User)
D Msg S 40A

Msg = 'New |' + gNewPwd + '|';
Dsply Msg UserId;

(Build the message in a separate expression.)

HTH,
Brian.

On 09/02/2021 19:48, Peter Dow wrote:
I'm on v7r3, modifying an SQLRPGLE program with the following snippets:

0086.00 d gNewPwd s 10a ccsid(37)

0136.00 dsply ('New |' + gNewPwd + '|') 'PDOW';

The compiler listing shows:

*RNF7016 20 013600 Display length 64 greater than maximum
allowed of 52;
specification is ignored.

0007.09 GNEWPWD A(10) 008600D 012400M
012700M 013400
0007.10 CCSID(37) 013400 013600
013800 017800
0007.11 028100

Counting on my fingers and toes, I get 16 as the length to be
displayed on that statement. If I remove the CCSID(37), it's fine.

Is this a compiler bug or am I missing something?

--
*Peter Dow* /
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

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.