How to Identify all work stations with object lock on specific display file

250 pts.
Tags:
AS/400 Display File
CL programming
Display File
RPG
WRKOBJLCK
A break message needs to be sent to all workstations with a current lock on a specific display file. The message-sending CL program needs to identify those workstations and then send the break message to each of them. WRKOBJLCK regretably does not generate an output file, nor could I find an appropriate API for doing this. I could use WRKOBJLCK to generate a spool file, then use CPYSPLF to copy the spool file to a physical file and then parse the physical file. Alternatively, I could make an application change wherein invoking the display file would cause a record, including the workstation id, to be written to a physical file and exiting the display file would cause this record to be deleted. However, I'm wondering whether anything more straightforward exists. Would welcome any suggestions.

Thanks, Zack

 



Software/Hardware used:
as400 clp rpg
ASKED: November 8, 2010  5:36 AM
UPDATED: November 11, 2010  4:23 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Just wanted to say Thanks for putting this out there and getting the answer!  This Internet thing never ceases to amaze me!

 

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    The List Object Locks (QWCLOBJL) API would return the list of locks into a user space. It's not clear if that's all that you need to know. It might be useful if you described the business problem that you are trying to solve. Tom
    125,585 pointsBadges:
    report
  • Zack
    Hi Tom, I somehow overlooked/missed this API. Those that I did find dealt only with database files and not display files. This should do the job. The "business problem" , as it were, is to notify only certain workstations (not always the same) in a control center for a country-wide transportation system that a particular situation has arisen that demands attention. Identification of those currently active on the control application can be determined by a lock on an underlying display file that is not invoked other than by the control application itself. Thanks for your help. Zack
    250 pointsBadges:
    report
  • TomLiotta
    I don't see anything that persuasively argues for any better course. Are you comfortable enough with the API usage? Tom
    125,585 pointsBadges:
    report
  • Zack
    Tom, we are quite familiar using APIs where applicable in our application. The one you have referred us to is definitely sufficient for our purposes. Thanks again.
    250 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following