<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Include all numeric variables in array (using _numeric_) except for one numeric variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775363#M246464</link>
    <description>&lt;P&gt;You can use&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_013/lefunctionsref/n1cjm0xdeczcd5n1s7d8ah9x8432.htm" target="_self"&gt; the VNAME function&lt;/A&gt; to check the name of the underlying variable. For example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if vname(missmake[i])^="Age" then ...&lt;/P&gt;</description>
    <pubDate>Wed, 20 Oct 2021 11:06:47 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2021-10-20T11:06:47Z</dc:date>
    <item>
      <title>Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775359#M246463</link>
      <description>&lt;P&gt;Dear SAS experts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to identify for the variables num1-num3 observations which have for one of these variables a value &amp;gt;18. The _numeric_ code in an array statement seems useful to identify num1-num3, but it also includes the variable Age, as Age is also numeric. Is there any way to identify in an array all numeric variables in a dataset except for one (specified) numeric variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the example code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input Name $ Age num1 num2 num3;&lt;BR /&gt;datalines;&lt;BR /&gt;Maria 30 5 2 17&lt;BR /&gt;John 32 3 7 20&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have (drop=i);&lt;BR /&gt;set have;&lt;BR /&gt;disk=.;&lt;BR /&gt;array missmake {*} _numeric_;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /*Is it possible to somehow exclude Age from the array?*/&lt;BR /&gt;do i=1 to dim(missmake);&lt;BR /&gt;if missmake(i)&amp;gt;18 then disk=1;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 10:45:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775359#M246463</guid>
      <dc:creator>mgrasmussen</dc:creator>
      <dc:date>2021-10-20T10:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775363#M246464</link>
      <description>&lt;P&gt;You can use&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_013/lefunctionsref/n1cjm0xdeczcd5n1s7d8ah9x8432.htm" target="_self"&gt; the VNAME function&lt;/A&gt; to check the name of the underlying variable. For example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if vname(missmake[i])^="Age" then ...&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:06:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775363#M246464</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-10-20T11:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775364#M246465</link>
      <description>&lt;P&gt;You can exclude Age from your input set with option drop:&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;set have(drop=Age);&amp;nbsp; &amp;nbsp;merge or join later on Name if you want Age&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Perhaps a better option to populate the array with only desired vars:&amp;nbsp;&amp;nbsp;array missmake(*) num1-num3;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775364#M246465</guid>
      <dc:creator>Michael_Harper</dc:creator>
      <dc:date>2021-10-20T11:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775365#M246466</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case you could use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array missmake {*} num1-num3;  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To the broader question, there are some %varlist macro functions floating around the internet.&amp;nbsp; Some of them would allow you to do something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array missmake {*} %varlist(have(keep=_numeric_ drop=age)) ;  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:18:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775365#M246466</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-10-20T11:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775369#M246467</link>
      <description>&lt;P&gt;Hey Quentin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately the data is not ordered as the example I gave.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am looking for a solution like the one you suggest. However, I cannot get the syntax to work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input Name $ Age num1 num2 num3;&lt;BR /&gt;datalines;&lt;BR /&gt;Maria 30 5 2 17&lt;BR /&gt;John 32 3 7 20&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have (drop=i);&lt;BR /&gt;set have;&lt;BR /&gt;disk=.;&lt;BR /&gt;array missmake {*} %varlist(have(keep=_numeric_ drop=age)); &lt;BR /&gt;do i=1 to dim(missmake);&lt;BR /&gt;if missmake(i)&amp;gt;18 then disk=1;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know what the issue is?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775369#M246467</guid>
      <dc:creator>mgrasmussen</dc:creator>
      <dc:date>2021-10-20T11:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775372#M246468</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388382"&gt;@mgrasmussen&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;When you can't get the syntax to work, show us the LOG. We need to see the entire LOG from your brief code, every single line of the LOG with nothing deleted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although most likely you don't have access to %varlist, but we can't know for sure without seeing your LOG&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775372#M246468</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-20T11:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775374#M246470</link>
      <description>&lt;P&gt;The solution would be to define the array before AGE becomes part of the data set.&amp;nbsp; In a DATA step, _numeric_ refers to all currently defined numeric variables, not those defined later.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   if 5=4 then set have (drop=age);
   array missmake {*} _numeric_;
   set have;
   do i=1 to dim(missmake);
      if missmake{i} &amp;gt; 18 then disk=1;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A slightly speedier loop would use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;do i=1 to dim(missmake) until (disk=1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Once a single value &amp;gt; 18 is found,&amp;nbsp; you don't have to check the rest of the variables.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:52:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775374#M246470</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-10-20T11:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775375#M246471</link>
      <description>&lt;P&gt;Hey PaigeMiller&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 The SAS System 13:53 Wednesday, October 20, 2021&lt;/P&gt;
&lt;P&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Tester _numeric_ og afgrænsning ift. variable';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;8 %LET _SASPROGRAMFILE='T:\ouh\afd\SDCO_Staben\Personlige mapper\Martin Gillies Rasmussen\SAS test\Tester _numeric_ og&lt;BR /&gt;8 ! afgrænsning ift. variable.sas';&lt;BR /&gt;9 %LET _SASPROGRAMFILEHOST='L111353';&lt;BR /&gt;10 &lt;BR /&gt;11 ODS _ALL_ CLOSE;&lt;BR /&gt;12 OPTIONS DEV=PNG;&lt;BR /&gt;13 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;14 FILENAME EGSR TEMP;&lt;BR /&gt;15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;16 STYLE=HtmlBlue&lt;BR /&gt;17 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")&lt;BR /&gt;18 NOGTITLE&lt;BR /&gt;19 NOGFOOTNOTE&lt;BR /&gt;20 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;SYMBOLGEN: Macro variable SASWORKLOCATION resolves to "E:\Work\_TD1384960_SRVESBAPPSAS34V_\Prc2/"&lt;BR /&gt;21 ENCODING=UTF8&lt;BR /&gt;22 options(rolap="on")&lt;BR /&gt;23 ;&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;24 &lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 data have (drop=i);&lt;BR /&gt;27 set have;&lt;BR /&gt;28 disk=.;&lt;BR /&gt;29 array missmake {*} %varlist(have(keep=_numeric_ drop=age));&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;WARNING: Apparent invocation of macro VARLIST not resolved.&lt;BR /&gt;29 array missmake {*} %varlist(have(keep=_numeric_ drop=age));&lt;BR /&gt;____&lt;BR /&gt;68&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a numeric constant, $, (, ;, VARCHAR, _ALL_, _CHARACTER_, &lt;BR /&gt;_CHAR_, _NUMERIC_, _TEMPORARY_.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;
&lt;P&gt;ERROR 68-185: The function HAVE is unknown, or cannot be accessed.&lt;/P&gt;
&lt;P&gt;29 array missmake {*} %varlist(have(keep=_numeric_ drop=age));&lt;BR /&gt;____&lt;BR /&gt;22&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, &lt;BR /&gt;GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, [, ^=, {, |, ||, ~=.&lt;/P&gt;
&lt;P&gt;ERROR: The array missmake has been defined with zero elements.&lt;BR /&gt;ERROR: Undeclared array referenced: varlist.&lt;BR /&gt;29 array missmake {*} %varlist(have(keep=_numeric_ drop=age));&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: +, =. &lt;BR /&gt;2 The SAS System 13:53 Wednesday, October 20, 2021&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;29 array missmake {*} %varlist(have(keep=_numeric_ drop=age));&lt;BR /&gt;_&lt;BR /&gt;76&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;
&lt;P&gt;ERROR: Cannot use _numeric_ as a variable name.&lt;BR /&gt;30 do i=1 to dim(missmake);&lt;BR /&gt;31 if missmake(i)&amp;gt;18 then disk=1;&lt;BR /&gt;ERROR: Too many array subscripts specified for array missmake.&lt;BR /&gt;32 end;&lt;BR /&gt;33 run;&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;MVA_DSIO.OPEN_CLOSE| _DISARM| STOP| _DISARM| 2021-10-20T13:54:14,446+02:00| _DISARM| WorkspaceServer| _DISARM| | _DISARM| | &lt;BR /&gt;_DISARM| | _DISARM| 22138880| _DISARM| 10| _DISARM| 18| _DISARM| 16071| _DISARM| 9055598| _DISARM| | _DISARM| | _DISARM| | _DISARM| &lt;BR /&gt;| _DISARM| | _DISARM| | _ENDDISARM &lt;BR /&gt;WARNING: The data set WORK.HAVE may be incomplete. When this step was stopped there were 0 observations and 9 variables.&lt;BR /&gt;MVA_DSIO.OPEN_CLOSE| _DISARM| STOP| _DISARM| 2021-10-20T13:54:14,446+02:00| _DISARM| WorkspaceServer| _DISARM| | _DISARM| | &lt;BR /&gt;_DISARM| | _DISARM| 22138880| _DISARM| 10| _DISARM| 18| _DISARM| 3997| _DISARM| 9058342| _DISARM| | _DISARM| | _DISARM| | _DISARM| &lt;BR /&gt;| _DISARM| | _DISARM| | _ENDDISARM &lt;BR /&gt;WARNING: Data set WORK.HAVE was not replaced because this step was stopped.&lt;BR /&gt;PROCEDURE| _DISARM| STOP| _DISARM| 2021-10-20T13:54:14,446+02:00| _DISARM| WorkspaceServer| _DISARM| | _DISARM| | _DISARM| &lt;BR /&gt;| _DISARM| 22138880| _DISARM| 10| _DISARM| 18| _DISARM| 153195| _DISARM| 9060528| _DISARM| | _DISARM| | _DISARM| | _DISARM| | &lt;BR /&gt;_DISARM| | _DISARM| | _ENDDISARM &lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.04 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;P&gt;34 &lt;BR /&gt;35 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;36 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;37 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;38 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;39 %LET _CLIENTPROJECTPATHHOST=;&lt;BR /&gt;40 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;41 %LET _SASPROGRAMFILE=;&lt;BR /&gt;42 %LET _SASPROGRAMFILEHOST=;&lt;BR /&gt;43 &lt;BR /&gt;44 ;*';*";*/;quit;run;&lt;BR /&gt;45 ODS _ALL_ CLOSE;&lt;BR /&gt;46 &lt;BR /&gt;47 &lt;BR /&gt;48 QUIT; RUN;&lt;BR /&gt;49&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775375#M246471</guid>
      <dc:creator>mgrasmussen</dc:creator>
      <dc:date>2021-10-20T11:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775378#M246472</link>
      <description>&lt;P&gt;You don't have a %varlist macro. As stated by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;, you can find one on the internet and download it to your computer and then include it in your SAS program.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 12:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775378#M246472</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-20T12:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775384#M246474</link>
      <description>&lt;P&gt;Thanks. I got it to work using vname. Appreciate it.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 12:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775384#M246474</guid>
      <dc:creator>mgrasmussen</dc:creator>
      <dc:date>2021-10-20T12:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Include all numeric variables in array (using _numeric_) except for one numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775392#M246476</link>
      <description>&lt;P&gt;Here's an example of the %varlist macro function approach.&amp;nbsp; There are likely better / more fully featured %varlist macros available elsewhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro VarList(data) ;
  %local rc varnames ;
  %let rc = %sysfunc(dosubl(%nrstr(
    proc contents data=&amp;amp;data out=__ExpandVarList(keep=name) noprint ;
    run ;
    proc sql noprint ;
      select name into :varnames separated by ' '
      from __ExpandVarList ;   
      drop table __ExpandVarList ;
    quit ;
  )));

&amp;amp;varnames /*return*/
%mend ;

%put %varlist(sashelp.class) ;
%put %varlist(sashelp.class(keep=_numeric_ )) ;
%put %varlist(sashelp.class(keep=_numeric_ drop=age)) ;

data want ;
  set sashelp.class ;
  array x {*} %varlist(sashelp.class(keep=_numeric_ drop=age)) ;

  do i=1 to dim(x) ;
    put name= x{i}= ;
  end ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Oct 2021 13:06:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Include-all-numeric-variables-in-array-using-numeric-except-for/m-p/775392#M246476</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-10-20T13:06:58Z</dc:date>
    </item>
  </channel>
</rss>

