Thomas:

Whooooooaaaaaa!

I wrote a phantom that continually runs in the background and wakes up every 
minute
(on the minute).  It reads a "SERVICES" file to see if anything is scheduled to 
run
at the particular week, day, hour, and minute (kind of like "cron").  If it 
finds
something it "phantoms" that command by doing a:

RunCmd     = "LOGTO {DefinedAcct}"
RunCmd<-1> = CommandToRun

EXECUTE \PHANTOM \ : RunCmd

...then the cron service sleeps until the top of the next minute.

MV.NET, as does DesignBais and other software, always leaves an account full of 
_PH_
and _SAVEDLISTS_ items along with new files.  The mv.NET cleanup process is 
supposed
to clean up all this.  In the above service I wrote a program to do the mv.NET
cleanup.  It tests to see if mv.NET is connected to the dbms/account then does 
the
following:

** Test if mv.NET is connected to this account
.
** Cleanup account
IF NOT(IsConnected) THEN
   DATA "YES"
   EXECUTE \MVNET.HOUSEKEEPALL\ CAPTURING OUTPUT
   GOSUB TRANSFORM.MSG
   CleanUpMsg<1,-1> = OUTPUT
*
** Clean up the LISTINFO list file
   EXECUTE \SELECT LISTINFO = "MVNET_]"\ CAPTURING OUTPUT
   IF SYSTEM(11) THEN
      LOOP
         READNEXT LISTID ELSE EXIT
         EXECUTE \DELETE-LIST \ : LISTID CAPTURING OUTPUT
         DelCnt += 1
      REPEAT
      IF DelCnt > 0 THEN
         OUTPUT = CleanUpMsg ; GOSUB TRANSFORM.MSG
         CleanUpMsg<1,-1> = DelCnt : " MVNET lists deleted."
      END
   END
END ELSE
   CleanUpMsg = "Can't cleanup while a connection exists."
END
CALL LOGMSG ('', 'N/A', CleanUpMsg, '')
*
GOTO END.OF.PROGRAM

I guess it's possible that in the middle of the night someone accesses our .NET 
web
site, that accesses this particular account in the UD database, in the 
milliseconds
between the time I test for a connection and the time I execute the mv.NET
housekeeping program in the code above.  But it sure seems like this is a low
probability.

Thanks,

Bill


>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Thomas Derwin
>Sent: Wednesday, January 02, 2008 7:05 AM
>To: u2-users@listserver.u2ug.org
>Subject: Re: [U2] UD read anomolies
>
>Hi Bill,
>
>Can't be sure without seeing the actual code, but my guess is that the
>CLEAR-FILE on MVNET.READIMAGES is still running when a subsequent
>command tries to use the file.
>
>CLEAR-FILE on Unidata is essentially a DELETE-FILE followed by a
>CREATE-FILE with the original modulo and block size. If you try to
>access the file before the CREATE-FILE is finished, you get the
>"<filename> is not a UniData data file" message.
>
>Happy New Year,
>Tom Derwin

[snipped]
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to