General information
Category:
Windows API functions
>I use a tequinique similar to the one you've mentioned. I've been handling >abends by adding a timer to the app that fires every 30 seconds or so to >refresh the user information. This way I can clear all the 'logged in' flags, >and wait a little while and see who's currently running the application. There >are a few drawbacks (users opening tables outside the application via Crystal >Reports is one) but so far, I haven't found a better solution.
Ken,
So who actually deletes the old records in teh case of an ABEND? and what do you use as a PK for the table (I was thinking their network number..). I was thinking this:
startup:
scan table
if record found for this address num
if datestamp older than 5 minutes
delete the record - ABEND
else
signal an error, app running, and exit
endif
endscan
append a record with this netnum, and DATETIME()
every 5 minutes:
scan table, find record
update datetime()
at exit:
scan table, find record
delete record
The only problem left is if a user abends, and does not start it up again, all users see a record for joeuser. I'd like some process to periodically clean all records older than 5 minutes.
Would that work as a filter? set filter to datetime field < 5 minutes old
Tim
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only