How about this?  Assume the display of interest is PGMBDSPF and it's in library DSPFLIB.

   dcl-s  in_use char(1);

   in_use = 'N';

   exec sql
   select 'Y'
     into :in_use
     from sysibm.sysdummy1
    where exists
    (select *
       from qsys2.object_lock_info
      where object_schema = 'DSPFLIB'
        and object_name   = 'PGMBDSPF');

   if in_use = 'Y';
      <do something>;
   endif;

If there is any kind of lock on DSPFLIB/PGMBDSPF, the host variable IN_USE will be set to 'Y'.

On 1/28/2019 11:47 AM, JRusling@xxxxxxxxxxx wrote:
Jose,

It shows up using wrkobjlck. But i want to do this from an rpg program.

John

<snip>
The screen is a file obj. The same way you would do it with other kind of
file you would do it with your screen, check objlck
</snip>
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].