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



The question is, if you define &M to be 5000, how can it contain 5001 bytes of data when passed.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bruce Vining
Sent: Thursday, May 02, 2013 10:37 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Varable initialized with more data then defined for

I interpret the error as saying the SNDDST command, being passed in the CMD parameter of the SWPUSRPRF command, is exceeding 5000 bytes rather than just &M.


On Thu, May 2, 2013 at 8:36 AM, Steinmetz, Paul <PSteinmetz@xxxxxxxxxx>wrote:

We ran into an issue where a variable, defined as *CHAR with a length
of 5000, but either initialized or data moved to this field exceeded
5000 characters, caused a subsequent command to fail because of length
limitation issue, CPD0183. How can this happen? Is this a bug? How can
a field have more data than it was defined for.
We saw the same results if the data was defined in an RPGLE program,
passed it the CL.

DCL VAR(&M) TYPE(*CHAR) LEN(5000)

SWPUSRPRF USRPRF(CPATEXT) CMD(SNDDST TYPE(*LMSG) +
TOINTNET((psteinmetz@xxxxxxxxxx)) +
DSTD(TEST) LONGMSG(&M))

Message ID . . . . . . : CPD0183 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 05/02/13 Time sent . . . . . . :
09:22:03

Message . . . . : Embedded command SNDDST too long.
Cause . . . . . : The length specified for the embedded command exceeds
the
defined length. Command length is 5001, but the maximum length for the
embedded command string is 5000.

Thank You
_____
Paul Steinmetz
IBM i Systems Administrator

Pencor Services, Inc.
471 Delaware Ave
Palmerton Pa 18071

610-826-9117 work
610-826-9188 fax
610-349-0913 cell
610-377-6012 home

psteinmetz@xxxxxxxxxx<mailto:psteinmetz@xxxxxxxxxx>
http://www.pencor.com/

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




--
Regards,
Bruce
www.brucevining.com
www.powercl.com
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


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.