× 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 7/2/2013 2:46 PM, Briggs, Trevor (TBriggs2) wrote:
...
When control is returned to Pgm A, value is in
occurrence 50 of the MODS.

When you pass a MODS as a prototyped parameter, it passes the current occurrence. (As you've seen.)

I assume you didn't add the DIM keyword for the prototyped, so I think it makes sense that it would pass the current occurrence.

Just by the way, if you use an array of data structures (DIM keyword instead of OCCURS keyword), you can distinguish between the whole array ARR, and an element ARR(i).

For sure I would recommend using a DS array for new code, since it's easier (I think) to code array indexes than to manage occurrences.

But for existing code, it's not usually easy to change a MODS to a DS-array, since it involves changing every reference to the subfields. For example, if a MODS named INFO was previously not qualified, and INFO was changed to a qualified ds array, the reference to subfield ADDR would change from simply ADDR to INFO(index).ADDR.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.