Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

OVRDBF in RPGLE

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

  • OVRDBF in RPGLE

    Gary, Your problem is in the activation group. Overrides do not cross activation group boundaries, unless the scope is changed. To be sure your override is done, change your ovrdbf statement as follows: OVRDBF FILE(ADDRBOOKL2) MBR(&USERID) OVRSCOPE(*CALLLVL) SHARE(*YES) This should fix your problem. Lee

  • #2
    OVRDBF in RPGLE

    Hi Gary: I believe your problem is that when the CLP ends that the override is removed. I would change the code to call qcmdexc and pass the ovrdbf command with the specific's filled in. This will cause the override to be in place as your program object is running and I think does not cause as large a performance hit on the system as the dynamic call to a seperate ile program. Bentley Pearson Genesis Expert Systems, Inc bpearson@xocommerce.com

    Comment


    • #3
      OVRDBF in RPGLE

      Thanks for your help. I know it will work if I do overrides in RPGLE, but I want to learn how to do it in CLLE also. I tried OVRDBF FILE(ADDRBOOKL2) MBR(&USERID) OVRSCOPE(*CALLLVL) SHARE(*YES) and compiled both programs with activation group EMAILAG, it is still not working. Any other suggestions ? Thanks so much. Gary

      Comment


      • #4
        OVRDBF in RPGLE

        Are you 'still' coding the clle program with a ENDPGM? If so, I think that is your problem. Change it to RETURN. Just remember to reclaim the storage when the 'caller' program is done. I think this will cure your issue. Bentley Pearson

        Comment


        • #5
          OVRDBF in RPGLE

          Gary, I had a similiar problem and found OVRSCOPE(*JOB) worked. Bill

          Comment


          • #6
            OVRDBF in RPGLE

            INSTEAD OF CALL 'EMAIL01CL2' , TRY TO CALL QCMDEXC,THAT WILL CALL 'EMAIL01CL2' .I HOPE IT WILL WORK.

            Comment


            • #7
              OVRDBF in RPGLE

              Hi, guys I have a problem with OVRDBF. In ILE I have LF: FAddrBookL2IF E K Disk F UsrOpn This file has multiple members. Based on my screen selections I have to override this file to either *First member or Specific member. (UserId) RPGLE Close AddrBookL2 If CheckMode = 'C' MoveL '*FIRST' P#Member Call 'EMAIL01CL2' Parm P#Member Else Call 'EMAIL01CL2' Parm *Blanks P#Member EndIf Open AddrBookL2 __________________________________________________ __________ CLLE EMAIL01CL2: Pgm Parm(&UserID) Dcl Var(&UserID ) Type(*Char) Len(10) If Cond(&UserID *Eq ' ') Then(Do) RtvJobA User(&UserID) EndDo DltOvr File(ADDRBOOKL2) MonMsg MsgId(CPF9841) OVRDBF FILE(ADDRBOOKL2) MBR(&USERID) SHARE(*YES) EndPgm __________________________________________________ ________ CL works fine, but as soon as “Open AddrBookL2“ statement executed file is open with *first member. I always thought, that OVRDBF should work within one job>>>>> What am I doing wrong ? What am i Missing ? I think the problem with Activation Group/Override Scope, But how do I fix it ? Thanks in advance Gary

              Comment


              • #8
                OVRDBF in RPGLE

                Thank you all, I will try again return did not work I already tried that. thanks again Gary

                Comment

                Working...
                X