×
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.
Bob:
What do you mean by "native"? On OS/400 and IBM i, you can not get much
more "native" than invoking MI (machine interface) instructions directly
from within ILE programs as built-in functions.
What kind(s) of object type(s) are you wanting to "lock"? And for what
purpose(s)?
Here is one way to accomplish this:
Create a CLP *PGM or CLLE procedure you can call from RPG, that issues
the ALCOBJ command to "lock" an object, and uses MONMSG CPF1002 to
detect if the object could not be allocated; specify WAIT(0) on the
ALCOBJ command so it does not wait for the lock, but if the object
cannot immediately be "allocated" (locked), the command signals an
exception by throwing an *ESCAPE message CPF1002. Then, your CL program
or procedure can return some kind of "return code" to indicate success
or failure.
IMHO, using CL commands and a CLP program or CLLE program or procedure
in this way is still considered "native." :-)
HTH,
Mark S.Waterbury
> On 8/24/2016 4:31 PM, Bob Cagle wrote:
Is there a native way to lock an object in RPG, and test for failure if unable to obtain the lock?
I did find this: http://i5toolkit.sourceforge.net/rpg/page_obj_lck.html
But just wondering if there's a native solution?
Thanks
Bob Cagle
IT Manager
Lynk
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.