Direct matching reports with the FNDSTRPDM command

Direct matching reports with the FNDSTRPDM command

Is there any way to directly match reports generated by the FNDSTRPDM command to a physical file?

One way is to read the spool with in the program, but this creates confusion because there are two reports generated by this command. I don't have the Spool file number looping around all the spool files. It might be possible, but it becomes very complex.


    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts including news, tips, and advice to help you do your job more efficiently and effectively. Stay informed on the hottest topics and biggest challenges faced by IT professionals working with iSeries products and services.

    By submitting your registration information to Search400.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of Search400.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

The FNDSTRPDM doesn't have to print two reports unless you want it to. You could easily accomplish what you are trying to by doing the FNDSTRPDM in a CL program. By using overrides and the *LAST option on the CPYSPLF and the DLTSPLF commands, you can easily manage your spool files without having to do complex looping through a lot of spool files. Here is an example piece of CL code that illustrates what I'm talking about.

 
 
OVRPRTF    FILE(QPUOPRTF) HOLD(*YES)         
     
FNDSTRPDM STRING(&STRING) FILE(MYLIB/QRPGLESRC) MBR(*ALL) OPTION(*NONE) PRTMBRLIST(*ALL) PRTRCDS(*ALL)   
  
CPYSPLF    FILE(QPUOPRTF) TOFILE(MYLIB/MYFILE)  SPLNBR(*LAST) 
                       
DLTSPLF    FILE(QPUOPRTF) SPLNBR(*LAST)     

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


This was first published in April 2003