Hi everyone!
I have a few questions in regards to a few things. mainly trying to figure out a few things for a class I am currently taking. So, going to post some of the questions:
What are the functions of the '*' and the ' /* */' combination?
-Basically, they are mainly used for creating comments correct?
With exporting in SAS, what happens if the file type does not match the dbms? And what is a way to avoid this in general? Or an ingenious way to avoid this?
Say I want to import an EXCEL sheet with the following code:
PROC IMPORT OUT= AGR.myfirstdata
DATAFILE= "&path.&XL_in"
DBMS=xls REPLACE;
RANGE="Data";*use either range or sheet but not both;
*Sheet=CIR_02;
GETNAMES=YES;
RUN;
proc print data=AGR.myfirstdata;run;
What happens if I put all the lines into one sheet? Nothing happens? Do I get a premature termination and an error? SAS terminates and a force restart?
I have tried it for myself. I just want to make sure I am on the right path. Also, discussed with my tutor, but again.. want to double check on everything before I steam ahead.
@Kris18 wrote:
With exporting in SAS, what happens if the file type does not match the dbms? And what is a way to avoid this in general? Or an ingenious way to avoid this?
Say I want to import an EXCEL sheet with the following code:
PROC IMPORT OUT= AGR.myfirstdata
DATAFILE= "&path.&XL_in"
DBMS=xls REPLACE;
RANGE="Data";*use either range or sheet but not both;
*Sheet=CIR_02;
GETNAMES=YES;
RUN;
proc print data=AGR.myfirstdata;run;
SAS isn't going to care about the file extension, it writes the file with the DBMS specified.
I'm assuming by 'file type' you mean extension? You can change that to whatever you want, it may or may not change the underlying data but that has nothing to do with SAS and more to do with how the file system and other applications work.
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.
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.