Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Repositioning a DB File

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

  • Repositioning a DB File

    CL does not do database work very well at all, although it is a bit better under V5R3. I make it a rule to do all database I/O in an HLL like RPG. --buck

  • #2
    Repositioning a DB File

    In addition to Buck's advice, I think that the reason this happens is that the RCVF does an implicit OPEN. The Override should happen before the File is Open and it sounds like it does for the First Read. But Once the File is Opened, you can Override until you're Blue-in-the-Face and your Program is not going to "See" the Override. You need to close the File first. So in an RPG Pgm, the File Open would have to be User Controlled. You would: Do the Override Open the File Process Close the File Delete the Override But I don't think that there is any way to control the File Open and Close in a CL Program when using the RCVF command. The only way that I'm aware to Close and re-Open the File would be to End the Program and then Call again. Mike

    Comment


    • #3
      Repositioning a DB File

      I have a CLP that retrieves a database record based on user input by performing an OVRDBF Position by key. I perform a RCVF and monitor for messages CPF0864 and CPF4137. I know if CPF0864 occurs, the file cannot be repositioned. Is the same true for CPF4137? I'm attempting to give the user an error message and allow them to re-enter correct data. However, when I perform another OVRDBF command, the program simply reads the next record based on the first override. I've tried to use the SECURE(*YES) parameter on the OVRDBF without success. I'd rather not have to rewrite this entire program in RPG, but it appears that I may have to do just that.

      Comment


      • #4
        Repositioning a DB File

        Try using Position Data Base File (POSDBF) command.

        Comment

        Working...
        X