I am trying to write a CLIST which involves reading a file and manipulating the file contents. When end of file is reached, execution stops with RC=E400. How can I handle this?
Thanks in advance,
Sowmya.
You should have a generic ERROR block early in your code. It has been so long since I actually wrote CLIST I no longer recall exactly the syntax, but I -think- it went something like this:
Code:
ON ERROR
SET &SAVERC = &COND
RETURN
END
and handle ALL retrun codes in-line, so you would
Code:
GETFILE STUFF
IF &SAVERC = 400 THEN GOTO ENDSTUFF /* EOF
If you're currently writing CLIST, you should be able to correct my syntactical errors, but I have to second KRD's tongue-in-cheek remark: give it up; switch to REXX.
Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.