BookmarkSubscribeRSS Feed
milts
Pyrite | Level 9
i want to get the status of my servers (object spawner, share server, etc) which resides in unix and transferring them to a windows client.

code looks like this:

rsubmit;
filename mylog "../my.log";
proc printto log=myfile;
x "../ObjectSpawner";
x "./ObjectSpawner.sh status";
proc download infile=mylog outfile="..\my.log";run;
endrsubmit;

this just returns to the log info about the execution of proc printto statement. what i want is to get also the message from the x command which prints the status of the server.

can this be attained? or i'm just dreaming haha!

thanks a lot!
3 REPLIES 3
milts
Pyrite | Level 9
to simplify...

is it possible to save results invoked using the x command to the sas log?

thanks
LinusH
Tourmaline | Level 20
X statement just executes stuff. It's primary use is not get information into SAS.
Maybe you can try to use FILENAME PIPE for this?
Or save the output of your script to a separate file, which could download and/or append to the original log file.

/Linus
Data never sleeps
milts
Pyrite | Level 9
yeah thanks! i just redirected the x command to a text file then download the file which is from unix going to windows.

thanks!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 634 views
  • 0 likes
  • 2 in conversation