Bill: On some sites we use 6 phantoms to do various activities. When the program crashes, which we can remember only once in 5 years, the LOCK was released. The other programs that need to phantom restarted it just as was shown in the code below. And those locks are released on restart.
There is one additional feature that we do is that phantoms should be restarted at least once a day (1am) rather than continually looping. This keeps the code refreshed if you have changed it and the stack very clean. Regards, Doug www.u2logic.com -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Friday, April 02, 2010 11:15 AM To: U2 Mail List Subject: Re: [U2] UD: Phantoms Doug: After reading the documentation for LOCK... "Resources are not automatically unlocked by the termination of the locking program. The UniBasic UNLOCK or ECL QUIT commands must release them. Otherwise, you can release resources by executing the ECL CLEAR.LOCKS command at UniData level." ...the resource lock will still be set if the service program crashes. Hmmmm. I'll have to think about this some more. :-( Bill ------------------------------------------------------------------------ Bill Haskett said the following on 4/2/2010 10:10 AM: > Doug: > > That is an idea. I was hoping I could be more direct, but this should > work. > > Thanks, > > Bill >> >> ------------------------------------------------------------------------ >> Doug said the following on 4/2/2010 8:56 AM: >>> Bill: >>> >>> Use the LOCK command with number 0 through 63. Have your phantom >>> process do >>> a "LOCK 60". Then you can test it in other programs using the else >>> clause: >>> >>> LOCK 60 THEN >>> UNLOCK 60 >>> * Restart phantom >>> END ELSE >>> * Phantom is running do nothing >>> END o/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users