RE: COMMON Variable.

2004-03-31 Thread John Jenkins
Carol

EXECUTE PHANTOM X :MY.COMMON.VARIABLE

Usual rules for picking up command line arguments.

Regards

JayJay 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Carolina Lizama
Sent: 29 March 2004 18:24
To: [EMAIL PROTECTED]
Subject: COMMON Variable.


Thanks Cliff for maintaining the wonderful user group. I will definitelyy
miss it.

Guys,

Is there a way to pass some common variable to a Phantom program - which
will be called using EXECUTE 'PHANTOM '.

I've even tried named COMMON and it lost its value.

Thanks.

Carol.

_
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: COMMON Variable.

2004-03-30 Thread Mats Carlid
George Gallen wrote:

You don't seem to be able to put any values on the phantom line
(and if you do, they seem to be ignored). I never tried Commons
for this.
Another method I use is I create a VOC entry
based on UserNO and something static like:
(ex. 101phantom)

1PA
2RUN LIB PROGRAMNAME PASSVAR1 PASSVAR2 PASSVAR3 PASSVA4
Then EXECUTE PHANTOM 101phantom

Inside PROGRAMNAME:

[EMAIL PROTECTED]
 

  Try  @COMMAND  instead.

PASSVAR1=FIELD(CMDLINE, ,4)
PASSVAR2=FIELD(CMDLINE, ,5)
ETC...
Include the VOC ID as one of the PASSVAR, and have the
 program DELETE the VOC ENTRY.
George

 

-- mats
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: COMMON Variable.

2004-03-29 Thread Allen Egerton
From: Carolina Lizama [EMAIL PROTECTED]

 Is there a way to pass some common variable to a Phantom program - which
 will be called using EXECUTE 'PHANTOM '.

 I've even tried named COMMON and it lost its value.

Common exists on a per-user basis.  So, if your phantom initializes it, it
can use it.  But there's no way to pass values stored in common from one
user to another user.

In other languages, you can do it via shared memory, but to the best of my
knowledge, that's not available in Universe/Unidata at the application
level.  Obviously it exists at the OS and DB level, otherwise LIST.READU and
its brethren would be pretty useless :)

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: COMMON Variable.

2004-03-29 Thread Steve Kunzman
Carolina,

Could you write the variable out to a file and read it in within your  program?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Carolina Lizama
Sent: Monday, March 29, 2004 11:24 AM
To: [EMAIL PROTECTED]
Subject: COMMON Variable.



Thanks Cliff for maintaining the wonderful user group. I will definitelyy 
miss it.

Guys,

Is there a way to pass some common variable to a Phantom program - which 
will be called using EXECUTE 'PHANTOM '.

I've even tried named COMMON and it lost its value.

Thanks.

Carol.

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: COMMON Variable.

2004-03-29 Thread Kevin King
Why not write the value to a commonly located record and then read it in the
phantom?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Behalf Of Allen Egerton
 Sent: Monday, March 29, 2004 11:11 AM
 To: U2 Users Discussion List
 Subject: Re: COMMON Variable.


 From: Carolina Lizama [EMAIL PROTECTED]

  Is there a way to pass some common variable to a Phantom program - which
  will be called using EXECUTE 'PHANTOM '.
 
  I've even tried named COMMON and it lost its value.

 Common exists on a per-user basis.  So, if your phantom initializes it, it
 can use it.  But there's no way to pass values stored in common from one
 user to another user.

 In other languages, you can do it via shared memory, but to the
 best of my
 knowledge, that's not available in Universe/Unidata at the application
 level.  Obviously it exists at the OS and DB level, otherwise
 LIST.READU and
 its brethren would be pretty useless :)

 --
 u2-users mailing list
 [EMAIL PROTECTED]
 http://www.oliver.com/mailman/listinfo/u2-users



-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: COMMON Variable.

2004-03-29 Thread vance . alspach




Or pass it in the phantom statement and parse in out in the program.


EXECUTE PHANTOM  %PARM1%PARM2%PARM3


[EMAIL PROTECTED]
CONVERT % TO @FM IN VAR
PARM1=VAR2
PARM2=VAR3
PARM3=VAR4

unless it is a record or dimensioned array

