× 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 23 Feb 2013 09:31, John Yeung wrote:
On Sat, Feb 23, 2013 at 11:50 AM, Jack Callahan wrote:
Given the current behavior of RPG strings in the context of data
structures, not difficult to construct a solution without changing
RPG.

In this instance, define a third data structure using LIKEDS,
initialize it and copy the contents of the "working" DS, and then
compare the two copied snapshots of the "working" data structure.

I think it might make a difference how you do the copy. If you're on
V5R4 or later, you can use EVAL-CORR, and I'm very confident that
will work. I'm not as sure about plain old EVAL (which is implied in
free-form). I would expect that EVAL just does a byte-for-byte copy
of the entire structure, which wouldn't help you. (I don't have
convenient access to an i right now to check myself.)


The EVAL-CORR (Assign corresponding subfields) documentation suggests that "When the source and target data structures or corresponding source and target subfields which are both data structures are defined the same way with LIKEDS or LIKEREC, that is, both data structures are defined like the same data structure, the compiler will optimize the assignment and assign the data structure as a whole, and not as a series of individual subfield assignments." I do not think that operation would help.


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.