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



Murali:

We have to know more about your process to guess why you see your problem. It 
seems that some other process is locking your file before you try to use it, 
and then releasing the lock before you look at it. The other process could be 
Data Mirror, but we can't tell yet.

Most programmers would try to solve the problem by establishing a lock before 
your program is called. You might try to execute an ALCOBJ command just be fore 
calling your program; then execute DLCOBJ as soon as your program ends. My 
first guess is that you want to set an exclusive allow read (*EXCLRD) lock.

Your ALCOBJ command will succeed or fail. If it cannot establish the lock 
before it times out, you should have a MONMSG command to use to decide how to 
proceed. (Monitor for CPF1002?) You would have a DO/ENDDO group that might 
display a message to ask what to do next. You might have a counter to loop back 
two or three times before displaying a message; this can depend on how long you 
tell the ALCJOB command to wait for the lock.

(Also, you might want to use ALCOBJ to run tests. You can create a test program 
that tries to establish locks over and over. Use a zero wait time if you are 
testing like this. When it fails, you can retrieve the lock information and 
print it out or send a message. That can help you determine what other process 
is setting the conflicting lock if the lock lasts long enough. Be sure to 
DLCOBJ before looping back so you give other processes a chance to establish a 
lock. You'd probably want to use DLYJOB too for a few seconds before looping 
back.)

If the ALCOBJ succeeds, you simply drop through and call your program.

By using ALCOBJ, you let your program be tolerant of locks that come at 
unpredictable times.

Tom Liotta

midrange-l-request@xxxxxxxxxxxx wrote:

>   7. Re: No SHRUPD but still file locked (murali dhar)
>
>Yes James! Right guess ,Iam using S/36 environment..I would like to know how 
>can i avoid these erros permanently..if you had any experieince earlier 
>,please share your knowledge with me,I will really appreciate your help and 
>thank you so much for your help and valuable answers...
>Thank you
>Murali
>
>"James W. Kilgore" <email@xxxxxxxxxxxxxxxxxxx> wrote:
>murali,
>
>I've never used data mirror, but from what you've posted it seems that
>you are still using the S/36 environment?
>
>If so, I ran into a similar problem where the system would tell me a
>file is open and when I issued a CLOF it would tell me its NOT open.
>
>If you are not using the S36EE, never mind! :) Press DELETE now.
>
>I'm just taking a stab in the dark here and am going to ask you to check
>your S/36 options (CHGS36) and see if there is a Yes/No question about
>shared file opens and caching deleted files. It was put there to speed
>up the older boxes (last time I looked was at V2). These shared opens
>did not appear under a WRKOBJLCK! (at that time) An they held the lock
>even after the program finished and lasted until the user signed off.
>
>If any job did an open on the file, it seems that the S36EE would hide
>this fact and cause problems in doing a CLRPFM or other things that
>required an exclusive lock.

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.