ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

What exactly OVRDBF does

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

  • What exactly OVRDBF does

    My dear friends :

    Would you please tell me What exactly the OVRDBF does....

    Thanks...

  • #2
    Re: What exactly OVRDBF does

    It can do a lot below are some basic examples;


    1)Say you have an interanly defined file in your program.
    PHP Code:
    OVRDBF     FILE(CR311HTOFILE(CB.CR1H)
    CALL CR1H
    DLTOVR FILE
    (CR311H

    2)Say you want to use a differant file (with the same record level) in a program.
    PHP Code:
    OVRDBF     FILE(PAYROLLTOFILE(MYPAYROLL)
    CALL GIVERAISE
    DLTOVR FILE
    (MYPAYROLL
    3)Say you want to use OpnQryF( ug hate old school).
    PHP Code:
    OVRDBF     FILE(OCEANHDR)   TOFILE(OCEANHDRSHARE(*YES)
    OPNQRYF    FILE((OCEANHDR))                          +
               
    QRYSLT('HSTATUS ¬= "C" & HCUST = 08177')  +
               
    KEYFLD((HCUSTREF))                         
               
    QRYSLT('HCUST = 08177')  +                 
    CALL       PGM(AB010R)                          
    CLOF       OPNID(OCEANHDR)                            
    DLTOVR     FILE(*ALL

    4) Say you have a specific member that you want to use
    PHP Code:
    OvrDbf     File(TaRpt0103pToFile(TaRpt0103p) +   
                
    OvrScope(*CallLvl)  Mbr(&PoMember)     
    CALL TaRpt0103
    DltOvr     FILE
    (*ALLLVL(*) 


    These are the basic uses.
    Last edited by DeadManWalks; October 4, 2007, 06:35 AM. Reason: Added Member usage
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: What exactly OVRDBF does

      To be theoritical,
      The OVRDBF is used to

      1) To temporarly change the attributes of a file like member,position of rrn ,sharing the Open Data Path etc....

      2) To Redirect the references made for one file to other file

      Refer Deadmanwalks' examples.



      Thanks
      Laxminarasimha.

      Comment


      • #4
        Re: What exactly OVRDBF does

        My dear friend:

        actually OVRDBF is used for multimember concept.
        a pf having multiple member and u need to access one of the member from that, OVRDBF is used.
        Also, in Cl u can access only 1 file at a time .
        for more than 1 file also OVRDBF is used
        Thanks

        Comment

        Working...
        X