|
Possibly I'm misunderstanding your code, but.... It strikes me that the OVRDBF is being done on WHP3530. This will get the SHARE(*YES). The OPNQRYF is being done against WHP35, which has no OVRDBF against it. Therefore it will have all its defaults - including SHARE(*NO). How about doing the OVRDBF against WHP35?, or changing the OPNQRYF to run against WHP3530? Either way, I feel you need the OPNQRYF & OVRDBF to be against the same file. ajeffery@bacardi.com on 08/05/2001 22:19:04 Please respond to RPG400-L@midrange.com To: RPG400-L@midrange.com cc: (bcc: STEVEN J RYAN/DIAU) Subject: OPNQRYF - ODP Error I'm receiving the following error within an OPNQRYF command. CPF4205 - Shared Open not allowed for query. I have tested the program in a Test environment without any problems whatsoever however the above error occurs as soon as the program is processed in the Live environment, any ideas? /** Set-up Override For Open Query File **/ OVRDBF FILE(WHP3530) TOFILE(*LIBL/WHP35) SECURE(*YES) SHARE(*YES) /** Find Available Active Stock Within the Primary & Secondary Areas ** CHGVAR VAR(&SEL) VALUE('(CONO35 *EQ "' || &L#CONO || '") *AND + (STRC35 *EQ "' || &A#STRC || '") *AND + (PNUM35 *EQ "' || &W#PNUM || '") *AND + (SAVL35 *GT 0) *AND + (STAT30 *EQ "1") *AND + (AREA30 *EQ "' || &W#PARA || '") + *OR + (CONO35 *EQ "' || &L#CONO || '") *AND + (STRC35 *EQ "' || &A#STRC || '") *AND + (PNUM35 *EQ "' || &W#PNUM || '") *AND + (SAVL35 *GT 0) *AND + (STAT30 *EQ "1") *AND + (AREA30 *EQ "' || &W#SARA || '")') /** Determine Area Sequencing **/ IF COND(&W#PARA *GE &W#SARA) THEN(DO) /** Process Query By Descending Area **/ OPNQRYF FILE((*LIBL/WHP35) (*LIBL/WHP30)) + FORMAT(*LIBL/WHP3530) QRYSLT(&SEL) + KEYFLD((WHP35/CONO35) + (WHP35/STRC35) + (WHP35/PNUM35) + (WHP35/DTRT35) + (WHP30/AREA30 *DESCEND) + (WHP35/LOCN35)) + JFLD((WHP35/CONO35 WHP30/CONO30) + (WHP35/STRC35 WHP30/STRC30) + (WHP35/LOCN35 WHP30/LOCN30)) + SEQONLY(*NO) ENDDO ELSE CMD(DO) /** Process Query By Ascending Area **/ OPNQRYF FILE((*LIBL/WHP35) (*LIBL/WHP30)) + FORMAT(*LIBL/WHP3530) QRYSLT(&SEL) + KEYFLD((WHP35/CONO35) + (WHP35/STRC35) + (WHP35/PNUM35) + (WHP35/DTRT35) + (WHP30/AREA30 *ASCEND) + (WHP35/LOCN35)) + JFLD((WHP35/CONO35 WHP30/CONO30) + (WHP35/STRC35 WHP30/STRC30) + (WHP35/LOCN35 WHP30/LOCN30)) + SEQONLY(*NO) ENDDO CALL PGM(WWH495) CLOF OPNID(WHP35) DLTOVR FILE(WHP3530) RETURN Thanks in advance Andy J +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.