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



There is one chapter that will tell you what is happening. I'll include the link, and I hope it is easy enough to translate. Also, let me try to help you see what is happening.

Compile your program with debug information. There are different options for ILE or the OPM - original - style.

STRDBG - if your program is OPM, be sure to set the OPM parameter to *YES. I forget what the real parameter name is - look for the word OPM.

Set a breakpoint at the first statement that will be executed. Then call your program again. When it stops at the breakpoint, put the cursor on the command line and type

eval parameter2 : x 8

parameter2 is the name of the first decimal variable, the 3,0 one. You will see this

00000008 0000000F

This is the hexadecimal value of the first decimal parameter - notice - it has 15 digits, followed by the 'F'. And notice that after the 8 00 there are 5 zeroes. That is what a 15,5 packed field would look like, if it were set to 800.

A 3,0 packed field would be 800F - in the first 4 characters - this is why you get a data-decimal error - the 'F' is not in the right place.

This has been like this for 28 years. This link is for the CL Concepts manual -

http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/topic/rbam6/rbam6.pdf

Search for the words "Decimal length and precision errors:" It will tell you more and will tell you one way to fix it - use the hexadecimal form of the number.
CALL MPDE98P ('MPDE98 ' x'800F' x'02006F' x'02007F')
Please take the time to read that section on length and precision errors - it is so important to understand the problem. Otherwise you will not know what to do the next time. Also, you need to know how numbers are stored, in a packed variable.
There is more information in the manual - search for the words "Parameters can be passed and received as follows:" and read that section - it might be a little difficult but you have to understand it - perhaps someone can translate it.
HTH
Vern
-------------- Original message --------------
From: pepitovadecurt <pepitovadecurt@xxxxxxxxx>

Hi, can you post an example.
I can't read these books because my english is bad.
Example:
10 text
3,0 numeric
4,0 numeric
4,0 numeric
CALL MPDE98P ('MPDE98 ' 800,0 2006,0 2007,0)

Thankyou.



Michael Ryan escribió:
It's not a problem...it's just the way it works.
http://faq.midrange.com/data/cache/57.html

On Mon, Jun 2, 2008 at 4:35 AM, pepitovadecurt
wrote:

I have an V5R2, the V5R3 resolve this problem?
Regards.

Simon Coulter escribió:
On 02/06/2008, at 5:00 PM, pepitovadecurt wrote:

Hi is posible to call a program ex: call MPDE98P ('XX','XX'), with a
numeric parameters?
I've test it but only can with the character parameters.
Search the archives. This problem has been done to death in the past.

Essentially two choices:
1) Define the numeric values as 15,5 in your program and pass
literals without quotes
2) Pass numeric literals in hexadecimal including required sign bits
(e.g., X'0123456F')

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------



--
This is the RPG programming on the AS400 / 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.



--
This is the RPG programming on the AS400 / 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 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.