Delete members from multimember physical file

210 pts.
Tags:
CL Program
DSPFD
Physical File
I have to remove members which are were created before six months from two physical files in a single CL program if the member size is reached in physical files. I am creating outfile using DSPFD command and then deleting records that are created before 6 months. EHUBTMP and EHUPTMP will be the temporary outfiles. Physical files from which members to be deleted are EHUB and EHBP. Can someone please give me pseducode for this? In DCLF (declare file) command how should I declare the files ->
DCLF FILE(QTEMP/EHUBTMP) OPNID(EFILE)
DCLF FILE(QTEMP/EHUETMP) OPNID(PFILE)
Or should I use the:
DCLF(QSYS/QAFDMBRL) OPNID(EFILE) for EHUB FILE
DCLF(QSYS/QAFDMBRL) OPNID(PFILE) for EHUP file
Also please help with the DSPFD command to create outfile. I am confused how to use outfiles.(mainly what should I use in DCLF command) Please help. Any help is welcomed. Thanks in advance.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    It's hard to say. If your question covers all requirements, I'd use just a single DCLF and put all member records into it. I can't see a reason to have two DCLFs.
    36,025 pointsBadges:
    report
  • mohit123
    Colud you please provide a pseudo code using one dclf for getting the required changes.
    210 pointsBadges:
    report
  • TheRealRaven
    36,025 pointsBadges:
    report
  • Splat
    Why do you need 2 output files? 

    Using DSPFD FILE([library]/[file]) TYPE(*MBRLIST) OUTPUT(*OUTFILE) OUTFILE([output library]/[output file]) OUTMBR([output file member]) for the 1st file and DSPFD FILE([library]/[file]) TYPE(*MBRLIST) OUTPUT(*OUTFILE) OUTFILE([output library]/[output file]) OUTMBR([output file member] *ADD) for the 2nd (and 3rd or more) seems a simpler approach.
    12,915 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: