1. tsunami question

I don't see a function to clear a tsunami file w/o deleteing it and
recreating it. Did I over look this? I have a lot of files that are cleared
at the end of the month or year as well as transaction files that need to be
cleared after being posted.

george

new topic     » topic index » view message » categorize

2. Re: tsunami question

Ron, I understand the Create function, but using this you have do define all
over again the characteristics of the file. I was hoping that a function
existed that would simply clear the file and retain it's original
characteristics.

george

----- Original Message -----
From: "Ron Austin" <ronaustin at alltel.net>
To: <EUforum at topica.com>
Sent: Wednesday, December 17, 2003 12:20 PM
Subject: RE: tsunami question


>
>
> George Walters wrote:
> >
> >
> > I don't see a function to clear a tsunami file w/o deleteing it and
> > recreating it. Did I over look this? I have a lot of files that are
> > cleared
> > at the end of the month or year as well as transaction files that need
> > to be
> > cleared after being posted.
> >
> > george
> > when you create a file using trm_Create("my.dat",flag), if flag=1 then
> > you can re-create and clear the file.  If flag=0 and you try to recreate
> > the file you get a warning message.  If you used flag=1 then you could
> > write an include file with procedure that would re-create and clear the
> > file.  You don't have to erase the file first.
> >
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: tsunami question

Ron, there was some interesting code (power basic) on the TRM website on
this issue.


 ' Open the existing Tsunami file

 MultiUser& = %FALSE
 File$      = "C:\My Data\Customers.dat"

 hFile& = trm_Open(File$, MultiUser&)

 IF hFile& < 1 THEN
    Msg$ = "Error opening file:" + STR$(ABS(hFile&))
    ' Display message

 ELSE
    ' File opened successfully
    ' Get it's File Definition string

    FileDef$ = trm_GetFileDef(hFile&)

    ' Close the file so it can be recreated

    Result& = trm_Close(hFile&)

    IF Result& THEN
       Msg$ = "Error closing file:" + STR$(Result&)
       ' Display message

    ELSE
       ' The file is closed... we can now recreate it using the
       ' file's original name and original File Definition string

       OverWrite& = %TRUE

       Result& = trm_Create(File$, FileDef$, OverWrite&)

       IF Result& THEN
          Msg$ = "Error recreating file:" + STR$(Result&)
          ' Display message
       ELSE
          ' File recreated successfully
       END IF

    END IF
 END IF


----- Original Message -----
From: "Ron Austin" <ronaustin at alltel.net>
To: <EUforum at topica.com>
Sent: Wednesday, December 17, 2003 1:26 PM
Subject: RE: tsunami question


>
>
> George Walters wrote:
> >
> >
> > Ron, I understand the Create function, but using this you have do define
> > all
> > over again the characteristics of the file. I was hoping that a function
> > existed that would simply clear the file and retain it's original
> > characteristics.
> >
> > george
> >
> As far as I know, there is no "clear file". I have made an "init.exw
> program for each of my files, for instance DiagInit.exw creates the
> Diagnosis.dat file.  There is one line to define the file, two lines to
> create the two indexes and then the final line creates (or re-creates
> the file).  Since the init program had to be written to initally create
> the file, all you have to do is run it again to clear the file, or as I
> said earlier maybe it wood be good to put the procedure for creating all
> the indexes in one include file and call them as needed.
> ClearFile("Diagnosis.dat") or even CLearFile("Diagnosis") is all you
> would need.  Of course you would still have to be sure no one was using
> the file when you cleared it.  I imagine you are already doing that with
> your present file system anyway.
> > ----- Original Message -----
> > From: "Ron Austin" <ronaustin at alltel.net>
> > To: <EUforum at topica.com>
> > Sent: Wednesday, December 17, 2003 12:20 PM
> > Subject: RE: tsunami question
> >
> >
> > > George Walters wrote:
> > > >
> > > >
> > > > I don't see a function to clear a tsunami file w/o deleteing it and
> > > > recreating it. Did I over look this? I have a lot of files that are
> > > > cleared
> > > > at the end of the month or year as well as transaction files that
need
> > > > to be
> > > > cleared after being posted.
> > > >
> > > > george
> > > > when you create a file using trm_Create("my.dat",flag), if flag=1
then
> > > > you can re-create and clear the file.  If flag=0 and you try to
recreate
> > > > the file you get a warning message.  If you used flag=1 then you
could
> > > > write an include file with procedure that would re-create and clear
the
> > > > file.  You don't have to erase the file first.
> > > >
> > >
> > > TOPICA - Start your own email discussion group. FREE!
> > >
> > >
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: tsunami question

