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



Having a problem with getting OVRDBF FILE(SVLOCK) WAITRCD(*IMMED) OVRSCOPE(*JOB) to work. I have a procedure that needs to test if a record is locked (indicating that someone is in an order entry process for the specific order, and nobody else can mess with that order until they let go). The file that this record I test against has forever been defined as WAITRCD(60), and I don't want my test to wait all 60 seconds to find out that I can't mess with that order, so I endeavor to override that.

I suspect it's another of those ILE things I haven't got a firm grasp on, but...

My program LOCKS is a module that I put into our TFSORDERS *srvpgm. LOCKS has logic that calls a private subprocedure that composes the above OVRDBF command, and sends that off in a call to QCMDEXC to affect the override. I have a test program that was created with:
CRTPGM PGM(MKOESTER/TESTSTUFF)
MODULE(MKOESTER/TESTSTUFF)
BNDSRVPGM((MKOESTER/TFSORDERS *IMMED))
ACTGRP(*NEW)

I call TESTSTUFF from a command line. It calls the LOCKS program, and the SEP debugger shows that the LOCKS program does the OPEN SVLOCK (for the USROPN file), and then calls QCMDEXC to do the OVRDBF. With sysAttn > 3 > 15, I can see that the job has the override. The LOCKS program then does a chain to the record that is indeed locked to another job, but won't pass to the next statement until the 60 seconds has passed. I'm feeling ignored here. As the job then proceeds to the end, and sends "DLTOVR FILE(SVLOCK) LVL(*JOB)", also via QCMDEXC, I get the CPF9841 error,
CPF9841 Override not found at specified level.

I've tried replacing the "OVRSCOPE(*JOB)" with "OPNSCOPE(*JOB)" and with "OVRSCOPE(*JOB) OPNSCOPE(*JOB)", with no change to the result -- it still ignores the waitrcd(*immed) and hangs for 60 seconds on the chain.

What am I missing here?

If it helps, code is at http://code.midrange.com/3354d15a07.html and
http://code.midrange.com/60a1ce8920.html

Many thanks,
Michael Koester


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.