Hello All,
While running next code I realized that if I specify the data or not in the proc means statement, the result and the log is the same, however, I can't find documentation about this behavior, since all the information states that data should be entered, Could you please let me know if this is a normal behaivor?
Thank you in advance.
data VS;
input id sbp dbp sex $ age wt;
datalines;
1 120 80 M 15 115
2 130 70 F 25 180
3 140 100 M 89 170
;
run;
proc means;
run;
*same result if proc means data=VS; is entered;
SAS procedures that require input datasets with a data= option will automatically use the last created dataset if no such option is specified.
See Input Datasets in the documentation.
Thank you Kurt this information was what I needed.
Regards,
Rodolfo.
Please take a look at the below 2 links that gives some insight. Thanks
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000210371.htm
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000279128.htm
Basically SAS references the most recently created dataset as set in
@rodolfo_1 wrote:
Hello All,
While running next code I realized that if I specify the data or not in the proc means statement, the result and the log is the same, however, I can't find documentation about this behavior, since all the information states that data should be entered, Could you please let me know if this is a normal behaivor?
Thank you in advance.
data VS;
input id sbp dbp sex $ age wt;
datalines;
1 120 80 M 15 115
2 130 70 F 25 180
3 140 100 M 89 170
;
run;proc means;
run;
*same result if proc means data=VS; is entered;
Thank you novinosrin, I'll review this links.
Regards,
Rodolfo.
Seems be documented to me. Here is link to syntax documentation.
The DATA= option is listed as optional.
Clicking on that DATA= link goes to this more detailed section:
Clicking on that Input Data Sets link goes to this comment:
proc print data=emp;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.