• Subject: OPNQRYF run over several files with the same format
  • From: "Prowak, Dave" <DProwak@xxxxxxxxxxxxxxxxx>
  • Date: Tue, 24 Apr 2001 17:34:52 -0400


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
+---

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-2019 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].