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


  • Subject: Re: OPNQRYF run over several files with the same format
  • From: "James W. Kilgore" <eMail@xxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 24 Apr 2001 21:22:36 -0700
  • Organization: Progressive Data Systems, Inc.

Dave,

From just a quick read of this it appears that you are mapping -only-
the fields from the first file.  I think that as the OPNQRYF processes
each record the the other secondary files, it continues to map the
fields from the first file.

Just a hunch.

Why not just run the CPYFRMQRYF once with *REPLACE and then again for
the remaining 9 files with *ADD?  Also, if they all have the same record
format why are you mapping anything?

"Prowak, Dave" wrote:
> 
> Hi,
> 
> I'm trying to write an OPNQRYF that will apply the same selection criteria
> to 10 physical files, all with the same format.
> i.e. Files: Tax00, Tax99, Tax98, Tax97........
> 
> I want to select all the recs for all of these files such that
> RefDte *NE "0001-01-01".
> 
> Anyone have any sample code that accomplishes this?
> 
> When I do it, the CL loops.....
> And just keeps writing the same record, over and over, and over...
> 
> TIA,
> Dave
> 
> PS Here's the actual code:
>           PGM
> 
>               OVRDBF     FILE(REPOPCITY0) OVRSCOPE(*JOB) SHARE(*YES)
>               OVRDBF     FILE(REPOPCITY9) OVRSCOPE(*JOB) SHARE(*YES)
>               OVRDBF     FILE(REPOPCITY8) OVRSCOPE(*JOB) SHARE(*YES)
>               OVRDBF     FILE(REPOPCOUN0) OVRSCOPE(*JOB) SHARE(*YES)
>               OVRDBF     FILE(REPOPCOUN9) OVRSCOPE(*JOB) SHARE(*YES)
>               OVRDBF     FILE(REPOPCOUN8) OVRSCOPE(*JOB) SHARE(*YES)
> 
>               OPNQRYF    FILE((RESLIB/REPOPCITY0) (RESLIB/REPOPCITY9) +
>                            (RESLIB/REPOPCITY8) (RESLIB/REPOPCOUN0) +
>                            (RESLIB/REPOPCOUN9) (RESLIB/REPOPCOUN8)) +
>                            FORMAT(RESLIB/REPOPCITY0) QRYSLT('REFDATE +
>                            *NE "0001-01-01"') MAPFLD((WARD '1/ward') +
>                            (PROPNO '1/propno') (QTR '1/qtr') +
>                            (TAXYEAR '1/taxyear') (OWNNAME +
>                           '1/ownname') (OWNADDR1 '1/ownaddr1') +
>                           (OWNADDR2 '1/ownaddr2') (OWNADDR3 +
>                           '1/ownaddr3') (ADDR '1/addr') (AMTOWED +
>                           '1/amtowed') (AMTPAID '1/amtpaid') +
>                           (PAIDDATE '1/paiddate') (CLAIM# +
>                           '1/claim#') (LTR#1DATE '1/ltr#1date') +
>                           (LTR#2DATE '1/ltr#2date') (ADVDATE +
>                           '1/advdate') (REFDATE '1/refdate') +
>                           (AMTREF '1/amtref') (STATUS '1/status') +
>                           (AMTOVRPD '1/amtovrpd') (COMMENT1 +
>                           '1/comment1') (COMMENT2 '1/comment2') +
>                           (FILLER '1/filler'))
> 
>              CPYFRMQRYF FROMOPNID(REPOPCITY0) +
>                           TOFILE(TSTLIB/TAXOPALL) MBROPT(*REPLACE) +
>                           CRTFILE(*YES)
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 thread ...

Replies:

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.