AnsweredAssumed Answered

vrf Very intermittent

Question asked by VRFuser on Mar 17, 2006
"Mairs, David" <david.mairs@hp.com> wrote:
> Thanks for your response,
> The "user object" completes but there is no output From the "from
> file", everything to that point works And the selected file name is in
> the "from file" box.

exactly what I would expect-- there's no output since when you enter this routine the file pointer is already at or near the file end -- ehnce nothing more can be read by the "from file"

> I am not sure how to perform your suggestion:
> check the environment that is calling this routine to make sure that
> the pointer is getting reset properly.
> How do I check the pointer is getting reset?

Either explicitly REWIND the file pointer or close/open the file depending upon what you need to do. I'd have to guess at what your overall program does, but for robustness

add a REWIND before your loop starts

add a CLOSE after the loop finishes

That way your loop always starts at the beginning of the file.

Of course if the file is dynamic it may not have 5 lines like you are trying to read.

Since you are reading in a loop, you probably should read one line at a time.
As it is you will lose data unless your file has a multiple of 5 lines.

Stan


--------------------------------------------------------------------------
Stan Bischof  Agilent Technologies  707-577-3994  stan_bischof@agilent.com
--------------------------------------------------------------------------

---
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".

Outcomes