RUN COMMAND - HPUX

Joe Boyle atla38@dsl.pipex.com
Thu, 21 Apr 2005 14:49:22 +0100


presumably Rudolph replied off-list so I can't comment on his suggestion,
but if you go with my suggestion it might be best to add the date also as
below,

let t_mysub = &
"$HOME/" + trunc(loginid) + ascii(sysdate,8) + ascii(systime,8)  

if not setstsytemval (mysub, t_mysub)
   then error ....

Or you could use an indexed file and write the result using qtp ( from
within the script ) with perhaps loginid as the record key.

Regards, Joe.



-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of
nicolas.au@bnpparibas.com
Sent: 21 April 2005 14:28
To: Mark.Fry@cognos.com
Cc: powerh-l@sowder.com
Subject: RE: RUN COMMAND - HPUX

Hi Mark,

Thanks for the explanation.

So we may have to try the way that Rudolf and Joe suggested, using files to
pass values from the son process back to the parent process.

Regards

Nicholas.




Internet
Mark.Fry@cognos.com@lists.sowder.com - 21/04/2005 12:07


Sent by:    powerh-l-admin@lists.sowder.com



To:    Nicolas AU, powerh-l

cc:


Subject:    RE: RUN COMMAND - HPUX


Hi Nicholas,

Well it's been a while, but I remember going round this loop a number of
years ago.

You want to execute tests1 in the same shell?  Hmmm...  The problem is
that when you issue a RUN COMMAND, your current process is not in the
original shell, but rather a child of the quick process used to fire up
the screen in the first place.  If you want your command to run in a
shell, you have to ask for it (ie fork a new shell below your quick
process by doing RUN COMMAND "sh -c '. test1'").  Of course, as soon as
the RUN COMMAND has finished, you drop back to the quick process (ie
your screen) and lose whatever variables were set in your forked shell.

>From within your screen, you cannot make changes to the original shell
you were in before you started the screen, as it is the parent process
of your screen, which in turn is the parent process of whatever you ask
for in your RUN COMMAND.  You can see this effectively if you issue a
RUN COMMAND "ksh" from quick.  When you run the command, you fork a new
shell.  It's parent is not your original shell, but rather the quick
process for your screen (do a ps -f to see this).

Looks like you will need to source tests1 before you launch quick, or
else look at using the SETSYSTEMVAL function to set the environment
variables instead of using your script.

Hope this clarifies things a bit.

Cheers!

Mark Fry
Mark.Fry@Cognos.com

-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of
nicolas.au@bnpparibas.com
Sent: 20 April 2005 18:13
To: powerh-l@sowder.com
Subject: RUN COMMAND - HPUX

Hi All,

We are migrating from PH 8.29.D on HP3000 to PH 8.43.D on HP9000 (HPUX)
using Eloquence.

We have experienced a little problem in QUICK  using the procedural verb
'RUN COMMAND'

We are trying to execute a script file using the procedural verb 'RUN
COMMAND'  using the Korn Shell  '. scriptfile'  (dot) command format.

What we want is to execute the scriptfile that containing a set of
commands in the current shell environment so that any variable set by
the commands in the scriptfile will be able to be retrieved by the
QUICK's program that executes the scriptfile  using the GETSYSTEMVAL
function.

For example what we are trying to do is :

RUN COMMAND ". tests1 "  ON ERROR CONTINUE

We got the error "sh: .: Execute permission denied."

What have we done wrong?

What we ultimately want is to be able to execute a QUIZ program using
the 'RUN COMMAND' verb and want the QUICK program to be able to pick up
any variables that are set by the QUIZ program using the GETSYSTEMVAL
function.
We could do these things easily in HP3000 but with HP9000, it is more
difficult because of the different shell environment that the QUIZ
program is run.

Any info on how to use the RUN COMMAND to execute scriptfile in the same
shell environment will be very much appreciated.

TIA.

Nicolas.



This message and any attachments (the "message") is intended solely for
the addressees and is confidential.
If you receive this message in error, please delete it and immediately
notify the sender. Any use not in accord with its purpose, any
dissemination or disclosure, either whole or partial, is prohibited
except formal approval. The internet can not guarantee the integrity of
this message.
BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable
for the message if modified.

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses destinataires et
sont confidentiels. Si vous recevez ce message par erreur, merci de le
detruire et d'en avertir immediatement l'expediteur. Toute utilisation
de ce message non conforme a sa destination, toute diffusion ou toute
publication, totale ou partielle, est interdite, sauf autorisation
expresse. L'internet ne permettant pas d'assurer l'integrite de ce
message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce message, dans
l'hypothese ou il aurait ete modifie.
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = = Mailing list:
powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to
powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.


       This message may contain privileged and/or confidential information.
       If you have received this e-mail in error or are not the intended
       recipient, you may not use, copy, disseminate or distribute it; do
       not open any attachments, delete it immediately from your system and
       notify the sender promptly by e-mail that you have done so. Thank
       You.

--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
 This list is closed, thus to post to the list you must be a subscriber.



This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.
-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.