× 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 Feb 15, 2012, at 1:00 PM, rpg400-l-request@xxxxxxxxxxxx wrote:

Tell me if that is logical and/or tell me where and when you has the use
for your non-INZ
fields other than alphanumeric fields ends up containing garbage that even
may cause
the program to fail.

I'm not quite sure what you mean by this. If what you are asking is do I think the way the compiler implements this is logical - well it is as logical in its own way.

But logic is pretty much irrelevant in this context. Compatibility is the word that matters. DS behave the way they do for historical reasons - and for that matter behave the same way as structures do in COBOL (for example).

RPG treats (and always has) a DS as being a character field having either the defined length or a length that is the sum of the fields contained within it. As such it should be initialized with blanks.

The original behavior almost certainly stems from the days of multiple record formats where the same positions within a record required different definitions based on the type of record. It would be lovely to just abandon such old behaviors but it would be sheer chaos.


Jon Paris

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