Excuting a script from a powerhouse program by sourcing it
greig.morrison@sympatico.ca
greig.morrison@sympatico.ca
Thu, 15 May 2003 12:00:00 -0400
This is a multi-part message in MIME format.
------=____1053014400613_G(LNn=ahOh
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
I tested the following example on SUN Solaris:
screen test menu
temp test-env char*100 initial "ls -l > test.log"
field test-env display size 40 predisplay
;procedures
procedure designer test
begin
IF NOT SETSYSTEMVAL("test", test-env)
THEN ERROR "Could not set environment variable"
run command "echo $test > test.sh"
run command "chmod +x test.sh"
run command "test.sh"
end
Cheers
Greig
>
> From: karen d'souza <kaz_dsouza@yahoo.com>
> Date: 2003/05/15 Thu AM 10:05:18 EST
> To: greig.morrison@sympatico.ca
> Subject: RE: Excuting a script from a powerhouse program by sourcing it
>
> Hi,
>
> Well actually this is what i am trying to do is :
>
> DEFINE THE-COMMAND CHAR*120 = "ls -lt A.old* | awk '{ if (NR==2) print $9}'"
>
> IF NOT SETSYSTEMVAL("ABC",("RUN" + THE-COMMAND ))
> THEN
> ERROR
> END
> RUN COMMAND "echo $ABC > temp.log"
>
> Ans the variable is not being set
>
> Is it possible that when RUN is used it performs the same on another shell and that is why the variable is not being set .
>
> Regards
> Karen
> greig.morrison@sympatico.ca wrote:
> Karen,
>
> If you are trying to set environment variables in the same shell as you Quick screen perhaps the solution would be to use the SETSYSTEMVAL function, also see GETSYSTEMVAL. Quiz, Qtp and other processes can then access these environment variables when run from your Quick session.
>
> example from the PowerHouse Rules manual:
> > IF NOT SETSYSTEMVAL("QTP_PARMS", ("RUN" + RUN_REQ ))
> > THEN ERROR "Could not set environment variable"
>
> Cheers,
> Greig
>
>
> Message: 5
> Date: Wed, 14 May 2003 21:45:05 -0700 (PDT)
> From: "karen d'souza"
> Subject: Excuting a script from a powerhouse program by sourcing it (was: Run
> command temp.sh)
> To: Darren Reely
> Cc: "'powerh-l@lists.swau.edu'"
>
>
> --0-921749664-1052973905=:17649
> Content-Type: text/plain; charset=us-ascii
>
> Apologies for the messedup subject, will take care next time onwards.
>
> > run command "temp.sh" &
>
> Yes, this will run tem.sh, but the shell does so by forking a new process, due
> to which my exported variables from temp.sh are lost. I am trying to do `. temp.
> sh', as I want to execute temp.sh in the _same_ shell. Is there a way I can run
> temp.sh in the same shell ?
>
> Thanks in advance.
>
> Karen.
>
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe
> " in message body to powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
>
> ---------------------------------
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
>
------=____1053014400613_G(LNn=ahOh
Content-Type: text/html;
name="reply"
Content-Disposition: inline;
filename="reply"
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>Well actually this is what i am trying to do is :</DIV>
<DIV><BR>DEFINE THE-COMMAND CHAR*120 = "ls -lt A.old* | awk '{ if (NR==2) print $9}'"</DIV>
<DIV> </DIV>
<DIV>IF NOT SETSYSTEMVAL("ABC",("RUN" + THE-COMMAND ))</DIV>
<DIV>THEN</DIV>
<DIV> ERROR</DIV>
<DIV>END</DIV>
<DIV>RUN COMMAND "echo $ABC > temp.log"</DIV>
<DIV> </DIV>
<DIV>Ans the variable is not being set</DIV>
<DIV> </DIV>
<DIV>Is it possible that when RUN is used it performs the same on another shell and that is why the variable is not being set .</DIV>
<DIV> </DIV>
<DIV>Regards</DIV>
<DIV>Karen<BR><B><I>greig.morrison@sympatico.ca</I></B> wrote:</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Karen,<BR><BR>If you are trying to set environment variables in the same shell as you Quick screen perhaps the solution would be to use the SETSYSTEMVAL function, also see GETSYSTEMVAL. Quiz, Qtp and other processes can then access these environment variables when run from your Quick session.<BR><BR>example from the PowerHouse Rules manual:<BR>> IF NOT SETSYSTEMVAL("QTP_PARMS", ("RUN" + RUN_REQ ))<BR>> THEN ERROR "Could not set environment variable"<BR><BR>Cheers,<BR>Greig<BR><BR><BR>Message: 5<BR>Date: Wed, 14 May 2003 21:45:05 -0700 (PDT)<BR>From: "karen d'souza" <KAZ_DSOUZA@YAHOO.COM><BR>Subject: Excuting a script from a powerhouse program by sourcing it (was: Run <BR>command temp.sh)<BR>To: Darren Reely <DARREN.REELY@LATTICESEMI.COM><BR>Cc: "'powerh-l@lists.swau.edu'" <POWERH-L@LISTS.SWAU.EDU><BR><BR>--0-921749664-1052973905=:17649<BR>Content-Type: text/plain; charset=us-ascii<B!
R><BR>Apologies for the messedup subject, will take care next time onwards.<BR><BR>> run command "temp.sh" &<BR><BR>Yes, this will run tem.sh, but the shell does so by forking a new process, due <BR>to which my exported variables from temp.sh are lost. I am trying to do `. temp.<BR>sh', as I want to execute temp.sh in the _same_ shell. Is there a way I can run <BR>temp.sh in the same shell ?<BR><BR>Thanks in advance.<BR><BR>Karen.<BR><BR><BR>= = = = = = = = = = = = = = = = = = = = = = = = = = = =<BR>Mailing list: powerh-l@lists.swau.edu<BR>Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu<BR>Unsubscribe: "unsubscribe <PASSWORD>" in message body to powerh-l-request@lists.swau.edu<BR>http://lists.swau.edu/mailman/listinfo/powerh-l<BR>This list is closed, thus to post to the list you must be a subscriber.</BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com">The New Yahoo! Search</a> - Faster. Easier. Bingo.
------=____1053014400613_G(LNn=ahOh--