Hmm...I hadn't looked at the exact command that you used, but now I noticed that you had used the pipe and the save option. Generally, using the pipe in a command-line isn't supported as it is intended to be run within the CLI session itself. The recommended way to save the text config would be to request it like this:
var $config-rpc = <get-configuration database="committed" format="text">;
var $config = jcs:invoke( $config-rpc );
And then to save it like this:
var $save-rpc = {
<file-put> {
<filename> "test.cnfg"
<encoding> "text";
<file-contents> $config;
}
}
var $results = jcs:invoke( $save-rpc );
As it is, apparently whatever is returned in the result tree causes the file to be saved as part of the result tree processing, but once again, the issue is the jcs:output() displays its output while the script runs, but then, I guess, this action is being performed as part of the result tree processing after the script terminates. Replace jcs:output() with <output> (as a child of <op-script-results>) and the order will be resolved, since <output> is displayed as the result tree gets processed.
Also, could you do me a favor and run your script with | display xml and send the results? I'm curious what exactly your script is sending in its result tree. I've never tried to use a "| save ..." command in that way with the result tree.
Thanks