|
Try using the Const keyword instead of the Value keyword on the prototype for pParm2 and pParm3. ----- Original Message ---- From: albartell <albartell@xxxxxxxxx> To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> Sent: Monday, January 8, 2007 12:53:42 PM Subject: OPTIMIZE(*FULL) Hi All, I am developing a piece of code that produces odd results when I use OPTIMIZE(*FULL) on the CRTRPGMOD command. I am compiling to V5R1 on a V5R3 machine. Take the following as an example of the prototype: D xyzProc pr D pParm1 65535a varying D pParm2 1024a value varying D pParm3 1024a value varying I invoke the above like so: D string s 65535a varying D yyyy s 4 0 inz(0001) /free xyzProc(string: 'yyyy': %editc(yyyy:'X')); /end-free Calling xyzProc when it is compiled with OPTIMIZE(*NONE) or OPTIMIZE(*BASIC) works just fine and all variables have values as expected. When I recompile to OPTIMIZE(*FULL) I get the value of pParm3 in pParm2 (even though pParm2 is passed literally!!!!) Looks like I am not the only one having the problem :-( http://archive.midrange.com/rpg400-l/200112/msg00617.html http://archive.midrange.com/rpg400-l/199711/msg00004.html Anybody have a fix to this problem other than "don't use *FULL"? Thank, Aaron Bartell http://mowyourlawn.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.