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



Kurt Anderson wrote:

Constants are great. But it kind of sucks that we can only have simple [[variables as constants]].

"Variables"? As "constants"?

I'm not sure what that means. However, each DS subfield seems required to be initialized (INZ()) separately at least through V5R3. And it appears that "a literal, named constant, figurative constant, built-in function, or one of the special values *SYS, *JOB, *EXTDFT, *USER, *LIKEDS, or *NULL" can be used as an INZ() parameter for a DS subfield -- though not for an entire DS!

So, a group of constants:

DScon1 C const( 'KEY1' )
DScon2 C const( 1 )
DScon3 C const( d'12-31-08' )

Then each DS subfield could be "initialized" with INZ(DScon1), INZ(DScon2), etc.

The DS itself wouldn't be inviolable unfortunately. But at least it should be possible to reinitialize it to guaranteed values whenever desired.

Maybe what's needed is something similar to the STATIC keyword in the sense that a new keyword would influence how that memory is handled; something like READONLY that somehow flags the memory range as not updateable, perhaps by something akin to incorporating the DS within the program-code memory area.

Tom Liotta


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.