× 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: File and Program field definition
  • From: Chris Bipes <rpg@xxxxxxxxxxxxxxx>
  • Date: Fri, 7 Apr 2000 15:38:24 -0700

Don't you just love RPG.  Since math is more efficient in Packet form, the
RPG compiler brings the file specs into the programs converting all number
to packed form.  While the input buffer is Signed Numeric, it gets mapped to
a Packed field.  Insert an externally described data structure and your
problems will disappear.  The data structure will force the field to remain
Signed Numeric.  By the way, the fields defined in a PR statement do not
exist unless defined somewhere else.  They are just place holders for the
compiler to resolve the interfaces at compile time.  The following will also
work.

54+D GetCoupon       PR                  extpgm('ZED005')
55+D                               11S 0
56+D                                5S 0


Christopher K. Bipes     mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst   mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc.         http://www.cross-check.com
6119 State Farm Drive    Phone: 707 586-0551 x 1102
Rohnert Park CA  94928 Fax: 707 586-1884

If consistency is the hobgoblin of little minds, only geniuses work here.
Karen Herbelin - Readers Digest 3/2000


-----Original Message-----
From: Yuriy_Simonoff@WHJI.COM [mailto:Yuriy_Simonoff@WHJI.COM]
Sent: Friday, April 07, 2000 1:26 PM
To: RPG400-L@midrange.com
Subject: File and Program field definition




I've got something weird.

1. There is an external program that is defined to the calling program
through procedure prototype as:
54+D GetCoupon       PR                  extpgm('ZED005')
55+D PLUParm                       11S 0
56+D ValueParm                      5S 0

*** note PLUParm parameter.

2. There is a file that has PLU defined as:
0012.00      A            S01PLU        11S 0       COLHDG('COUPON PLU')

3. In the program I call procedure as:
0186.00 C                   CallP     GetCoupon(S01PLU:CouponValue)


4. Compiler gives me an error:
*RNF7535 30      1 The type and attributes of the parameter do not match
those
                   of the prototype.

5. Looking at compiler listing I see that S01PLU field is defined as
packed:
0008.36          S01PLU            P(11,0)

6. This field is defined ONLY in the file and in the program it gets only
referenced.

Does anybody have an explanation for this phenomena?
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| 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.