Hi,
The SAS Online Documentation suggests that memtype=data in the contents statement of proc datasets.
But when I'm testing with a vew, it seems that memtype=all by default. Did I miss something?
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p1v2467vdjbp7xn1222c7t3sejz3.htm
data vclass / view=vclass;
set sashelp.class;
run;
title 'proc contents';
proc contents data =vclass
memtype=view; *memtype=data by default;
run;
title 'proc datasets';
proc datasets lib=work memtype=cat nolist;
contents data=vclass;* memtype=all by default;
run;
quit;
Hello
Both memtype=view and memtype=all work.
Test with the followig sample code.
data classv / view = classv ;
set sashelp.class;
run;
proc datasets lib=work memtype=view nolist;
contents data=classv;* memtype=all by default;
run;
quit;
proc datasets lib=work memtype=all nolist;
contents data=classv;;
run;
quit;
Hello @xxformat_com
I don't see any descripancy in the documentation and practice.
But when I'm testing with a vew, it seems that memtype=all by default. Did I miss something?
Well when using Contents with Proc datasets one is normally expected to mention the memtype. However it is not necessary.If we do not use the memtype= option in the Proc datasets statement, it takes the value as all (the default value ) and itereates through the all applicable (view and data for contents in addition to all) and generates the result.
Default option is essentially the option the procedure takes when nothing is mentioned.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.