Here we go. This process assumes the object in CPF1002 is in the job's
library list and that you know its type (*FILE, etc.). The basic steps
in a program that finds who has an object locked are listed below.

1. Create a user space. This will hold the list of jobs locking the
2. Obtain a pointer to the user space. API QUSPTRUS.
3. List the jobs locking the object. API QWCRLCKI.
4. Retrieve the header information needed to step through the list.
5. Perform the steps you feel are necessary.
- If your job has the lock you can release it. This may be what you
to do.
6. Clean up your work object(s).
7. End the program.


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rusling, John
Sent: Wednesday, April 27, 2011 12:43 PM
To: midrange-l@xxxxxxxxxxxx
Subject: RE: If MSGTYPE has *NEXT or *PRV specified, MSGKEY is required.



Bear with me, I just started new job Monday, so I'm.. adjusting. :-)

I need to monitor a process that is kicked off by a homegrown CL
The process calls 3rd party apis to generate ASNs. (advanc ship notice)
The 3rd party apis can generate msg CPF4128, if 'something' it needs is
not available to it. (ie, user is using a file, for example)

I was thinking to monmsg for cpf4128 in the homegrown CL program.
Error message CPF4128 appeared during OPEN for file EDDALT (C S D F).

I'm not quite sure the best way to go about this but, I'm looking for
The best way to do this for this homegrown CL program, and probably
After that, be introducing the same technique into other similar

Does that help clarify?

John B



Can we step back a from the problem a second? What exactly is it you
are trying to accomplish? Modify a program for production to
automatically monitor for a message and take some action?


IMPORTANT NOTICE: This message is intended only for the addressee and
may contain confidential, privileged information.
If you are not the intended recipient, you may not use, copy or disclose
any information contained in the message.
If you have received this message in error, please notify the sender by
reply e-mail and delete the message.

This thread ...


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].