I am a SAS Administrator using a Linux/Unix version of SAS, and I would like to be able to automatically scrape PROC SETINIT output from stdout, rather than having to scrape log files. I found the -stdio invocation option (from here: http://support.sas.com/documentation/cdl/en/hostunx/61879/HTML/default/viewer.htm#unx-sysopt-stdio.h...), but the PROC SETINIT output goes to the LOG, which contains a lot more information than I need or want to have to filter. I've tried using ODS and PROC PRINTTO to redirect the LOG-bound output of PROC SETINIT to the OUTPUT destination, thus sending the PROC's output over stdout instead o, f stderr, but I haven't had any success.
Is it possible to redirect SETINIT output (and only SETINIT output) to stdout, or am I over-thinking this? Any suggestions would be greatly appreciated. Thanks!
Will either of these work?
sas -initstmt "proc setinit; endsas;" -nonotes -nonews -stdio
sas -initstmt "proc setinit; endsas;" -nonotes -nonews -nodms 1>&2
Will either of these work?
sas -initstmt "proc setinit; endsas;" -nonotes -nonews -stdio
sas -initstmt "proc setinit; endsas;" -nonotes -nonews -nodms 1>&2
I used the first command with a redirection into grep to filter out a few extra lines some of our canned start-up scripts add (allocating some Meta-based libraries that produced NOTE: lines, that kind of thing).
This is what I came up with, and it fits the bill pretty well:
sas -initstmt "proc setinit; endsas;" -nonotes -nonews -stdio 2>&1 | grep -v -e "NOTE:" -e "User:" -e " The SAS System" -e "^$"
Thanks!
I am also trying to achieve that in windows . can somebody please tell me how can i do that using base sas code?
thanks
jagjit
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: