AS/400: %Equal and %found

195 pts.
Tags:
AS/400
AS400 opcode
Which are those opcode can be used with this two built in function in different different scenario? Which one should be used with whom? Please explain me, I am quite confused here.
0

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.

Discuss This Question: 7  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.
  • TheRealRaven
    Where is the confusion? That's why the documentation exists. If you want to know if an op-code uses %FOUND or %EQUAL, you just look at the op-code documentation.

    For example, if you want to know if CHAIN uses one or the other, look at the CHAIN documentation in the ILE RPG Reference manual. There it says:

    • You can specify an indicator in positions 71-72 that is set on if no record in the file matches the search argument. This information can also be obtained from the %FOUND built-in function, which returns '0' if no record is found, and '1' if a record is found.
    It does not mention %EQUAL, so that function isn't used for CHAIN.

    On any documentation page in a browser, you can search the page for "found" or "equal" to see if there are any matches.

    36,340 pointsBadges:
    report
  • philpl1jb
    Interview question?
    54,090 pointsBadges:
    report
  • ToddN2000
    I always recommend Googling the IBM programmers reference manual for answers to these type of questions. IT is very helpful to new developers.
    135,305 pointsBadges:
    report
  • hndajad
    Yes
    195 pointsBadges:
    report
  • BibekMajilla
    If it is for interview, then the interviewer is looking for the answer that when you use which of these key words.
    I guess you already know what these key word do.
    Main difference is SETLL + %Found does not involve a read operation. If there is huge data then it is better to do SETLL + %Found and if success then go for read operation.
    90 pointsBadges:
    report
  • philpl1jb
    If it is for interview, then the interviewer is looking for you to think and do research and answer the question to the best of YOUR ability.
    54,090 pointsBadges:
    report
  • ToddN2000
    The interviewer is testing your logical ability to think a problem through. You can learn all the code you want but knowing when to use certain methods takes logical thinking and skill. That will come with time.
    135,305 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.

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

Following

Share this item with your network: