AnsweredAssumed Answered

vrf - 'Clear File at pre-run' boxes and ticks

Question asked by VRFuser on Jul 20, 1997
At 15:50 18/07/97 METDST, you wrote:
>Stan Bischof wrote:
>> "Gustin, Mike" <> wrote:
>> >
>> > I would appreciate help with this problem.
>> >
>> > I am currently using 3.12 running on windows 3.11. My processor is an
>> > 133MHz Pentium.
>> >
>> > I am using a "To File" object  in my program twice in both cases it is
>> > writting to the same file. The first instance is in my main program
where I
>> > write header information to the file. This instance has the box for
>> > the file at prerun checked. The second instance is in an imported vee
>> > routine.
>> > The box is not checked to clear the file at prerun in that test program.
>> >
>> > When the main program is run and the second instance "To File"  is
>> > the check box for clearing the file is checked off. The orginal program
>> > not have it checked but the imported version is checked to clear.
>> >
>> > How do you fix this problem???
>> Remember that the file system allows exactly _one_ write pointer to
>> a given file from your VEE process. This is not a VEE issue per se
>> but rather is a basic function of the OS and file system.
>> What this means inside VEE is that all the TO FILE objects referring to
>> a given file must share the same pointer. Hence they also must
>> share attributes such as "clear the file at prerun".
>> Now, in your case, just what is the "problem" that needs to get fixed?
>> It sounds like you want your file to be cleared at prerun. And I'm guessing
>> that your imported routine wants to append to the file rather than
>> clearing it? If so you shouldn't have any problems.
>> Another way of looking at this:
>> Your VEE program is writing to exactly one file. You have
>> multiple TO FILE objects. It would make no sense for one of them
>> to say "clear the file at prerun" and another to say
>> "don't clear the file at prerun". Can't have it both ways, given that
>> prerun occurs exactly once!
>> Perhaps I'm missing the point. Please explain further what you are trying
>> to do and what isn't working.
>> regards
>> Stan Bischof
>The above explenation of Stan is clear. Others pointed out to use a To/File
>with a clear action and DON'T have the 'Clear File at pre-run' boxes checked.
>Some remarks from my side:
>  1. Same problems hold for To/From dataset. There is, however no, no
>     'transaction-block'. You always need seperate T0File objects.
>  2. Why is the 'Clear File at pre-run' box still active when you have a
>     pin for the filename attached to the object? Using a Filename input
>     indicates that the filename and so the filepointer too are to be
>     during programm execution. Perhaps it should also be an regular input
>     i.s.o. a control input.
>  3. Why are there differences in the nummer of available control-inputs
>     To/From file and To/From dataset objects. In my oppinion they are
>     the same; ToFrom dataset has additional features for schema/data,
>     in somewhat different behaviour of 'Rewind' and 'Clear'. Why same
names than?
>I once saved  a lot of data through a To Dataset objects in a UserFunction
>the name MyFile on it, but with a FileName control input.  When I wanted to do
>similar measurements some weeks later, I had to build a simple test first.
>This test also used a ToFile object but with 'Clear File at pre-run' box
>(So also the box in the libarie became checked!!!!) When finally starting the
>measurements, I could not append any data to files anymore: the old data was
>I recommend HP to change vee so that behaviour as from above can not occure
>At least you can put warning signs on the object, manuals, etc....
>Remi Tuijtelaars,
>   Philips Semiconductors,  Dev. T&D,   BZ-2.090
>   Gerstweg 2, 6534 AE Nijmegen, The Netherlands
>   tel: +31-24-353-2812     fax: +31-24-353-3160
>    mailto:

I wholly agree with Remi. I would like to add more information about it in
special related to point 2.

Imagine the case of having several to/from file/dataset with the filename as
input pin, some of them from the main program and others from imported
libraries. When they are imported and mixed, all of them will share the same
pointer "clear the file at prerun" if it is included in one of them because
this pointer is added at the beginning and then all the files are "MyFile".
It is because they had not time to load the corresponding and event
different file names.


Juan Carlos Martin
E-mail     :
Phone      : 34-1-3963995
Fax     : 34-1-3963912
Earth Stations Department