|
I know where your problems comes from. Short answer: Add the CONST keyword in the PR definition More complete answer: Even if the field is defiened as Zoned in the file. At compile time, the compiler creates internal buffers that will hold the values of the files. In those buffers, numeric values are redefined as Packed by default. That's why you get an error message. To force the compiler to unpack a numeric field, it must be part of a data structure. Ex: D DS D S091PLU 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? Denis Robitaille Directeur services techniques Cascades Inc 819 363 5187 fax 819 363 5177 +--- | 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 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.