|
Thanks Buck. It was actually a substring bug in Procedure1. Using %len in Procedure2 showed it to me. Thank you, Schadd ----- Original Message ----- From: "Buck Calabro" <buck.calabro@xxxxxxxxxxxx> To: <rpg400-l@xxxxxxxxxxxx> Sent: Monday, July 12, 2004 10:09 AM Subject: Re: Procedure with varying parm > > Procedure 1 returns a variable length field and > > procedure 2 receives a variable length field. > > Procedure 2 is getting memory garbage in its > > input parm. Any ideas? > > That's the way it works. P1 initialises 51 bytes of storage and P2 is > reading 1024 bytes of storage (which have only the first 51 bytes set > to a known value.) The answer is to make P2 only use the number of > bytes that P1 sets. You can look into %len, operational descriptors, > and passing another parameter indicating the size of P1's variable and > see what works best for your situation. > --buck > > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
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.