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



Ok,

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
object. API QUSCRTUS.
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
want
to do.
6. Clean up your work object(s).
7. End the program.

Gary

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

Gary,

Absolutely.

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
program.
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
programs.

Does that help clarify?

John B


<snip>

John,

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?

Gary



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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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