Why are you trying to set two environment variables? Are they needed for
a process that you're going to run via a <process> element? If so, then
you would use the <env> sub-element for the <process> element to set the
two environment variables when running a process. The <env> sub-element
specifies environment variables that will be set for the process. For
example:
<script>
port = '9999' # set to the port value for P4PORT
user = 'vijita' # set to the user value for P4USER
command = 'C:/tests/myTest.exe' # set to the command you want to run
</script>
<process>
<location>image</location>
<command mode="'shell'">command</command>
<env>['P4PORT=%s', 'P4USER=%s' % (port, user)]</env>
<stderr mode="'stdout'"/>
<returnstdout>
</process>
<if expr="RC == 0">
<log message="1">
'Process succeeded. Stdout/Stderr: \n%s' % (STAXResult)
</log>
<else>
<log message="1">
'Process failed. RC= %s STAFResult=%s STAXResult: \n%s' % \
(RC, STAFResult, STAXResult)
</log>
</else>
</if>
Note that these enviornment variables are set only in the environment of
the process being run on the specified machine.
If you are trying to do something else, please provide more information.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, [EMAIL PROTECTED]
(512) 838-8347 or Tieline 678-8347
Vijita <[EMAIL PROTECTED]>
11/05/2008 12:47 AM
To
staf-users@lists.sourceforge.net
cc
Subject
[staf-users] Setting environmental variables
Hi all,
I want to set environmental variable for perforce, P4PORT and P4USER in
STAX xml job file.
How can I do that?
I have written,
<script> user = 'p4user=vijita' </script>
<process name="'set evn p4port'">
<location>image</location>
<command mode="'shell'">'set'</command>
<parms>'%s' % (user)</parms>
<stdout>'d:/p4port.txt'</stdout>
<stderr mode="'stdout'"/>
<returnstdout/>
</process>
but its not working. Any suggestions please??
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users