Next problem, I've created all the files and now am trying to open one to
populate it and am getting this long message that it's not a file created
with trm or the header is corrupted or created by a different dll version.
Any Ideas??

george

----- Original Message -----
From: "Ron Austin" <ronaustin at alltel.net>
To: <EUforum at topica.com>
Sent: Wednesday, December 17, 2003 2:51 PM
Subject: RE: tsunami question


>
>
> That's interesting George, but I believe it assumes you are using the
> "String based API"  and Euman used the "Pointer based API #1".
>
> I don't think there is a way of passing a filedef when creating the file
> with the pointer base api.
>
> string  API: result= trmCreate(file$,FileDef$,OverWrite)
> pointer API: result= trmCreate(file,OverWrite)
>
> pointer based assumes the filedef has already been defined.
>
> Maybe Euman will have a different answer, but that's the way I see it.
>
>
> George Walters wrote:
> >
> >
> > Ron, there was some interesting code (power basic) on the TRM website on
> > this issue.
> >
> >
> >  ' Open the existing Tsunami file
> >
> >  MultiUser& = %FALSE
> >  File$      = "C:\My Data\Customers.dat"
> >
> >  hFile& = trm_Open(File$, MultiUser&)
> >
> >  IF hFile& < 1 THEN
> >     Msg$ = "Error opening file:" + STR$(ABS(hFile&))
> >     ' Display message
> >
> >  ELSE
> >     ' File opened successfully
> >     ' Get it's File Definition string
> >
> >     FileDef$ = trm_GetFileDef(hFile&)
> >
> >     ' Close the file so it can be recreated
> >
> >     Result& = trm_Close(hFile&)
> >
> >     IF Result& THEN
> >        Msg$ = "Error closing file:" + STR$(Result&)
> >        ' Display message
> >
> >     ELSE
> >        ' The file is closed... we can now recreate it using the
> >        ' file's original name and original File Definition string
> >
> >        OverWrite& = %TRUE
> >
> >        Result& = trm_Create(File$, FileDef$, OverWrite&)
> >
> >        IF Result& THEN
> >           Msg$ = "Error recreating file:" + STR$(Result&)
> >           ' Display message
> >        ELSE
> >           ' File recreated successfully
> >        END IF
> >
> >     END IF
> >  END IF
> >
> >
> > ----- Original Message -----
> > From: "Ron Austin" <ronaustin at alltel.net>
> > To: <EUforum at topica.com>
> > Sent: Wednesday, December 17, 2003 1:26 PM
> > Subject: RE: tsunami question
> >
> >
> > > George Walters wrote:
> > > >
> > > >
> > > > Ron, I understand the Create function, but using this you have do
define
> > > > all
> > > > over again the characteristics of the file. I was hoping that a
function
> > > > existed that would simply clear the file and retain it's original
> > > > characteristics.
> > > >
> > > > george
> > > >
> > > As far as I know, there is no "clear file". I have made an "init.exw
> > > program for each of my files, for instance DiagInit.exw creates the
> > > Diagnosis.dat file.  There is one line to define the file, two lines
to
> > > create the two indexes and then the final line creates (or re-creates
> > > the file).  Since the init program had to be written to initally
create
> > > the file, all you have to do is run it again to clear the file, or as
I
> > > said earlier maybe it wood be good to put the procedure for creating
all
> > > the indexes in one include file and call them as needed.
> > > ClearFile("Diagnosis.dat") or even CLearFile("Diagnosis") is all you
> > > would need.  Of course you would still have to be sure no one was
using
> > > the file when you cleared it.  I imagine you are already doing that
with
> > > your present file system anyway.
> > > > ----- Original Message -----
> > > > From: "Ron Austin" <ronaustin at alltel.net>
> > > > To: <EUforum at topica.com>
> > > > Sent: Wednesday, December 17, 2003 12:20 PM
> > > > Subject: RE: tsunami question
> > > >
> > > >
> > > > > George Walters wrote:
> > > > > >
> > > > > >
> > > > > > I don't see a function to clear a tsunami file w/o deleteing it
and
> > > > > > recreating it. Did I over look this? I have a lot of files that
are
> > > > > > cleared
> > > > > > at the end of the month or year as well as transaction files
that
> > need
> > > > > > to be
> > > > > > cleared after being posted.
> > > > > >
> <snip>
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: tsunami question

