ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Error when accessing a File in Free Format

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

  • Error when accessing a File in Free Format

    Hello All,

    I am facing a weird error. I am reading a file in Free Format. I am using SETLL and READE. Then until EoF I am doing some processing. But the strange thing is that, even if there is only one record in this file, the processing is happening multiple times.

    Could anybody please assist me.

  • #2
    There isn't much information here. The more information you provide, the more likely that someone will be able to help you.

    Comment


    • #3
      Just a shot in the dark - but my guess is that the SETLL is inside the loop...

      Comment


      • #4
        As Scott said, it would be helpful to post the relevant code to try to diagnose the problem. That said, it sounds like your SETLL opcode is inside of the loop, so each iteration will restart at the first record.

        Comment


        • #5
          Another possibility is that there's an UPDATE in the processing part of the loop. If the UPDATE changes a key field, the same record could come back again.

          Comment

          Working...
          X