<?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: find numeric and character missings variables names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/find-numeric-and-character-missings-variables-names/m-p/974721#M377973</link>
    <description>&lt;P&gt;The following code I wrote before is to check the variable with all the missing value under WORK library 's all tables.&lt;/P&gt;
&lt;P&gt;a.k.a It print the variable name which value are all missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;



%let library=work; /*Here is the library I want to search*/&lt;/STRONG&gt;
%macro find_missing_var(dsn);
proc transpose data=&amp;amp;dsn(obs=0) out=vname;
var _all_;
run;
proc sql noprint;
select catx(' ','n(',_name_,') as',_name_) into :vnames separated by ','
from vname;
create table temp as
select &amp;amp;vnames from &amp;amp;dsn;
quit;
proc transpose data=temp out=temp1;
var _all_;
run;
data temp2;
length table_name _name_ $ 100;
table_name="&amp;amp;dsn";
set temp1;
if col1=0;
run;
proc append base=want data=temp2 force;
run;
%mend;
proc delete data=want;
run;
data _null_;
set sashelp.vtable(
 keep=libname memname
 where=(libname="%upcase(&amp;amp;library)")
);
call execute(cats('%nrstr(%find_missing_var(',libname,'.',memname,'))'));
run;
title 'COLUMNS WITHOUT DATA';
proc print;
run;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Sep 2025 08:19:14 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-09-10T08:19:14Z</dc:date>
    <item>
      <title>find numeric and character missings variables names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-numeric-and-character-missings-variables-names/m-p/974713#M377969</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good morning sas community&lt;/P&gt;
&lt;P&gt;How to get numeric &amp;amp; character missing's variable names and respective datasets names in a Library&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 06:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-numeric-and-character-missings-variables-names/m-p/974713#M377969</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2025-09-10T06:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: find numeric and character missings variables names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-numeric-and-character-missings-variables-names/m-p/974718#M377971</link>
      <description>&lt;P&gt;A variable&amp;nbsp;&lt;EM&gt;name&lt;/EM&gt; cannot be "missing". A variable is either present or not present, and when it is present, it has a name, period.&lt;/P&gt;
&lt;P&gt;Please explain in more detail what you want to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS terse one-liners are rarely suited to get a good answer. By now, you should know this.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 07:26:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-numeric-and-character-missings-variables-names/m-p/974718#M377971</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-09-10T07:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: find numeric and character missings variables names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-numeric-and-character-missings-variables-names/m-p/974721#M377973</link>
      <description>&lt;P&gt;The following code I wrote before is to check the variable with all the missing value under WORK library 's all tables.&lt;/P&gt;
&lt;P&gt;a.k.a It print the variable name which value are all missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;



%let library=work; /*Here is the library I want to search*/&lt;/STRONG&gt;
%macro find_missing_var(dsn);
proc transpose data=&amp;amp;dsn(obs=0) out=vname;
var _all_;
run;
proc sql noprint;
select catx(' ','n(',_name_,') as',_name_) into :vnames separated by ','
from vname;
create table temp as
select &amp;amp;vnames from &amp;amp;dsn;
quit;
proc transpose data=temp out=temp1;
var _all_;
run;
data temp2;
length table_name _name_ $ 100;
table_name="&amp;amp;dsn";
set temp1;
if col1=0;
run;
proc append base=want data=temp2 force;
run;
%mend;
proc delete data=want;
run;
data _null_;
set sashelp.vtable(
 keep=libname memname
 where=(libname="%upcase(&amp;amp;library)")
);
call execute(cats('%nrstr(%find_missing_var(',libname,'.',memname,'))'));
run;
title 'COLUMNS WITHOUT DATA';
proc print;
run;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 08:19:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-numeric-and-character-missings-variables-names/m-p/974721#M377973</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-09-10T08:19:14Z</dc:date>
    </item>
  </channel>
</rss>

