Page 1 of 1

How to find the eof in REXX?

Posted: Sun Oct 05, 2014 9:21 pm
by Ashish Jain
Hi,

Please can anyone let me know in REXX while reading a file into stack how can I come to know that the file is at end? Is there some line of codes I've to write for it?

Thanks!

Re: How to find the eof in REXX?

Posted: Sun Oct 05, 2014 10:56 pm
by enrico-sorichetti
check the return code after the EXECIO

Re: How to find the eof in REXX?

Posted: Thu Dec 18, 2014 2:07 pm
by Ashish Jain
And if it's 0 (zero) it's the EOF? Please guide.

Re: How to find the eof in REXX?

Posted: Thu Dec 18, 2014 2:21 pm
by enrico-sorichetti
why not run a couple of simple tests Yourself ?
( displaying the return code after the EXECIO )

or/and look at the manuals starting from
http://www-03.ibm.com/systems/z/os/zos/ ... index.html

Re: How to find the eof in REXX?

Posted: Tue Jan 27, 2015 6:27 pm
by thiele3105
If you make execio * diskr file ( stem a. then the number of lines are in a.0.
Otherwise you read line per line with execio 1 diskr file
then the rc > 0 when eof.

best regards