READ/CHAIN statement in RPG/Free

0 pts.
Tags:
Development
During program debug, noticed that the READ or CHAIN statement was skipped and not executed in my RPG/Free program. The DELETE statement after the READ or CHAIN then hits an error "Update or Delete in file without prior input operation". Did not hit this error with the same program written in traditional format. What caused the READ or CHAIN statement to be skipped in the free format?
ASKED: June 14, 2005  1:54 PM
UPDATED: June 18, 2008  11:38 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Would only be guessing without seeing the code. Usually you can get this error with a chain or a read to the file name and avoid it with a chain or read to the file format

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Jaicee
    If the logic is exactly the same, you should get the same results. The only thing i can think of is to check very closely (while in debug) what statements are being hit before it jumps over the read/chain opcode. e.g.: read record LR dow *inLR = *OFF . . delete record read record LR enddo should be the same as: read record ; dow not %eof() ; . . delete record ; read record ; enddo ; yes? The only other thing i can think of is to look at the fixed format version and verify that the logic really is the same.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following