× 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: disk space analysis with OPNQRYF question
  • From: "Peter Dow" <pcdow@xxxxxxxxx>
  • Date: Tue, 7 Dec 1999 22:52:23 -0800

Title: disk space analysis with OPNQRYF question
Hi Joel,
 
You could create a logical file over the DSPFD outfile with just the fields you are going to populate from the DSPOBJD and use it as the format file. You'd still have to do some mapping, but not just to set up default values.
 
HTH
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax
 
 
----- Original Message -----
Sent: Tuesday, December 07, 1999 8:21 AM
Subject: disk space analysis with OPNQRYF question


I want to build a file of containing the file sizes of each PF and each journal file on our AS/400.  To build this, I need to run DSPFD to an outfile for the PF's, and DSPOBJD to a different outfile for the *JRNRCV files.

Since I want only one pgm to process the outfile, I used OPNQRYF to make the DSPOBJD outfile look like the DSPFD file, and add the journal records to the end.

Is there a better way to do this?  I had to map many fields to blanks and zeros.  Isnt there a way to build a record format in OPNQRYF and use blanks and zeros to fill any fields missing in the input file?   This turns a simply OPNQRYF stmt into an ugly mess!

Any better ideas?  Thanks!

CL code:

            DSPFD      FILE(*ALL/*ALL) TYPE(*MBRLIST) +              
                         OUTPUT(*OUTFILE) OUTFILE(SUPPORTLIB/FDSKHSTW)
                                                                     
            CLOF DSPOBJDOUT                                          
            DSPOBJD    OBJ(*ALL/*ALL) OBJTYPE(*JRNRCV) +             
                         OUTPUT(*OUTFILE) OUTFILE(QTEMP/DSPOBJDOUT)  
            OVRDBF     FILE(DSPOBJDOUT) TOFILE(QTEMP/DSPOBJDOUT) +   
                         SHARE(*YES)                                 
            OPNQRYF    FILE((DSPOBJDOUT)) FORMAT(FDSKHSTW) +         
                         MAPFLD((MLFILE ODOBNM) (MLLIB ODLBNM) +     
                         (MLSIZE ODOBSZ) (MLCDAT '%SST(ODCDAT 5 2) + 
                         *cat %sst(odcdat 1 4)') (MLUDAT +           
                         '%SST(ODUDAT 5 2) *cat %sst(odUdat 1 4)') + 
                         (MLCHGD '%SST(ODLDAT 5 2) *cat +            
                         %sst(odLdat 1 4)') (MLMTXT ODOBTX) +        
                         (MLNAME '" "') (MLNRCD 0) (MLNDTR 0) +      
                         (MLRCEN '" "') (MLRDAT '" "') (MLRTIM '" +  
                         "') (MLFTYP '" "') (MLFILA '" "') (MLMXD +  
                         '" "') (MLFATR '" "') (MLSYSN '" "') +      
                         (MLASP 0) (MLRES '" "') (MLNOMB 0) (MLSEU + 
                          '" "') (MLCCEN '" "') (MLCHGC '" "') +
                          (MLCHGT '" "') (MLSEU2 '" "') (MLUCEN
                          "') (MLUCNT 0) (MLTCEN '" "') (MLTDAT
                          "') (MLSIZ2 0) (MLSTFR '" "'))       
             CPYFRMQRYF FROMOPNID(DSPOBJDOUT) TOFILE(FDSKHSTW) +
                          MBROPT(*ADD) FMTOPT(*MAP)            
                          CLOF DSPOBJDOUT                      
             CLOF DSPOBJDOUT                                   
                                                               
             CALL       PGM(pgma)     /* process PFsize records and journal size records.  */


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.