Although often functional, the given methodology is not a generally 
valid approach.  The given approach fails for a VIEW over a VIEW.  The 
SQL DROP with CASCADE clause will avoid that issue.  Regardless, the 
code [for that method] is rather trivial [both with no error handling 
and assuming no files are being added concurrently]:
<code>
   pgm parm(&librname)
    dcl &librname *char 10          /* input library name      */
    dcl &outfname *char 10 fdbasatr /* outfile name in QTEMP   */
    dclf qafdbasi /* model output file for DSPFD TYPE(*BASATR) */
    dspfd &librname/*all *basatr fileatr(*pf) output(*outfile) +
         outmbr(*first *replace) outfile(qtemp/&outfname)
    dspfd &librname/*all *basatr fileatr(*lf) output(*outfile) +
         outmbr(*first *add    ) outfile(qtemp/&outfname)
    ovrdbf qafdbasi qtemp/&outfname ovrscope(*calllvl)
    procoutf:
     rcvf
     monmsg cpf0864 exec(goto lastfile)
     dltf &librname/&atfile system(*lcl) rmvcst(*rmv)
     goto procoutf
    lastfile:
     return
   endpgm
</code>
Regards, Chuck
Janice Chester wrote:
Jim,
Would you email me your sample code?
Jim Essinger wrote:
<<SNIP>>
2) Create a utility program that will;
* List all logical file names to a physical file
* Read Loop thru the file deleting the files
* List all Physical file names to a physical file
* Read loop thru the file deleting the files
I may have some sample code if you would like to see it.
As an Amazon Associate we earn from qualifying purchases.
	
 
This mailing list archive is Copyright 1997-2025 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.