Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

help in understanding OVRDBF

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

  • help in understanding OVRDBF

    An Override stays in effect for all programs further down the call stack from the point it was issued. So If A calls B and B issues and override then calls C. C will see the override. A will not. Be sure to have B delete the override when you are done with it, as a matter of good housekeeping. There are a lot of little exceptions and twists to this. Are you using Shared open data path? If so, once the file is open, no override will make any difference. Are you using ILE activation groups? That will affect which overrides are seen by which programs. Use the general rule shown above and if the behavior doesn't seem to be working as expected, then let us know and we can dig into your specific situation. Or go ahead and post some code so everyone can see the specifics of your situation.

  • #2
    help in understanding OVRDBF

    Thank you for your quick response! I have been trying to figure this out for days... I am using Shared Open Data path. I am using OPNQRYF also. Do I have to DLTOVR and OVRDBF again so the next OPNQRYF will be in effect? I am not using ILE activation groups. I will try what you suggested.

    Comment


    • #3
      help in understanding OVRDBF

      My usual recommendations is the following pattern... OVRDBF W/Share(*YES) OPNQRYF CALL RPGPGM CLOF DLTOVR Then repeat that sequence for each RPG program being called. Depending on what exactly you are doing there might be some ways to improve on this. But varying from this also risks having the programs interfere with each other. Good luck! Kevin

      Comment


      • #4
        help in understanding OVRDBF

        So, to answer my first question I cannot put the over ride in place for the RPG programs within the calling CL? I would have to place the override within each RPG program, opnqryf, close file, deleter override? Thanks for your help.

        Comment


        • #5
          help in understanding OVRDBF

          I do it this way: OVRDBF SHARE(*YES) OPNQRYF CALL PGMA POSDBF *START CALL PGMB CLOF DLTOVR

          Comment


          • #6
            help in understanding OVRDBF

            Does the OVRDBF stay in effect if issued through a CL for all calls within that CL? Example, I have a CL that calls multiple RPG programs. If I issue the OVRDBF will it stay in effect for all the RPG programs or do I have to issue this command for each program? Note: The RPG programs are executing OPNQRYF to sort the file in the override. I'm just not clear on how the ovrdbf work with calls to other programs. On the other hand if I issue the OVRDBF from and RPG program and call other RPG programs or CL's, does that OVRDBF stay in effect? Thanks for your help in this..... Sherri Phoenix AZ

            Comment

            Working...
            X