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