PDA

View Full Version : Log all Saves and Deletes -- Missing Records



Curtis Krauskopf
31-Mar-2005, 12:46 AM
My character-mode solution for logging all saves and deletes for a specific
datafile now has a new home:

http://www.decompile.com/dataflex/tips/log_all_save_delete.htm

Good luck and I hope that you can solve your missing record mysteries.

Curtis

Michael Collins
5-May-2005, 11:33 AM
Curtis,

Interesting solution. How much of this is applicable to VDF?

I see we have a FMAC file, but I can't seem to find DFPACK to rebuild it.

If it is possible to rebuild the FMAC in VDF, would it be possible to
modify the SAVE/DELETE logging to log Procedure/Function calls and
Property access? Get/Send/Move etc.

I understand that of course it would be a huge volume of information to
log, but it could be very useful as a debugging utility, tracing program
execution.

Regards,

Mike

starzen
6-May-2005, 12:25 PM
Michael

things like this will work in VDF also but they will not log DD
saves/deletes as they dont use the macros. You will need some additional
code to log these as well in Save_Main_File and Delete_Main_File inside the
base DD class

I didnt look at the solution provided by Curtis but most i have seen so far
do not deal with errors and transactions properly. Especially if a
transaction is in place and a rollback occurs and the logging is done into
an ASCII file

This can cause you to think that DF is 'loosing' records but it really isnt
it is simply backing them out

Again i didnt look at the solution provided so it may not have this issue

--
Michael Salzlechner
StarZen Technologies, Inc
Visual DataFlex Controls, Tools and consulting
http://www.starzen.com

Curtis Krauskopf
10-May-2005, 12:05 AM
Mike,

I have found that the DFPACK in DF3.2 creates flex.cfl files that are
byte-for-byte identical to the flex.cfl provided in the VDF9.1 installation.
I haven't checked any other version of DataFlex (because I don't have any
others loaded right now). Because dfpack is not provided for the VDF
licenses, using a CM 3.2 dfpack is one of those "at your own risk" type of
things.

Yes, I think you could use the same technique for logging
procedure/function/set calls if you were comfortable with the FMAC code
involved. That's an interesting idea and I'll see how hard it is to
implement the next time I need such a solution.

Curtis


"Michael Collins" <mike.diespamdiedie@visusoft.ie> wrote in message
news:Y7umrAZUFHA.1272@dacmail.dataaccess.com...
> Curtis,
>
> Interesting solution. How much of this is applicable to VDF?
>
> I see we have a FMAC file, but I can't seem to find DFPACK to rebuild it.
>
> If it is possible to rebuild the FMAC in VDF, would it be possible to
> modify the SAVE/DELETE logging to log Procedure/Function calls and
> Property access? Get/Send/Move etc.
>
> I understand that of course it would be a huge volume of information to
> log, but it could be very useful as a debugging utility, tracing program
> execution.
>
> Regards,
>
> Mike

Curtis Krauskopf
10-May-2005, 12:22 AM
Michael,

Like most solutions, mine doesn't try to handle transactions either because
the original requestor didn't ask for it and I think it's pretty unusual to
use transactions in procedural code.

Augmenting the begin_Transaction, end_Transaction and abort_Transaction
macros to add appropriate log entries would be pretty easy to do.

Thanks for your observations.

Curtis




"StarZen Technologies" <info@starzen.com> wrote in message
news:511nI9lUFHA.3624@dacmail.dataaccess.com...
> Michael
>
> things like this will work in VDF also but they will not log DD
> saves/deletes as they dont use the macros. You will need some additional
> code to log these as well in Save_Main_File and Delete_Main_File inside
the
> base DD class
>
> I didnt look at the solution provided by Curtis but most i have seen so
far
> do not deal with errors and transactions properly. Especially if a
> transaction is in place and a rollback occurs and the logging is done into
> an ASCII file
>
> This can cause you to think that DF is 'loosing' records but it really
isnt
> it is simply backing them out
>
> Again i didnt look at the solution provided so it may not have this issue
>
> --
> Michael Salzlechner
> StarZen Technologies, Inc
> Visual DataFlex Controls, Tools and consulting
> http://www.starzen.com
>
>

