Setoff EndOfFile and Found built-in functions

110 pts.
Tags:
AS 400
RPGLE
How can we manually setOFF and setON the %Eof and %Found built-in functions on RPGLE? (Without using reading opcodes)
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: 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.
  • ToddN2000
    Not sure why you would want to do that. I never tried it but you might be able to do an eval %EOF *on. There may be other alternatives if we better understood the reason for the request.
    133,675 pointsBadges:
    report
  • TheRealRaven
    I've never tried, but I'd be surprised if those functions had any way at all to recognize their return values as having any kind of input capability. They are functions that return values after all.

    If this capability is needed, then I wouldn't use those directly. I'd store their values in an indicator variable and set that variable to *OFF instead. It never seems to be a good idea to subvert the purpose of a language feature. Later maintenance can be negatively affected.

    A clear use-case could be helpful.
    35,650 pointsBadges:
    report
  • Splat
    I would note that the value returned by the %EOF and %FOUND functions is largely determined by the last input operation & a good reason to include the file name (e.g.: %EOF(Input file name)).

    This is a good explanation of the possible scenarios.
    12,895 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: