If you submit a STAF PROCESS START request without the WAIT option, if the
process is started successfully, the RC will be 0 and the result will
contain the STAF handle number of the process that was started. So, I
think you're confusing the result with the RC.
I don't understand what you mean by "is there a way I can lauch staf as
new instance all the time or cleanup, etc".
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Yohan Gudetti <y_gude...@yahoo.com>
To: Sharon Lucas/Austin/IBM@IBMUS,
Cc: "staf-users@lists.sourceforge.net"
<staf-users@lists.sourceforge.net>
Date: 01/25/2013 01:34 PM
Subject: Re: [staf-users] STAF on remote machine running as
background
Hi Sharon,
Thanks a lot after removing wait it started working. Not thinking of using
API for now.
But when I try repeatedly sometime it fails and error codes are printed in
incrementing order for each time staf is executed,
starting from error code 4 to 11.....
But the same was working fine few times earlier.
Is there a way I can launch staf as new instance all the time or cleanup
etc. using staf 3.4.11,
Your help will be appreciated
Yohan.Gudetti
From: Sharon Lucas <luc...@us.ibm.com>
To: Yohan Gudetti <y_gude...@yahoo.com>
Cc: "staf-users@lists.sourceforge.net" <staf-users@lists.sourceforge.net>
Sent: Wednesday, January 23, 2013 5:33 AM
Subject: Re: [staf-users] STAF on remote machine running as background
Also, I recommend that you use the STAF Perl APIs to submit STAF service
requests via a Perl script. How to do this, including sample programs,
are provided in the STAF Perl User's Guide at
http://staf.sourceforge.net/current/STAFPerl.htm.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
----- Forwarded by Sharon Lucas/Austin/IBM on 01/23/2013 07:30 AM -----
From: Sharon Lucas/Austin/IBM
To: Yohan Gudetti <y_gude...@yahoo.com>,
Cc: "staf-users@lists.sourceforge.net"
<staf-users@lists.sourceforge.net>
Date: 01/23/2013 07:16 AM
Subject: Re: [staf-users] STAF on remote machine running as
background
If you want to start a process via STAF and not wait for it to complete,
one way to do this is to not specify the WAIT option in the START request
you send to the PROCESS service. The default is to start the process
asynchronously and that the START request will then return to the caller
as soon as the process has begun execution. In this case, the process
termination will be saved after the process ends, and will later need to
be FREE'd.
This is documentated in section "8.13 Process Service", sub-section
"8.13.2 START" in the STAF User's Guide at
http://staf.sourceforge.net/current/STAFUG.htm#HDRPROCSRV.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Yohan Gudetti <y_gude...@yahoo.com>
To: "staf-users@lists.sourceforge.net"
<staf-users@lists.sourceforge.net>,
Date: 01/23/2013 12:47 AM
Subject: [staf-users] STAF on remote machine running as background
Hi All,
I am running following staf command in perl program.
It copies files on remote host from one location to other directory
location as below.
#############
1 my $cmdremote200 = "\"staf\" \"machine1567\" \"process\"
\"start\" \"wait\" \"shell\" \"command\" \"robocopy\" \"/S\"
\"c:temp\logs\" \"c:\results\" \"MIR\" ";
2 system($cmdremote200);
3 print "Command executed\n $cmdremote200 \n";
##############
In line 2 command is executed on remote host "machine1567" and stays there
until, it is completed but I want this to happen in background on remote
host. And return to execute line 3 immediately after starting robocopy
command on remote host.
Tried using
system 1, "$cmdremote200";
but doesn't work as there are many arguments in "$cmdremote200" variable.
If any of you know any solution to the above problem please respond to
this thread.
Thanks in advance,
Yohan
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users