RUN COMMAND - HPUX
shulbert@littlejohnfrazer.com
shulbert@littlejohnfrazer.com
Thu, 21 Apr 2005 10:41:58 +0100
as far as i remember we had this problem on aix.
you just have to accept (shift that paradigm!) that RUN COMMAND does't run commands in the same process.
if you want the same environment variables, all you have to do is run the same script that you used to set them in the parent process. if you really have to, export them to an intermediate script and run that.
hope this helps.
regards,
stephen.
-----Original Message-----
From: nicolas.au@bnpparibas.com [mailto:nicolas.au@bnpparibas.com] Sent: Thursday, April 21, 2005 10:34 AM
To: Dirk.Rohde@vpgroup.com
Cc: atla38@dsl.pipex.com; powerh-l@sowder.com
Subject: RE: RUN COMMAND - HPUX
Yes, we understand that using the 'run command' in the normal way, then a
child process is executed and once the script finishs the environment
variables set by the script will be lost.
That is why we are trying to use the '.' dot command hoping that the
script file will be executed in the same shell environment as the QUICK's
program (screen).
There is no permission issue or path issue on our simple script file
'tests1'
-rwxrwxr-x 1 u91384 FCUX 55 Apr 7 11:15 tests1
If we use :
RUN COMMAND 'ksh tests1' ON ERROR CONTINUE
The script 'tests1' executes as it should but the environment variables
that are set by the script 'tests1' can not be picked up by the QUICK's
program that issued this 'RUN COMMAND'. This confirms that the script
'tests1' is executed as a child process in a separate shell environment.
If we try to use :
RUN COMMAND 'ksh . test1' ON ERROR CONTINUE
then we get the error 'Command exited with status #2'
If we try to use :
RUN COMMAND '. test1' ON ERROR CONTINUE
we get the error 'sh: .:Execute permission denied.'
Passing environment variables from the QUICK's program to the script
'tests1' in the RUN COMMAND is not a problem. It is the retrieval by the
QUICK's program of the environment variables that are set by the script
after the script 'tests1' executed is what we are after.
Any more suggestion ?
Nicolas.
Internet
Dirk.Rohde@vpgroup.com - 20/04/2005 20:30
To: atla38, Nicolas AU, powerh-l
cc:
Subject: RE: RUN COMMAND - HPUX
Since a "run command" is processed in a child process, once you return
from running the script, your environment variables will be lost. Use
"setsystemval" to set environment variables within your screen or set
your environment variables before initiating the screen.
-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Joe Boyle
Sent: Wednesday, April 20, 2005 11:15 AM
To: nicolas.au@bnpparibas.com; powerh-l@sowder.com
Subject: RE: RUN COMMAND - HPUX
check that you have execute permission on the file, and if not add it
using chmod, this way you won't need the '.' syntax.
Personally, I would add a path to the file also
e.g. RUN COMMAND "$HOME/tests1 " ON ERROR CONTINUE ( or wherever the
file is if in a fixed location. )
You will probably need to export the variable from within the script
file to enable Quick to find it.
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: 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.
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = = 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.
Littlejohn Frazer
Chartered Accountants
1 Park Place
Canary Wharf
London
E14 4HJ
Tel: 020 7987 5030
Fax: 020 7987 9707
Web: www.littlejohnfrazer.com
The information contained in this communication is confidential and may
be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful.
Littlejohn Frazer reserves the right to monitor the content of any
message sent to or from littlejohnfrazer.com and its associate domains,
fmi-litjon.co.uk and litjon.co.uk
A list of partners may be inspected at the above address which is
also the address for serving documents.
Registered to carry on audit work by the Institute of Chartered
Accountants in England & Wales, and authorised and regulated by the
Financial Services Authority for investment business.