Vance


   

  Kevin King 

  [EMAIL PROTECTED]To:   U2 Users Discussion List 
[EMAIL PROTECTED]  
  ne.com  cc: 

  Sent by: Subject:  RE: COMMON Variable.  

  u2-users-bounces@

  oliver.com   

   

  03/29/2004 01:20 

  PM   

   

  Please respond to

  U2 Users 

  Discussion List  

   

   





Why not write the value to a commonly located record and then read it in
the
phantom?



-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: COMMON Variable.

2004-03-29 Thread FFT2001
In a message dated 3/29/2004 1:11:11 PM Eastern Standard Time, [EMAIL PROTECTED] 
writes:

  Is there a way to pass some common variable to a Phantom 
 program - which
  will be called using EXECUTE 'PHANTOM '.
 
  I've even tried named COMMON and it lost its value.

Yes Carolina.  There are a few ways
1) EXECUTE PHANTOM  some other stuff interpreted as variables
2) MYSTUFF = here are some more arguments
WRITE MYSTUFF TO FILE, ITEM
EXECUTE PHANTOM  (which starts by reading MYSTUFF)
3) disconnected processes
process A writes stuff and moves on
process B at some other disconnected time EXECUTE PHANTON  which reads the stuff 
writen by process A five minutes or five days ago
4) process A, B, C, D, E, etc write various stuff at various times
process P starts the PHANTOM at boot time and it runs forever.  The phantom 
periodically wakes up and looks for something to do, does it, then goes to sleep for a 
minute or so.

Will Phantom Johnson
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: COMMON Variable.

2004-03-29 Thread George Gallen
You don't seem to be able to put any values on the phantom line
(and if you do, they seem to be ignored). I never tried Commons
for this.

Another method I use is I create a VOC entry
based on UserNO and something static like:

(ex. 101phantom)

1PA
2RUN LIB PROGRAMNAME PASSVAR1 PASSVAR2 PASSVAR3 PASSVA4

Then EXECUTE PHANTOM 101phantom

Inside PROGRAMNAME:

[EMAIL PROTECTED]
PASSVAR1=FIELD(CMDLINE, ,4)
PASSVAR2=FIELD(CMDLINE, ,5)
ETC...

Include the VOC ID as one of the PASSVAR, and have the
  program DELETE the VOC ENTRY.

George



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 29, 2004 2:26 PM
To: [EMAIL PROTECTED]
Subject: Re: COMMON Variable.


In a message dated 3/29/2004 1:11:11 PM Eastern Standard Time, 
[EMAIL PROTECTED] writes:

  Is there a way to pass some common variable to a Phantom 
 program - which
  will be called using EXECUTE 'PHANTOM '.
 
  I've even tried named COMMON and it lost its value.

Yes Carolina.  There are a few ways
1) EXECUTE PHANTOM  some other stuff interpreted as variables
2) MYSTUFF = here are some more arguments
WRITE MYSTUFF TO FILE, ITEM
EXECUTE PHANTOM  (which starts by reading MYSTUFF)
3) disconnected processes
process A writes stuff and moves on
process B at some other disconnected time EXECUTE PHANTON 
 which reads the stuff writen by process A five minutes 
or five days ago
4) process A, B, C, D, E, etc write various stuff at various times
process P starts the PHANTOM at boot time and it runs forever. 
 The phantom periodically wakes up and looks for something to 
do, does it, then goes to sleep for a minute or so.

Will Phantom Johnson
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: COMMON Variable.

2004-03-29 Thread Trevor Ockenden
 Is there a way to pass some common variable to a Phantom program - which
 will be called using EXECUTE 'PHANTOM '.

 I've even tried named COMMON and it lost its value.

You could try 'named pipes' to pass the information BUT this is a large
topic. You may need to do some investigation.

It would help if we knew a little more about your requirements. Perhaps
passing the information via a file would be sufficient BUT if speed is
critical then 'named pipes' is the way to go. If it is only necessary to
know the state (ie active|inactive etc.) then you could use the shared
memory locks - try LIST.LOCKS.

Cheers

Trevor Ockenden
OSP



---
Outgoing mail is certified Virus Free by AVG 6.0.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.642 / Virus Database: 410 - Release Date: 24/03/2004

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users