Hi all,
 
http://support.sas.com/documentation/cdl/en/bisag/68240/HTML/default/viewer.htm#p0m27cjip6kjkvn1lhz7...
 
I'm excuting the following code out of a SAS EG session (Win7, SAS 9.4, EG 7.13 HF3).
 
options noxwait xsync;
data _null_;
  length cmd $2000;
  cmd='"C:\Program Files\SASHome\SASPlatformObjectFramework\9.4\tools\admin\sas-recover-metadata.exe"';
  cmd=catx(' ',cmd,"-host %sysfunc(getoption(metaserver))");
  cmd=catx(' ',cmd,"-port %sysfunc(getoption(metaport))");
  cmd=catx(' ',cmd,"-user %sysfunc(getoption(metauser))"); 
  cmd=catx(' ',cmd,"-password &metapw_tmp"); 
  cmd=catx(' ',cmd,"-time 2017-03-16T18:22:27"); 
  cmd=catx(' ',cmd,"-rollForward"); 
  cmd=catx(' ',cmd,"-list");
/*  cmd=catx(' ',cmd,'>>c:\temp\list.txt');*/
  call system(cmd);
  stop;
run;
 
This works as expected and I'm seeing the following in a DOS prompt:

 
I've got two challenges where I just can't find a solution.
 
1. Capture message
I would like to capture the returned message from sas-recover_metadata.exe - just what I get in the DOS prompt in above screen shot.
When running the command directly out of a DOS prompt I simply add >>c:\temp\list.txt. That works just fine. BUT when I'm adding this bit to my call system() command as done in above code (the bit in comment) then things fall over and I end up with the following:

What am I missing??
 
2. Suppress DOS window
When using call system() is there any way how I could suppress the DOS prompt to show up? Something similar to -nosplash?
 
What I actually want: Just run sas-recover_metadata.exe and write any return messages back to the SAS log. I understand that this runs as a child process so I was thinking to just write everything to a temporary file and then write the content of this file back to the SAS log (via a data _null_ step).
 
Any guidance, pointers or working code would be highly appreciated.
What's a given: Execution out of SAS EG and/or a Stored Process.