Mark Powers
10-May-2005, 02:00 PM
Curtis:
I was thinking that DFPACK in VDF was provided by an on request basis -
at least at a DISD several years ago someone from DAW said that. You
could make a call to request it to see if you can get it.

Mark Powers

Curtis Krauskopf wrote:
> Mike,
>
> I have found that the DFPACK in DF3.2 creates flex.cfl files that are
> byte-for-byte identical to the flex.cfl provided in the VDF9.1 installation.
> I haven't checked any other version of DataFlex (because I don't have any
> others loaded right now). Because dfpack is not provided for the VDF
> licenses, using a CM 3.2 dfpack is one of those "at your own risk" type of
> things.
>
> Yes, I think you could use the same technique for logging
> procedure/function/set calls if you were comfortable with the FMAC code
> involved. That's an interesting idea and I'll see how hard it is to
> implement the next time I need such a solution.
>
> Curtis
>
>
> "Michael Collins" <mike.diespamdiedie@visusoft.ie> wrote in message
> news:Y7umrAZUFHA.1272@dacmail.dataaccess.com...
>
>>Curtis,
>>
>>Interesting solution. How much of this is applicable to VDF?
>>
>>I see we have a FMAC file, but I can't seem to find DFPACK to rebuild it.
>>
>>If it is possible to rebuild the FMAC in VDF, would it be possible to
>>modify the SAVE/DELETE logging to log Procedure/Function calls and
>>Property access? Get/Send/Move etc.
>>
>>I understand that of course it would be a huge volume of information to
>>log, but it could be very useful as a debugging utility, tracing program
>>execution.
>>
>>Regards,
>>
>>Mike
>
>
>

starzen
10-May-2005, 07:44 PM
Curtis

Reread/Unlock and/or Lock/Unlock will give you the same issue and they are
used all the time

problem is that if you want to track saves to see if records where actually
saved and then do not properly track transaction aborts the whole procedure
is worthless as you cant go back and say that the record was saved. It may
have been backed out.


--
Michael Salzlechner
StarZen Technologies, Inc
Visual DataFlex Controls, Tools and consulting
http://www.starzen.com

Curtis Krauskopf
17-May-2005, 05:22 PM
Michael,

I understand what you're saying, but also know that in the three very
complicated multiuser applications in which I've had to use this technique,
I was able to isolate and find the bug the first time any user caused the
problem to occur. This was after other developers had spent _months_ trying
to find the bug using traditional techniques.

Best regards,

Curtis


"StarZen Technologies" <info@starzen.com> wrote in message
news:vC7H6EcVFHA.1272@dacmail.dataaccess.com...
> Curtis
>
> Reread/Unlock and/or Lock/Unlock will give you the same issue and they are
> used all the time
>
> problem is that if you want to track saves to see if records where
actually
> saved and then do not properly track transaction aborts the whole
procedure
> is worthless as you cant go back and say that the record was saved. It may
> have been backed out.
>
>
> --
> Michael Salzlechner
> StarZen Technologies, Inc
> Visual DataFlex Controls, Tools and consulting
> http://www.starzen.com
>
>

Curtis Krauskopf
17-May-2005, 05:35 PM
Mark,

Thanks, Mark. I didn't know that.

Curtis

"Mark Powers" <markp@remacinc.com> wrote in message
news:%2380d%23JZVFHA.4700@dacmail.dataaccess.com.. .
> Curtis:
> I was thinking that DFPACK in VDF was provided by an on request basis -
> at least at a DISD several years ago someone from DAW said that. You
> could make a call to request it to see if you can get it.
>
> Mark Powers
>