× 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: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Fri, 7 Apr 2000 17:40:02 -0500 (CDT)


(This question should probably be in a FAQ somewhere)

The RPG compiler will automatically convert ZONED data being input from an 
externally defined file into PACKED,  unless you specifically tell it that
you want your field to be zoned.

This is not a new feature of RPG IV... It did this in RPG III as well.
This just didn't cause many conflicts because ZONED was so rarely used in
RPG III.

Anyway, a simple workaround is to pull your file into an externally
described data structure.  Add a line similar to this:

D MyFileDS      E DS                  ExtName(MYFILE)  

Which will create a data structure with your externally defined fields,
forcing them to be the attributes that you used in your DDS source.

Have Fun!



On Fri, 7 Apr 2000 Yuriy_Simonoff@WHJI.COM wrote:

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

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.