Please see my previous response which explains what you are doing wrong in 
your FS COPY request.

Also,  you should be checking the RC and STAFResult after the <stafcmd> 
that does the FS COPY request so that you can get more information if an 
error occurs.  Just saying that a STAF command failed is not helpful 
without providing the RC and result from the STAF command that failed (as 
well as the actual STAF command that failed).

  <stafcmd name ="'Copying file from remote machine ..... '">
    <location>machName</location>
    <service>'FS'</service>
    <request>'COPY FILE /sangram/test.out TOFILE c:/STAF/stax_jobs/
test.out'</request>
  </stafcmd>

  <if expr="RC != 0">
    <message log="1">'RC: %s, Result: %s' % (RC, STAFResult)</message> 
  </if>

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




Sangram Bakshi <san...@gmail.com> 
03/02/2009 07:22 AM

To
staf-users@lists.sourceforge.net
cc

Subject
Re: [staf-users] Copying file from remote machine to user machine.






Hi ,
 
To add to the information. I am trying to execute the following xml :
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "C:\STAF\stax.dtd">
<stax>
<!--
The following <script> element is overriden if the global_vars.py 
SCRIPTFILE is used
A SCRIPTFILE can be specified either in the STAX Monitor, or directly when 
submitting a job to STAX
-->
<script>
  machName = '155.35.7.24'
  from com.ibm.staf import STAFUtil
  action ='/acunix/utilities/quick_sanity/do_sanity.sh'
  build_path='/work/_AIX5'
  acversion='R12'
  qash_path='/acunix/work/QA/QASH'
  dir_name_source='/sangram/test.out'
  dir_name_dest='C:/STAF/stax_jobs'
 </script>
<defaultcall function="Main"/>
<function name="Main">
<sequence>
   <stafcmd name="'Delaying for 30 seconds  AAAAAAAA'">
                <location>machName</location>
                <service>'delay'</service>
                <request>'delay 30000'</request>
   </stafcmd>
      
   <process name="'Starting Quick Sanity Testing .....'">
        <location>machName</location>
        <command 
mode="'shell'">'/acunix/utilities/quick_sanity/do_sanity.sh ' </command>
        <stdout>'/sangram/test.out'</stdout>
        <stderr mode="'stdout'"/>
        <returnstdout/>
   </process>
      
<if expr="RC !=0">
  <message>'RC: %s result: %s' % (RC, STAFResult)</message>
  
</if>
    <stafcmd name ="'Copying file from remote machine ..... '">
         <location>machName</location>
         <service>'FS'</service>
         <request>'COPY FILE /sangram/test.out TOFILE c:/STAF/stax_jobs/ 
TOMACHINE 155.35.3.229'</request>
     </stafcmd>
 
</sequence>
</function>
</stax>
 
 
But i am not able to copy file /sangram/test.out to machine 155.35.3.229 
from machine 155.35.7.24.
 
Regards
Sangram

On Mon, Mar 2, 2009 at 5:59 PM, Sangram Bakshi <san...@gmail.com> wrote:
Hi,
 
I want to copy files from a remote machine (m2) to machine (m1). I am 
running a stax xml application in machine m1 .
 
m1 ============== m2
 
A command is run on machine m2 from machine m1 through the xml . A report 
file is created at remote machine m2. I want to get the file from m2 to m1 
. How can i write it in the xml .
 
 
I  would like to do something like :
 
STAF m2 FS COPY FILE /sangram/test.log  TOFILE 
c:/STAF/staf_jobs/ TOMACHINE m2
 
I want to write this is the xml something like this 
 
 <stafcmd>
         <location>machName</location>
         <service>'FS'</service>
         <request>'COPY FILE /sangram/test.log  TOFILE 
c:/STAF/staf_jobs/ TOMACHINE m2'</request>
     </stafcmd>
 
Is this right .Kindly let me know if i am writing the proper thing in the 
xml.
 
Regards
Sangram
 
 
 
 
 
 
 
 
 
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, 
CA
-OSBC tackles the biggest issue in open source: Open Sourcing the 
Enterprise
-Strategies to boost innovation and cut costs with open source 
participation
-Receive a $600 discount off the registration fee with the source code: 
SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to