×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Maybe do the ALCOBJ, if it fails, use the api to notify, blast, or 
otherwise deal with the offending jobs.  Oh heck some code

Retry:
ALCOBJ...
MONMSG ... DO
  Call api, process api list accordingly
  goto retry
enddo


Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





<Rick.Chevalier@xxxxxxxxxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
02/09/2005 10:01 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
<midrange-l@xxxxxxxxxxxx>
cc

Subject
RE: How to tell if an object is in use?







Greg,

What you have and the suggested work with object locks API are about it 
that I know of.  In your case for simplicity I would probably use the 
ALCOBJ option.  If it's important that no one be using the file during 
this job run I would probably move the DLCOBJ to the end of the job.

Rick

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Greg Wenzloff
Sent: Wednesday, February 09, 2005 7:45 AM
To: 'midrange-l@xxxxxxxxxxxx'
Subject: How to tell if an object is in use?


I have a CLP that will process a file in batch then delete it.   Sometimes 
a
user first performs maintenance on the file but fails to exit the
maintenance program leaving the file locked.    The CLP which runs in 
batch
then hangs.

I put the following code in the program that is about to submit the batch
job:

/* SOMETIMES USERS ARE IN MAINTENANCE IN ANOTHER SESSION */ 
        ALCOBJ OBJ((&FILEE *FILE *EXCL *FIRST)) WAIT(5) 
        MONMSG MSGID(CPF0000) EXEC(DO) 
                <<< send the user a message to get out of the file  >>>>
                ENDDO 
        DLCOBJ     OBJ((&FILEE *FILE *EXCL *FIRST)) 
 
This ALCOBJ/DLCOBJ does not seem very elegant.   Is there a better way to
tell if an object is being used by someone?

Thanks,
Greg 

Privileged and Confidential.  This e-mail, and any attachments there to, 
is intended only for use by the addressee(s) named herein and may contain 
legally privileged or confidential information.  If you have received this 
e-mail in error, please notify me immediately by a return e-mail and 
delete this e-mail.  You are hereby notified that any dissemination, 
distribution or copying of this e-mail and/or any attachments thereto, is 
strictly prohibited.

-- 
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing 
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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