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



THANK YOU!!!

On 2021-02-16 17:39, Barbara Morris wrote:

On 2021-02-11 6:29 p.m., dr2@xxxxxxxx wrote:

In Debug, in RPG... I have DS with multiple occurs.... When I do an
eval xxx I want to see ALL elements in the array... How can that be
done?

You can use the same (1..3) syntax that you use for debugging normal arrays.

dcl-ds mods occurs(3);
subf char(10);
end-ds;

%occur(mods) = 1;
subf = 'one';
%occur(mods) = 2;
subf = 'two';
%occur(mods) = 3;
subf = 'three';

return;

Here's my debug session at the RETURN statement.

EVAL mods(1..3)
SUBF OF MODS(1) = 'one '
SUBF OF MODS(2) = 'two '
SUBF OF MODS(3) = 'three '

EVAL subf(1) = 'ONE'
SUBF(1) = 'ONE' = 'ONE '

EVAL mods(1..3)
SUBF OF MODS(1) = 'ONE '
SUBF OF MODS(2) = 'two '
SUBF OF MODS(3) = 'three '

--
Barbara

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.