View previous topic :: View next topic
|
Author |
Message |
Vidya Kajale
New User
Joined: 01 Jun 2010 Posts: 43 Location: India
|
|
|
|
How to check file status in easytrive while reading flat file.
I want to do ...
If status = 0 then perform required. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have you looked in the manual? Searched this forum for FILE-STATUS? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
FILE-STATUS is not for flat files. It is used for ISAM/VSAM/DLI/SQL processing. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
To expand on what Peter has said:
If you have JOB INPUT filename, and filename is VSAM, don't bother checking the FILE-STATUS. Easytrieve is doing all that for you automatically. Unless, of course, you POINT to particular parts of the file, so do the check on the status after POINT. Or WRITE.
Don't know about the other types, not used them. I guess the manual would say, but I'm not going to look it up.
If you have JOB INPUT filename, and filename is "flat", again, nothing to check.
If you are doing controlled reads (GET) of a "flat" file, you use EOF to determin end-of-file, not FILE-STATUS. PUT will not return to your program if it has failed to write a record. |
|
Back to top |
|
|
|