tag:blogger.com,1999:blog-7954851561018760025.post1798059134937935694..comments2023-10-11T05:04:46.133-07:00Comments on KanSAS Code: getvartypecount() macro functionUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7954851561018760025.post-68051423812116877362017-04-06T15:14:58.273-07:002017-04-06T15:14:58.273-07:00Hi Quentin, I tried to run the code but did not ha...Hi Quentin, I tried to run the code but did not have the %varlist() macro. I did find that code on the sascommunity.org web site which is very similar to what I have. The %varlist() returns the names of the columns and then does a countw(). My program is less code because it simply counts and returns a number of character or numeric columns. Interesting all the same and I did not realize that was out there so thanks for pointing it out.Tom Bellmerhttps://www.blogger.com/profile/17821122274218687413noreply@blogger.comtag:blogger.com,1999:blog-7954851561018760025.post-57426984310810425602017-04-06T13:25:15.884-07:002017-04-06T13:25:15.884-07:00Nice. If you have %varlist() macro function that ...Nice. If you have %varlist() macro function that takes a dataset as parameter (including any options), you can get this count by:<br />%put %sysfunc(countw(%varlist(sashelp.class(keep=_character_))));Quentinhttps://www.blogger.com/profile/00414335213950814500noreply@blogger.com