ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Ovrdbf + opnqry + read(e)

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

  • Ovrdbf + opnqry + read(e)

    Hello

    I got a CLLE OVRDBF + OPNQRY file

    OVRDBF FILE(FILE) OVRSCOPE(*CALLLVL) SHARE(*YES) SEQONLY(*NO)

    OPNQRYF FILE((FILE)) OPTION(*INP) FORMAT(FILE) +
    QRYSLT(' FIELD1 < 0 *AND FIELD2 *LT (' +
    *CAT &VAR1 *CAT ') +
    KEYFLD((FILE3)) OPNSCOPE(*ACTGRP)​

    In the RPGLE

    I GOT
    C read(e) rfile
    C dow not %eof
    C* Do something
    C call PGMA
    C* If condicion A
    C If cond = 'A'
    C* Update the record
    C call PGMB
    C endif
    C read(e) rfile
    C end

    When the record goes to PGMB, the read(e) is reading the same record, why?

  • #2
    PS: the format of the file is RFILE isn't FILE, does that causes the error?

    Comment


    • #3
      I've had this problem because of the activation groups. Try using *JOB for your OPNSCOPE and OVRSCOPE.

      Comment

      Working...
      X