Hi folks,
I have an application that will make an entry in a secondary log file
only if the primary log file is not available (i.e. network failure).
Once a log file has been opened, I leave it open until the application
ends but, if the primary file has no problems, the secondary file may
never be opened. When the user presses the "Done" button, I use a
"To_File/Execute Close" object to make sure both files have been closed
correctly. No problem, everything works well even if there is no
secondary file.
Recently I decided to allow the operator to change the secondary file's
directory so I provided a file name control input pin to the To_File
object. Unfortunately, Vee acts a little differently under this
condition - if the file doesn't exist, Vee creates it and then, I
assume, closes it. For a number of reasons, I don't want empty data
files being generated. In fact, I don't want empty files of any sort
being generated. Is this a legitimate and desirable Vee "feature"?
I know closing a file was a big deal back in the DOS days. Do I really
need to "execute close" when leaving a Vee application on a Windows 2000
machine?
Barrie
whoi
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
I have an application that will make an entry in a secondary log file
only if the primary log file is not available (i.e. network failure).
Once a log file has been opened, I leave it open until the application
ends but, if the primary file has no problems, the secondary file may
never be opened. When the user presses the "Done" button, I use a
"To_File/Execute Close" object to make sure both files have been closed
correctly. No problem, everything works well even if there is no
secondary file.
Recently I decided to allow the operator to change the secondary file's
directory so I provided a file name control input pin to the To_File
object. Unfortunately, Vee acts a little differently under this
condition - if the file doesn't exist, Vee creates it and then, I
assume, closes it. For a number of reasons, I don't want empty data
files being generated. In fact, I don't want empty files of any sort
being generated. Is this a legitimate and desirable Vee "feature"?
I know closing a file was a big deal back in the DOS days. Do I really
need to "execute close" when leaving a Vee application on a Windows 2000
machine?
Barrie
whoi
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
> Do I really need to "execute
> close" when leaving a Vee
> application on a Windows 2000
> machine?
I would - even if the file is written to frequently. The only reason is
because that's the only way of flushing the cache/buffers I know of (without
getting over involved anyway). If something terrible happens there's less
chance of data loss.
Anyway, you should be able to check for the existence of a file (before
opening it for writing) by using a From File before a To File. Stick an
error pin on the from file. If the file doesn't exist... you know.
I know it's not kosh to fire errors, but sometimes it just makes sense.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".