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



Rajeev wrote:

>This question is about STRDBG.
>I have a RPGLE program with 2 *entry parameters 
>with lengths 256 and 512 respectively.  I'm debugging 
>it to see their contents after the proper values are 
>moved into these *entry parms, .Now weird thing is 
>happening.  When I see Parm1 (by F11) it shows 
>the correct value. Now some value is moved into Parm2. 
>I see Parm2 now (by F11). It's Okay. But if I see Parm1 
>again, it's NOT okay. It shows a value which is a overlap 
>of Parm2 on it.  Why?

Because the CL has the variables defined differently than the RPG.  If the
CL defines Parm1 *CHAR 80 (for example) then when you move data into Parm2
in the RPG, that data could start at column 81 in Parm1.  That's because the
CL program would only allocate 80 bytes for Parm1 (memory location 1-80)
Parm2 would occupy memory locations 81-592.  The RPG program would see Parm1
as occupying 1-256 and Parm2 as occupying 81-592 because it gets pointers to
the storage allocated by the CL.  This is only an example; the CL compiler
might not decide to place the two variables next to each other in memory...

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