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


  • Subject: RE: Decimal Data Error
  • From: Bob Cozzi <BobCozzi@xxxxxxx>
  • Date: Tue, 9 Sep 1997 19:32:15 -0500

Boy is this one easy (I hope).


RPGII has a default data type of ZONED decimal for numeric fields. Hence 
fields declared in the Calc specs are of type ZONED.  RPGIII and RPG IV, 
however, have a default datatype of Packed decimal for fields.

So you end up passing a zoned decimal field to a Packed Decimal field or 
the other way around.

The solutions?

1. Convert everything to RPGIII or RPG IV.
or
2. Declare the parameters in data structures. Granted *ENTRY PLIST 
parameters can't be declared in this way, so you may have to go the route 
of changing the RPGII to pass packed decimal via data structure subfields.

FYI.  The *LIKE DEFN operation only declares Packed Fields in RPGIII. It 
will not create a zoned decimal field no matter what you do. I would think 
RPGII is similar, but stuck on ZONED.


Bob Cozzi
Bob@RPGIV.COM
www.rpgiv.com
AS/400 Books:  http://www.rpgiv.com/as400Books.html


On Tuesday, September 09, 1997 2:22 PM, Tim Truax [SMTP:truax@usaor.net] 
wrote:
> Hi All,
> I am from the S36 world and am now working with the AS400.  One very
> frustrating thing is the DDE's that I get from time to time.  Please
> look at the following:
>
> I have a program that gets called from other programs-
> C*****************************************************************
> C* MAINLINE CALCULATION AREA.                                    *
> C*****************************************************************
> C           *ENTRY    PLIST
> C                     PARM           X$YYYY  40      <--4 pos/0dec
> C                     PARM           X$MM    20
> C                     PARM           X$DD    20
> C                     PARM           @D1RT   1
> C                     PARM           @D1TP   1
> C                     PARM           @D1N#   30
> C                     PARM           Y$YYYY  40
> C                     PARM           Y$MM    20
> C                     PARM           Y$DD    20
> C                     PARM           @D1NM   3
> C*
>
> I am getting a DDE on this line-
>
> C* PLACE THE YYYY INTO HDYTST.
> C                     MOVELX$YYYY    HDYTST  80    <--DDE happening
> here!
>
> Any help from you bright folks would be appreciated, also any tips on
> avoiding DDE's would be appreciated.
>
>
> --
> ?????????????
> ?-Tim Truax-?
> ?????????????
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
> | To unsubscribe from this list send email to MAJORDOMO@midrange.com
> |    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
> | Questions should be directed to the list owner/operator: 
david@midrange.com
> +---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.