Note that to run a process via a STAX job, you generally should use the <process> element, not the <stafcmd> element (unless you don't want to wait for the command that you're running to complete). For example:
<process> <location>'remoteMachine'</location> <command>'notepad'</command> <stderr mode="'stdout'"/> <returnstdout/> </process> <if expr="RC != STAFRC.Ok"> <log message="1"> 'Notepad failed with RC=%s STAFResult=%s STAXResult=%s' % (RC, STAFResult, STAXResult) </log> </if> More information on this is in the STAX User's Guide at http://staf.sourceforge.net/current/STAX/staxug.html. -------------------------------------------------------------- Sharon Lucas IBM Austin, luc...@us.ibm.com (512) 286-7313 or Tieline 363-7313 From: Ahmed Mostafa <eng.ahmed2...@gmail.com> To: STAF <staf-users@lists.sourceforge.net> Date: 09/22/2010 07:08 AM Subject: Re: [staf-users] Help required with STAF Hi Fazal, These steps assume you installed and configured STAX. If you are using STAF only you can do the same test with the following command (from command line of machine B): staf address_or_name_of_machine_A PROCESS Start Command notepad Wait ReturnStdOut ReturnStdErr Regards On 22 September 2010 14:22, sunny arora <sunnyaror...@gmail.com> wrote: run StafProc.exe on both machines create an xml file with the following contents xyz.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE stax SYSTEM "stax.dtd"> <stax> <defaultcall function="Main"/> <function name = "Main"> <sequence> <stafcmd> <location>'remoteMachine'</location> <service>'PROCESS'</service> <request>'START COMMAND notepad'</request> </stafcmd> <if expr="RC != STAFRC.Ok"> <log message="1"> 'Starting Notepad failed with RC=%s STAFResult=%s' % (RC, STAFResult) </log> </if> </sequence> </function> </stax> select the follwing file in STAXMonitor on host machine and run it. the notepad wil be opened on your remote machine. set the trust level of both the machines in staf.cfg file on both machines to 5. -- Thanks and Regards, Sunny On Wed, Sep 22, 2010 at 12:10 PM, fazal waseem <fazal.was...@gmail.com> wrote: Thanks sunny Can you guide me on how to write these commands and execute them. On Wed, Sep 22, 2010 at 3:59 PM, sunny arora <sunnyaror...@gmail.com> wrote: Hi, you can do the same as below: <stafcmd> <location>'remoteMachine'</location> <service>'PROCESS'</service> <request>'START COMMAND notepad'</request> </stafcmd> <if expr="RC != STAFRC.Ok"> <log message="1"> 'Starting Notepad failed with RC=%s STAFResult=%s' % (RC, STAFResult) </log> </if> Thanks and Regards, Sunny On Wed, Sep 22, 2010 at 11:16 AM, fazal waseem <fazal.was...@gmail.com > wrote: Hi, I am pretty new to use STAF. My requirements is such that I want to remotely open a notepad in another machine so that I can learn the framework functioning. Can someone help me on how to do it. Thanks, Waseem ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users -- ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users -- Ahmed Mostafa Abdel-Baky Associate Software Engineer DB2 NSE Support Cairo Technology Development Center IBM Egypt Mobile: 0110887370 Office: +202-35361459 E-mail: ab...@eg.ibm.com ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users