View previous topic :: View next topic
|
Author |
Message |
Gayathri P
New User
Joined: 07 Oct 2011 Posts: 16 Location: India
|
|
|
|
hi , I am reading a Sequential file in Eazytrieve . After each record is read
am checking EOF , if EOF is reached trying to display some values. But am not getting these Displays even after the EOF is reached .
Impacted code :
Job input file1
If EOF file1
display 'bye'
STOP
else
display 'hi'
end-if
Whereas the displays are working when given in FINISH module
Job input file1 finish sr-finish
sr-finish. proc
display 'bye'
end-proc
Can anyone help me with an answer for why it dint work in the first place but in the later?? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You are never going to get EOF in the body of the code with automatic file processing (JOB INPUT filename).
Code a FINISH procedure for what you want to do after file has ended.
It's all in the manual.
And post in the CA part of the forum next time, please. |
|
Back to top |
|
|
Gayathri P
New User
Joined: 07 Oct 2011 Posts: 16 Location: India
|
|
|
|
Thanks for your reply , will post in CA for next new-topic.
As I mentioned I had already adopted FINISH method of displaying .
Am asking for the explanation you could help me with . If not I would like to know which manual you refer to .
thanks in advance |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
There is a big difference between
Code: |
JOB INPUT NULL
and
JOB INPUT filename |
With the former you have to obtain the records and cause the processing to cease when you know there are no more records. So you test for EOF and use STOP. STOP causes the FINISH procedure to be executed.
With the latter, Easytrieve does all the processing and does an implicit STOP at end of file for your input file. So you never get to see EOF for the automatic input as Easytrieve has already done the implied STOP.
EDIT: As to the manual, you should be able to locate one if your site is licensed to use the product. There is a Reference (most useful) and a User Guide and other bits and pieces that exist but which your site may not use or may not let you have access to. |
|
Back to top |
|
|
Gayathri P
New User
Joined: 07 Oct 2011 Posts: 16 Location: India
|
|
|
|
I got it .. thanks for your Help |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If your organization is licensed to use the product, all of the material may be downloaded free from CA Support. |
|
Back to top |
|
|
|