Your code is correct for HLL programs. However SQL, Query, and DSPPFM ignore the resultset from OPNQRYF. SQL, Query, and DSPPFM will however retrieve data from the file and member that is specified in the OVRDBF command as per your code below. Andrew McKeown ----- Original Message ----- From: "Jessie Supe" <email@example.com> To: <firstname.lastname@example.org> Sent: Monday, November 18, 2002 10:33 AM Subject: Re: OPNQRYF problem > > In the OVRDBF try using SECURE(*YES) OVRSCOPE(*JOB) and OPNSCOPE(*JOB) > > > > > > > > > ----Original Message Follows---- > From: Gerald.2.Lewis@gsk.com > Reply-To: email@example.com > To: firstname.lastname@example.org > Subject: OPNQRYF problem > Date: Thu, 14 Nov 2002 11:50:06 +0000 > MIME-Version: 1.0 > Received: from linux.midrange.com ([22.214.171.124]) by > mc7-f10.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 14 Nov > 2002 04:24:44 -0800 > Received: from linux.midrange.com (localhost [127.0.0.1])by > linux.midrange.com (8.11.6/8.11.6) with ESMTP id gAECNii27625;Thu, 14 Nov > 2002 06:23:44 -0600 > Received: from gate1.ggr.co.uk (gate1.ggr.co.uk [126.96.36.199])by > linux.midrange.com (8.11.6/8.11.6) with ESMTP id gAECLZV27248for > <email@example.com>; Thu, 14 Nov 2002 06:21:36 -0600 > Received: (uucp@localhost) by gate1.ggr.co.uk; Thu, 14 Nov 2002 12:21:07 GMT > Received: from uk-stv-mhub4.ggr.co.uk(188.8.131.52) by gb-stv-fw3.ggr.co.uk > via smap (V5.5)id xma027726; Thu, 14 Nov 02 12:20:01 GMT > Received: from gbgms02.sb.com ([184.108.40.206]) by mailhub2.ggr.co.uk; Thu, > 14 Nov 2002 12:20:24 GMT > Received: from SBHSNSM1.sb.com (sbhsnsm1 [220.127.116.11])by sb.com (8.8.6 > (PHNE_17135)/8.8.6) with ESMTP id MAA23617for <firstname.lastname@example.org>; Thu, 14 > Nov 2002 12:04:10 GMT > X-Mailer: Lotus Notes Release 5.0.6a January 17, 2001 > Message-ID: <OFA9E075A8.51EE6B55-ON80256C71.004020D9@sb.com> > X-MIMETrack: Serialize by Router on SBHSNSM1/SERVERS/SB_PLC(Release 5.0.6a > |January 17, 2001) at 14/11/2002 12:20:23 > X-MailScanner: Found to be clean > Sender: email@example.com > Errors-To: firstname.lastname@example.org > X-BeenThere: email@example.com > X-Mailman-Version: 2.0.13 > Precedence: bulk > List-Unsubscribe: > <http://lists.midrange.com/cgi-bin/listinfo/bpcs-l>,<mailto:bpcs-l-request@m idrange.com?subject=unsubscribe> > List-Id: SSA's BPCS ERP System <bpcs-l.midrange.com> > List-Post: <mailto:firstname.lastname@example.org> > List-Help: <mailto:email@example.com?subject=help> > List-Subscribe: > <http://lists.midrange.com/cgi-bin/listinfo/bpcs-l>,<mailto:bpcs-l-request@m idrange.com?subject=subscribe> > List-Archive: <http://archive.midrange.com/bpcs-l/> > Return-Path: firstname.lastname@example.org > X-OriginalArrivalTime: 14 Nov 2002 12:24:44.0210 (UTC) > FILETIME=[D0349920:01C28BD8] > > We have a requirement to restrict users to BPCS data by facility (even to > view the data). This level of security is available in a number of programs > (by using authorised Warehouse security, set up in SYS600) but not all of > them. > > We are attempting to use OPNQRYF to override files before calling BPCS > programs, e.g. override FSO and FSO logicals with a selection on Facility, > before calling SFC500D1. In principle it sounds easy but after trying it > out, doing analysis and reading IBM Infocenter documentation I can not get > to the bottom of the problem, of why the file opened by OPNQRYF is not > shared for SQL selection, Query and DSPPFM. > > Below a CL program to illustrate the problem. The program sets up an > OPNQRYF to only select records from file IIM where ICLAS = '61'. The > program then calls 2 programs to print the contents of IIM, before and > after the OPNQRYF command: > > CALL OPNQRYFR (ILE RPG program which prints the IIM file) > CALL OPNQRYFR2 (SQLPRGLE program which DECLARE a cursor for selection > from IIM, and then prints all records found) > > OVRDBF FILE(IIM) SHARE(*YES) > OPNQRYF FILE((IIM)) OPTION(*ALL) QRYSLT('ICLAS = "61"') > > CALL OPNQRYFR > CALL OPNQRYFR2 > > CLOF OPNID(IIM) > DLTOVR FILE(IIM) > > > Before the overwrite database file and open query file CL commands are > executed , both OPNQRYFR and OPNQRYFR2 prints all the IIM records. > > After the overwrite database file and open query file CL commands are > executed , OPNQRYFR only prints records with ICLAS = '61', while > OPNQRYFR2 prints all the IIM records. > > > Also, when OPNQRYF is used from the command line (i.e. not within a CLP), > the query command 'RUNQRY *N IIM' and 'DSPPFM IIM' do not take the OPNQRYF > selection into consideration (does not use the ODP for the FSO file opened > by OPNQRYF?). > > Please help! > > Regards > > > Gerald Lewis > > _______________________________________________ > This is the SSA's BPCS ERP System (BPCS-L) mailing list > To post a message email: BPCS-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/bpcs-l > or email: BPCS-Lemail@example.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/bpcs-l. > > > _________________________________________________________________ > The new MSN 8: advanced junk mail protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > This is the SSA's BPCS ERP System (BPCS-L) mailing list > To post a message email: BPCS-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/bpcs-l > or email: BPCS-Lfirstname.lastname@example.org > Before posting, please take a moment to review the archives > at http://archive.midrange.com/bpcs-l. > >
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.