× 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 2020-03-10 9:38 a.m., Mónica Anastácio wrote:
Well after this morning meeting, im allowed to find a new solution not
based in what we used to do i fexed format. But the new solution has work
with “Pointers” if anyone can help me. I really appreciate it 😉


Mónica,

Joe Pluta already showed an example of how to do this using pointers. Here is the code that Joe posted.

dcl-ds er5005ds extname('ER5005DS') based(per5005ds) end-ds;

dcl-pi *n;
i_er5005ds like(er5005ds);
end-pi;

per5005ds = %addr(i_er5005ds);

That method allows you to use the subfields of er5005ds with just the subfield names (addr, id_no) instead of coding er5005ds.addr, er5005ds.id_no).

Did you mean that you want a new solution to work _without_ pointers?

If that is what you meant, then I think the best way is to code like this. (I believe other people have already recommended this method ...)

dcl-ds er5005ds_t extname('ER5005DS') qualified template end-ds;

dcl-pi *n;
er5005ds likeds(er5005ds_t);
end-pi;

But now, you have to code the subfields of the parameter as qualified names.

if er5005ds.addr = *blanks;
...


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.