× 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 2017-04-24 8:57 AM, Michael Quigley wrote:
...
I would love to hear from someone with some knowledge about the internal
implementation of IN. i.e., Is the data area object and associated
pointers resolved each time?


RPG does indeed resolve to the data area for each IN operation. (But if there had been a previous IN *LOCK, it wouldn't re-resolve until there was an OUT without *LOCK, or an UNLOCK.)

Here's a little program you can use to test this out. Create a data area called MYDTAARA *CHAR LEN(10) in QTEMP, with value 'qtemp', and another one in some other library that's not in your library list, with some value other than 'qtemp'.

When the command line pops up, add that other library to your library list.

dcl-s mydtaara char(10) dtaara;
dcl-pr qcmd extpgm end-pr;
in mydtaara;
dsply mydtaara;
qcmd();
in mydtaara;
dsply mydtaara;
return;

Here's my joblog:

5 > call bmorris/test
DSPLY qtemp
6 > addlible bmorris
Library BMORRIS added to library list.
End of requests.
DSPLY bmorris


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.