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




On 6-May-08, at 8:32 PM, MichaelQuigley@xxxxxxxxxx wrote:

Would passing by value help the situation or would there still be a
problem because the variables (elementary items in COBOL) are defined
differently?

Yes Michael,

You would still have fundamentally the same problem in that the wrong value would be received. There is less (or at least different) danger of course since you can't corrupt the caller's memory. However, in theory you could corrupt another parameter depending on how the parms are accessed. I'm not familiar with the internal workings of the ILE compiler (I did the original design spec but was not part of the development team) so I'm not certain if they reference Value parms directly on the stack or if they copy to local memory - probably the later in which case no corruption.

ILE doesn't actually handle all Value parms the same way - it varies by data type I believe - so it is difficult to determine exactly when/ where a problem might occur.

This is just one of many reasons why I wish COBOL had something similar to RPG and C's prototyping support - or at least that the OS generically supported introspection - that way this king of problem could be avoided.

Jon Paris

www.Partner400.com
www.SystemiDeveloper.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.