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
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
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
I don’t see anything that persuasively argues for any better course. Are you comfortable enough with the API usage?
Tom
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.