Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intermittent MCH3402 on OPNQRYF

Status
Not open for further replies.

SuzieW

Programmer
Dec 17, 2002
41
GB
Hi

We have a job that runs every night and recently, it has been failing about once a week with MCH3402 on the OPNQRYF.

Here's an extract from the job log when it completes normally:

Code:
OPNQRYF FILE((MHISRYL8)) OPTION(*ALL)QRYSLT('MHAGNT *EQ "39001N" *OR MHAGNT *EQ "37355N" *OR MHAGNT *EQ "23038W"
*OR MHAGNT *EQ "23256L" *OR MHAGNT *EQ "23574K" *OR MHAGNT *EQ "23575W" *OR MHAGNT *EQ "23576L" *OR MHAGNT *EQ "23577X" *OR MHAGNT *EQ "23578N" *OR MHAGNT *EQ "23579E"') KEYFLD(*FILE) OPNSCOPE *JOB)

CPF4028
Open of member MHISRYL8 was changed to SEQONLY(*NO).

CPC4001
Member MHISRYL8 file MHISRYL8 in MUDATA opened.

and here's what we see when it fails:

Code:
OPNQRYF FILE((MHISRYL8)) OPTION(*ALL)QRYSLT('MHAGNT *EQ "39001N" *OR MHAGNT *EQ "37355N" *OR MHAGNT EQ "23038W" 
*OR MHAGNT *EQ "23256L" *OR MHAGNT *EQ "23574K" *OR MHAGNT *EQ "23575W" *OR MHAGNT *EQ "23576L" *OR MHAGNT EQ "23577X" *OR MHAGNT *EQ "23578N" *OR MHAGNT *EQ "23579E"') KEYFLD (*FILE) OPNSCOPE(*JOB)                       

CPF4028
Open of member MHISRYL8 was changed to SEQONLY(*NO).

MCH3402
Tried to refer to all or part of an object that no longer
exists.

Because we do not have 24/7 support, our operators reply to it the next morning with Retry and it completes normally.

Can anyone suggest what might be causing this?

Thanks
Suzie
 
well the error says that what you are refering to in the query is not there. Are you doing some sort of backup or save, that locks the files?? Look for something going on on that day that does not happen any other day..
 
What it is referring to is a permanent logical file so it should exist.

The save/backup jobs run several hours before this job - I don't know of any other jobs using the same object which run at the same time. Jobs are deliberately scheduled to run one after the other to avoid contention.

Could it be something other than a lock?
 
Pls paste here the relevant OVRDBF FILE(MHISRYL8)...
There's maybe something to do with the activation group.

Side note.
You could also shorten the QRYSLT like so
QRYSLT('MHAGNT = %VALUES("39001N" "37355N" ... "23579E"'))

Philippe
 
Suzie,

Did you "cut and paste" accurately??? If so, could your error be syntax related?? How is the statement built (i.e. hard coded or dynamically stringed together)??

The second line of your query statement that fails states...

"*OR MHAGNT *EQ "23256L" *OR MHAGNT *EQ "23574K" *OR MHAGNT *EQ "23575W" *OR MHAGNT *EQ "23576L" *OR MHAGNT EQ "

The very last "EQ" should be "*EQ".

Let us know.

Thanks
 
Hi Mercury

Here's the OVRDBF:

Code:
OVRDBF FILE(MHISRYL8) OVRSCOPE(*JOB) SHARE(*YES)  OPNSCOPE(*JOB)

Thanks for the "%VALUES" tip.

Just for the record, this isn't my code. There's no way I would have hard-coded it like that! It has been working up to now, but my task is to work out why it's suddenly started throwing this error.

HiTechUser - apologies, it was a copy and paste error. It's not a dynamically built OPNQRYF, so the same statement runs when it works and when it fails.

Thanks

Suzie
 
Turns out that the access path had become damaged, which was the root of this particular problem and also caused the jobs to run deathly slowly as it was trying to rebuild itself every time it was accessed.

By creating a new logical, the problem has been resolved.

Thanks for your help

Suzie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top