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



I suspect my confusion was simple. It appears I did understand the code but could not imagine any reason it was written the way it was written. I F16'd the program for COLLTXT( and it was never used that way. The only reference to the array is one instance of MOVE blanks to the array.

Experience has taught me that when I can't see why something is written the way it is written then I best be careful and not walk into a mess and make it even worse.

So I've learned to ask questions. I think Shannon explained why it was written the way it was. Multiple occurrence data structures always struck me as being a solution looking for a problem to solve.

Thanks to everyone that responded. Now I feel confident about solving the problem I was assigned.



Jon Paris wrote:
Does it make it any easier to understand if I show it RPG IV style rather
than converted RPG III Booth?
This is what the structure looks like.  Any additional array elements should
be added as shown.

     D CollSO_DS       DS
     D  CollTxt1                     60
     D  CollTxt2                     60
     D  CollTxt3                     60
     D  CollTxt4                     60
     D  CollTxt5                     60
     D* Add additional elements of 60 here then change DIM
     D  CollCode                      3

     D CollTxt                       60    DIM(5) Overlay(CollSO_DS)

I have to assume that the programmer wanted to reference the individual
fields by name for some reason. Perhaps to output the data to a display
file?  Build the data up as an array, but populate the display file without
having to do the individual field moves.


Jon Paris
Partner400

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