× 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 2012/2/15 1:14 PM, Vern Hamberg wrote:

But I just looked at the V2R1M0 RPG III reference - it mentions an I in
position 18, which is a data-structure-level initialization that behaves
as just described.


The ability to code specific initialization was added to RPG/400 in V1R3. A blast from the past indeed - I joined IBM near the end of development for V1R3. I remember feeling quite excited that I got to participate in (read "listen to") some of the discussions about the initialization support.

I can wild-guess at a couple of possible reasons that data structures were originally initialized to blanks, back in the long-long-ago. (They're initialized by default to blanks now for compatibility.)

1. Early versions of RPG (RPG II) only supported character and zoned decimal subfields. The value x'40' was interpreted the same as x'F0' (zero) for zoned decimal, so initializing a DS to x'40's gave blanks for character and zero for zoned decimal.

2. RPG data structures are also considered to be character fields. So even if "they" had thought of initializing by subfield when other subfield types were possible (RPG III on System 38), they might have decided to continue initializing to blanks anyway, because that's what RPG programmers were accustomed to.

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.