Ron, it seems that using trm_GetFileDef(handle) crashes exw.exe. Have you
tried using it?

george

----- Original Message -----
From: "George Walters" <gwalters at sc.rr.com>
To: <EUforum at topica.com>
Subject: Re: tsunami question


>
>
> Next problem, I've created all the files and now am trying to open one to
> populate it and am getting this long message that it's not a file created
> with trm or the header is corrupted or created by a different dll version.
> Any Ideas??
>
> george
>
> ----- Original Message -----
> From: "Ron Austin" <ronaustin at alltel.net>
> To: <EUforum at topica.com>
> Sent: Wednesday, December 17, 2003 2:51 PM
> Subject: RE: tsunami question
>
>
> > That's interesting George, but I believe it assumes you are using the
> > "String based API"  and Euman used the "Pointer based API #1".
> >
> > I don't think there is a way of passing a filedef when creating the file
> > with the pointer base api.
> >
> > string  API: result= trmCreate(file$,FileDef$,OverWrite)
> > pointer API: result= trmCreate(file,OverWrite)
> >
> > pointer based assumes the filedef has already been defined.
> >
> > Maybe Euman will have a different answer, but that's the way I see it.
> >
> >
> > George Walters wrote:
> > >
> > >
> > > Ron, there was some interesting code (power basic) on the TRM website
on
> > > this issue.
> > >
> > >
> > >  ' Open the existing Tsunami file
> > >
> > >  MultiUser& = %FALSE
> > >  File$      = "C:\My Data\Customers.dat"
> > >
> > >  hFile& = trm_Open(File$, MultiUser&)
> > >
> > >  IF hFile& < 1 THEN
> > >     Msg$ = "Error opening file:" + STR$(ABS(hFile&))
> > >     ' Display message
> > >
> > >  ELSE
> > >     ' File opened successfully
> > >     ' Get it's File Definition string
> > >
> > >     FileDef$ = trm_GetFileDef(hFile&)
> > >
> > >     ' Close the file so it can be recreated
> > >
> > >     Result& = trm_Close(hFile&)
> > >
> > >     IF Result& THEN
> > >        Msg$ = "Error closing file:" + STR$(Result&)
> > >        ' Display message
> > >
> > >     ELSE
> > >        ' The file is closed... we can now recreate it using the
> > >        ' file's original name and original File Definition string
> > >
> > >        OverWrite& = %TRUE
> > >
> > >        Result& = trm_Create(File$, FileDef$, OverWrite&)
> > >
> > >        IF Result& THEN
> > >           Msg$ = "Error recreating file:" + STR$(Result&)
> > >           ' Display message
> > >        ELSE
> > >           ' File recreated successfully
> > >        END IF
> > >
> > >     END IF
> > >  END IF
> > >
> > >
> > > ----- Original Message -----
> > > From: "Ron Austin" <ronaustin at alltel.net>
> > > To: <EUforum at topica.com>
> > > Sent: Wednesday, December 17, 2003 1:26 PM
> > > Subject: RE: tsunami question
> > >
> > >
> > > > George Walters wrote:
> > > > >
> > > > >
> > > > > Ron, I understand the Create function, but using this you have do
> define
> > > > > all
> > > > > over again the characteristics of the file. I was hoping that a
> function
> > > > > existed that would simply clear the file and retain it's original
> > > > > characteristics.
> > > > >
> > > > > george
> > > > >
> > > > As far as I know, there is no "clear file". I have made an "init.exw
> > > > program for each of my files, for instance DiagInit.exw creates the
> > > > Diagnosis.dat file.  There is one line to define the file, two lines
> to
> > > > create the two indexes and then the final line creates (or
re-creates
> > > > the file).  Since the init program had to be written to initally
> create
> > > > the file, all you have to do is run it again to clear the file, or
as
> I
> > > > said earlier maybe it wood be good to put the procedure for creating
> all
> > > > the indexes in one include file and call them as needed.
> > > > ClearFile("Diagnosis.dat") or even CLearFile("Diagnosis") is all you
> > > > would need.  Of course you would still have to be sure no one was
> using
> > > > the file when you cleared it.  I imagine you are already doing that
> with
> > > > your present file system anyway.
> > > > > ----- Original Message -----
> > > > > From: "Ron Austin" <ronaustin at alltel.net>
> > > > > To: <EUforum at topica.com>
> > > > > Sent: Wednesday, December 17, 2003 12:20 PM
> > > > > Subject: RE: tsunami question
> > > > >
> > > > >
> > > > > > George Walters wrote:
> > > > > > >
> > > > > > >
> > > > > > > I don't see a function to clear a tsunami file w/o deleteing
it
> and
> > > > > > > recreating it. Did I over look this? I have a lot of files
that
> are
> > > > > > > cleared
> > > > > > > at the end of the month or year as well as transaction files
> that
> > > need
> > > > > > > to be
> > > > > > > cleared after being posted.
> > > > > > >
> > <snip>
> >
> >
> > TOPICA - Start your own email discussion group. FREE!
> >
> >
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: tsunami question

