Is there a way to open a SAS dataset for viewing (i.e., in the "ViewTable" window) from within a .sas file?
To access your data file(s), select File → Open → Data and then select SAS Servers. Next, select the library that you defined in your LIBNAME statement. 12. You can now access your SAS data set(s) to use in your SAS software application.
No SAS software or ODBC configurations are required. The addin directly reads the SAS file and then inserts the data and metadata into your worksheet.
1) Open SAS Enterprise Guide, highlight File on the Menu bar, and select Import Data. 2) The Open Dialog box will open. Navigate to the location of your file, highlight it, and click the Open button. 3) Now the Import Data Dialog box will open.
I think this will do what you want:
dm log "vt sashelp.air";
Just change the "sashelp.air"
part to your lib.table
combo.
dw.mackie's answer is right on the money. That works great when submitted from the SAS editor window.
But I just want to caution you to be careful if you attempt it in batch mode (that is, having SAS run a .sas program directly from command-line using the -sysin option). It will indeed attempt to pop open the interactive SAS window environment upon execution.
But, if your batch code also attempts to build some graphs/charts, you'll be required to use the -noterminal option. And the -noterminal option isn't compatible with the dm command. You'd spot it right away in the log, but I just wanted to give you a heads-up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With