Hi Josh,
Section "Request Syntax, sub-section "EXECUTE", sub-sub-section "Results"
in the STAX User's Guide at
http://staf.sourceforge.net/current/STAX/staxug.html#Header_Execute
contains information on the result returned by a STAX EXECUTE request.
Since your STAX job actually started execution and ran, the RC returned is
0. Since you specified the WAIT, RETURNRESULT, and DETAILS options for
your STAX EXECUTE request and the job completed within 10 minutes, the
result buffer contains a marshalled
<Map:STAF/Service/STAX/JobDetailedResult> whose map definition is
described in detail in this section. One field within this marshalled map
data is "result" which is set to a string value of whatever your job
returned (in your case, your job returned "1" for the result value).
The STAF command line executable allows you to execute STAF commands and
see the result in a formatted manner but does not allow you to unmarshall
the result. To unmarshall the result, STAF provides APIs to do so for
C/C++, Java, Python, Perl, and Tcl. The STAF User Guides for Java,
Python, Perl, and Tcl (available via the STAF documentation web page at
http://staf.sourceforge.net/docs.php) describe these APIs and provides
examples. Using the STAF APIs provided, via a C/C++ or Java program or a
Python, Perl, or Tcl script, you can submit STAF service requests and
easily get the values of the individual fields in the marshalled map
result.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Josh <smy...@gmail.com>
To: staf-users@lists.sourceforge.net,
Date: 05/10/2012 11:02 AM
Subject: [staf-users] STAF Runlevel / Return value
Hi all,
I am executing the following command:
staf local stax EXECUTE FILE file.xml WAIT 10m RETURNRESULT DETAILS
Which is returning the following output:
-------- { Job ID : 35 Start Date-Time: 20120510-09:44:57 End Date-Time :
20120510-09:45:08 Status : Normal Result : 1 Job Log Errors : [] Testcase
Totals: { Tests : 1 Passes: 0 Fails : 1 } Testcases : [**Removed for
brevity**] } ] }
---
I am trying to get the RUNLEVEL in console/dos to reflect result of 1 as
indicated by the "Result". But for some reason this command is always
returning 0. I need STAF to return an error value back to console when
something goes wrong. This seems like it should be a fairly common
operation, but I am having trouble tracking down documentation on this.
Thanks,
Josh
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users