T.R | Title | User | Personal Name | Date | Lines |
---|
87.1 | Use OAINI.SCP (and the trademark ALL-IN-1) | SHALOT::LANPHEAR | Test the water or turn the tide? | Mon Feb 24 1992 21:38 | 6 |
| OAINI.SCP will work exactly the way you need.
You don't want to use OAINI.COM, because _that's_ what only executes upon
subprocess activation.
Cheers, Dan'l
|
87.2 | OAINI.SCP is probably best but others could work | BUFFER::VICKERS | Winners take action not keep score | Mon Feb 24 1992 21:38 | 50 |
| Dave,
I corrected the spelling of the ALL-IN-1 product name in your topic
title. It is always appreciate when people take the trouble to use the
proper product name, especially here.
I suspect that adding some simple logging in OAINI.SCP is the best way
to go as it should capture the right amount and level of information
for the customer. OAINI.SCP is only executed as a part of the
initialization of the ALL-IN-1 session. If you wish to have a single
record for each user per day then you'll probably want to keep track of
whether the use has already been logged for today.
The code below will write a record containing the user name and NBS
date of the entry to the end of a file named
OA$SITE_DATA_SHARE:ENTRY_LOG.DAT:
.FU .IF $LAST_ENTRY_LOG_DATE EQS OA$DATE_NBS:8 THEN .GOTO DONE_THAT
.FU GET $LAST_ENTRY_LOG_DATE = OA$DATE_NBS:8
.FU GET #RECORD = OA$USER:30 " " OA$DATE_NBS
.FU TEXT_FILE OPEN LOG "OA$SITE_DATA_SHARE:ENTRY_LOG.DAT"/APPEND
.FU TEXT_FILE WRITE LOG #RECORD
.FU TEXT_FILE CLOSE LOG
.LABEL DONE_THAT
This code may not handle having the file locked. The most suitable
approach to handle that is to check OA$STATUS after the OPEN and have a
retry loop for a reasonable amount of times.
If any users have their own OAINI.SCP scripts then you should be sure
that they have the tasteful line of:
.FU SCRIPT OA$LIB:OAINI.SCP
so that their OAINI.SCP causes the system wide OAINI.SCP script.
There is already a mail log file which COULD provide a less precise way
to gather this sort of information. You might want to look at
OA$MTI_LOG to see if this might not provide a rough approximation to
what would help the customer. According to the marketing types the
only use of ALL-IN-1 is mail so, if this is correct, OA$MTI_LOG would
come close to getting an accurate usage count. This assumes that each
user sends at least one mail message a day.
A more precise way to gather the information would be to implement
metering. This adds a bit more overhead but is easy.
Good luck,
don
|
87.3 | A proven hack | MSDOA::ISAAC | $cmkrnl_s routin=crash ;if fired | Tue Feb 25 1992 20:15 | 24 |
|
Another thing you can do which of course is not supported but a simple
fix I wish engineering would consider so it is possible to have a do script
executed whenever someone invokes ALL-IN-1. Is is very simple, proven at
a site of over 15,000 users and would solve alot of headaches with chasing
down user oaini.scp and other crap like that.
We patched oa.bli to dispatch a script which
which does our initial site script. We used to open some special form
libraries.
If you look in oa.bli find the comment
!+
! Invoke the start form (and hence menu processing).
!-
The code below is what dispatch the main form. We added
a similar call before this that called our site startup do
script.
John
|