Bill,

Are you asking two questions: Is the program running and is the program running as a phantom?

Or only one question : Is the program running as a phantom?

I don't fully understand your application environment, but we use the following technique to determine if a program, that normally only runs as a phantom, is running or not:

We start the program as a phantom and, from within the phantom program, we write a record (eg STARTED) to the dict of a file and then read that record with a READU command.

This leaves the dict record STARTED locked until the phantom program stops running.

By reading the dict record STARTED from another status reporting program and checking if it is locked or not, we can determine if the phantom program is running or not.

Don't know if you can use this technique or not.

hth,

Dave

Dave Taylor
Sysmark Information Systems, Inc.
Authorized IBM Business Partner
49 Aspen Way
Rolling Hills Estates, CA 90274
(O) 800-SYSMARK (800-797-6275)
(F) 310-377-3550
(C) 310-561-5200
www.sysmarkinfo.com
----- Original Message ----- From: "Bill Haskett" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Monday, September 15, 2008 7:54 PM
Subject: [U2] [UD] Determining if program running as a phantom


Im having a bit of a problem figuring out how to tell, within a program, if
it is running as a phantom.  It was my impression that @USER.TYPE would be
set to 1 if the program was running as a phantom.  However, if I run a
program from a UniObjects connection @USER.TYPE is always set to 1.  It
doesnt matter I test this within the main program that EXECUTEs a phantom
or within the phantomed program.   If I test @TTY then it returns udcs
from within the main program or Console from within the phantomed program
(I hate to think this is how I determine if a program is running as a
phantom ).



If I execute the LISTUSER() function then the line properly shows the user
type as a phantom.



The phantomed process.

*--: p

001: @USER.TYPE-: 1

002: @TTY-------: Console

003: PORT.NO----: 6

004: LISTUSER()-: 12251621976152myuser2phantom2pts/12Console210:33:322Sep 15
2008

005: 2263221976152myuser2udt2pts/22192.168.1.51216:41:202Sep 15 2008

006: 32383621976152myuser2udt2pts/32192.168.1.51215:11:522Sep 15 2008

007: 42358421976402designbai2udt2pts/42udcs219:30:062Sep 15 2008

008: 52337621976152myuser2udt2pts/52192.168.1.51215:31:312Sep 15 2008

009: 62238821976402designbai2phantom2pts/62Console219:30:532Sep 15 2008

010: ...Entry DEV_DESIGNBAIS_6_1486970254.txt

011: ...Entry DEV_DESIGNBAIS_6_1486970255.txt

013: PHANTOM process 2388 has completed.

Bottom.



The process executing the above phantomed job

*--: p

001: E:\DataTrust\Dev\_PH_\O_designbais established

002: @USER.TYPE-: 1

003: @TTY-------: udcs

004: PORT.NO----: 4

005: LISTUSER()-: 12251621976152myuser2phantom2pts/12Console210:33:322Sep 15
2008

006: 2263221976152myuser2udt2pts/22192.168.1.51216:41:202Sep 15 2008

007: 32383621976152myuser2udt2pts/32192.168.1.51215:11:522Sep 15 2008

008: 42358421976402designbai2udt2pts/42udcs219:30:062Sep 15 2008

009: 52337621976152myuser2udt2pts/52192.168.1.51215:31:312Sep 15 2008





Ive resorted to parsing the results of LISTUSER() to get what appears to be
the correct information.  Does anyone know of an easier alternative.



Thanks,

Bill Haskett
Advantos Systems, Inc.
4370 La Jolla Village Drive, Suite 400
San Diego, CA  92122
(  760-944-5570 x3000 (CA)
(  360-923-4838 (WA)
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to