nevermind. It gives this message when the file can't be found.....I forgot
to prepend the path.

george

----- Original Message -----
From: "George Walters" <gwalters at sc.rr.com>
To: <EUforum at topica.com>
Subject: Re: tsunami question


>
>
> Next problem, I've created all the files and now am trying to open one to
> populate it and am getting this long message that it's not a file created
> with trm or the header is corrupted or created by a different dll version.
> Any Ideas??
>
> george
>
> ----- Original Message -----
> From: "Ron Austin" <ronaustin at alltel.net>
> To: <EUforum at topica.com>
> Sent: Wednesday, December 17, 2003 2:51 PM
> Subject: RE: tsunami question
>
>
> > That's interesting George, but I believe it assumes you are using the
> > "String based API"  and Euman used the "Pointer based API #1".
> >
> > I don't think there is a way of passing a filedef when creating the file
> > with the pointer base api.
> >
> > string  API: result= trmCreate(file$,FileDef$,OverWrite)
> > pointer API: result= trmCreate(file,OverWrite)
> >
> > pointer based assumes the filedef has already been defined.
> >
> > Maybe Euman will have a different answer, but that's the way I see it.
> >
> >
> > George Walters wrote:
> > >
> > >
> > > Ron, there was some interesting code (power basic) on the TRM website
on
> > > this issue.
> > >
> > >
> > >  ' Open the existing Tsunami file
> > >
> > >  MultiUser& = %FALSE
> > >  File$      = "C:\My Data\Customers.dat"
> > >
> > >  hFile& = trm_Open(File$, MultiUser&)
> > >
> > >  IF hFile& < 1 THEN
> > >     Msg$ = "Error opening file:" + STR$(ABS(hFile&))
> > >     ' Display message
> > >
> > >  ELSE
> > >     ' File opened successfully
> > >     ' Get it's File Definition string
> > >
> > >     FileDef$ = trm_GetFileDef(hFile&)
> > >
> > >     ' Close the file so it can be recreated
> > >
> > >     Result& = trm_Close(hFile&)
> > >
> > >     IF Result& THEN
> > >        Msg$ = "Error closing file:" + STR$(Result&)
> > >        ' Display message
> > >
> > >     ELSE
> > >        ' The file is closed... we can now recreate it using the
> > >        ' file's original name and original File Definition string
> > >
> > >        OverWrite& = %TRUE
> > >
> > >        Result& = trm_Create(File$, FileDef$, OverWrite&)
> > >
> > >        IF Result& THEN
> > >           Msg$ = "Error recreating file:" + STR$(Result&)
> > >           ' Display message
> > >        ELSE
> > >           ' File recreated successfully
> > >        END IF
> > >
> > >     END IF
> > >  END IF
> > >
> > >
> > > ----- Original Message -----
> > > From: "Ron Austin" <ronaustin at alltel.net>
> > > To: <EUforum at topica.com>
> > > Sent: Wednesday, December 17, 2003 1:26 PM
> > > Subject: RE: tsunami question
> > >
> > >
> > > > George Walters wrote:
> > > > >
> > > > >
> > > > > Ron, I understand the Create function, but using this you have do
> define
> > > > > all
> > > > > over again the characteristics of the file. I was hoping that a
> function
> > > > > existed that would simply clear the file and retain it's original
> > > > > characteristics.
> > > > >
> > > > > george
> > > > >
> > > > As far as I know, there is no "clear file". I have made an "init.exw
> > > > program for each of my files, for instance DiagInit.exw creates the
> > > > Diagnosis.dat file.  There is one line to define the file, two lines
> to
> > > > create the two indexes and then the final line creates (or
re-creates
> > > > the file).  Since the init program had to be written to initally
> create
> > > > the file, all you have to do is run it again to clear the file, or
as
> I
> > > > said earlier maybe it wood be good to put the procedure for creating
> all
> > > > the indexes in one include file and call them as needed.
> > > > ClearFile("Diagnosis.dat") or even CLearFile("Diagnosis") is all you
> > > > would need.  Of course you would still have to be sure no one was
> using
> > > > the file when you cleared it.  I imagine you are already doing that
> with
> > > > your present file system anyway.
> > > > > ----- Original Message -----
> > > > > From: "Ron Austin" <ronaustin at alltel.net>
> > > > > To: <EUforum at topica.com>
> > > > > Sent: Wednesday, December 17, 2003 12:20 PM
> > > > > Subject: RE: tsunami question
> > > > >
> > > > >
> > > > > > George Walters wrote:
> > > > > > >
> > > > > > >
> > > > > > > I don't see a function to clear a tsunami file w/o deleteing
it
> and
> > > > > > > recreating it. Did I over look this? I have a lot of files
that
> are
> > > > > > > cleared
> > > > > > > at the end of the month or year as well as transaction files
> that
> > > need
> > > > > > > to be
> > > > > > > cleared after being posted.
> > > > > > >
> > <snip>
> >
> >
> > TOPICA - Start your own email discussion group. FREE!
> >
> >
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

7. Re: tsunami question

Yeah, trm_Rebuild removes spaces of deleted records from the .dat file.
This will decrease the file size.


----- Original Message ----- 
From: "George Walters" <gwalters at sc.rr.com>
To: "euphoria" <EUforum at topica.com>
Subject: tsunami question


> 
> 
> I don't see a function to clear a tsunami file w/o deleteing it and
> recreating it. Did I over look this? I have a lot of files that are cleared
> at the end of the month or year as well as transaction files that need to be
> cleared after being posted.
> 
> george
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu