ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

OVRDBF problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OVRDBF problem

    Hi,

    I have some code in a program , the process of which is as follows:

    --- LOOP ------

    Add a new member (for instance M1) to a file F1

    override the member M1

    copy data from a spool file to the member M1

    RCVF from member M1 and process records till end

    On EOF, go to LOOP again to copy data from another spool file to and read the new member M2 and so on...

    When there are no more spools , the process terminates...

    The problem I faced in the loop above is that after the override to a new member every time the RCVF is retrieving data from the first member only but not from the latest overridden member. How can this problem be solved?

    Thanks

  • #2
    Re: OVRDBF problem

    r u performing dltovr after the first member over..?

    Comment


    • #3
      Re: OVRDBF problem

      Hello,

      i think the best way is to create an additional CLP which is doing the OVRDBF/DLTOVR in a Loop and from there then call your CLP for copying (RCVF) the datas.

      kuempi

      Comment


      • #4
        Re: OVRDBF problem

        Originally posted by kuempi View Post
        Hello,

        i think the best way is to create an additional CLP which is doing the OVRDBF/DLTOVR in a Loop and from there then call your CLP for copying (RCVF) the datas.

        kuempi

        Exactly what I was going to suggest.

        Comment


        • #5
          Re: OVRDBF problem

          Hi Pavan,

          I remeber using the DLTOVR and also when the next override is done, as far as my knowledge goes, the earliar overide is removed.

          Thank you for your help.

          Hi kuempi,

          Yes kuempi, thats what I did finally and resolved the problem for this issue when we implemented the code a few days back.

          I have separated the member creation code into a one module which would be called by the main program. And after the creation of one member another module is called to override, add the spool data to the member and process it. Next the control comes back to the main program and it again calls the member creating module then again the overriding module. and so on..

          This reorganization of code worked for me at that time but the question remained in my mind why it did not work in my earliar process where I had all the code as a single unit in a single program.

          Help me with any answers please.

          Thanks.

          Comment

          Working...
          X