Hi,
Please can anyone let me know in REXX while reading a file into stack, how can we identify about end of file condition?
Thanks
In REXX, how to know that end of file is reached.
Moderator: mickeydusaor
- Anuj Dhawan
- Founder
- Posts: 2801
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: In REXX, how to know that end of file is reached.
With EXECIO when you receive a non-zero return-code, it should serve what you're looking for. Something on these lines should help you:
Code: Select all
eof = 'no'
DO WHILE eof = 'no'
"EXECIO 1 DISKR INDD"
IF RC = 0 THEN /* read successful*/
DO
PULL record
END
ELSE eof = 'yes'
END
"EXECIO 0 DISKR INDD (FINIS"
EXIT 0
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Re: In REXX, how to know that end of file is reached.
Great - that did work for me.
Thanks for the help!
Thanks for the help!
- Anuj Dhawan
- Founder
- Posts: 2801
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: In REXX, how to know that end of file is reached.
Nice to know that it worked for you.
Thanks for the feedback!
Thanks for the feedback!
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute