In RPGLE CHAIN and %FOUND

2380 pts.
Tags:
AS/400
AS400 RPGLE
Hi there ! while we using chain with %Found do we need to add else? or else rrn1 chain sfl01 if %found update sfl01 else leave endif is this right ?

Answer Wiki

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

Discuss This Question: 3  Replies

 
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
  • Sureyz
    because im getting, Update or delete in file NM2401DA without prior input operation (C G D F). this error.. when i use the following code.. 1 Do noofp cnt1 eval rrn1 = cnt1 rrn1 chain sfl01 update sfl01 enddo
    2,380 pointsBadges:
    report
  • TomLiotta
    If you cannot absolutely ensure that the CHAIN will always find a record, yes, you should have an IF test for %FOUND(). There isn't enough of the program for me to guess if a record should be found or not. It doesn't show where records were written to sfl01. -- Tom
    125,585 pointsBadges:
    report
  • gfprogrammer

    If you are not going to do anything if the chain does not find a record then you do not need an else.

    250 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