<?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: Getting rid of all variables for which there are ONLY missing values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172715#M44499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the answer from PGStats works only for numeric variables. If you need a list of character or mixed type variables you can automate it with this macro:&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Testdata &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;test&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;retain&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;v1&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;v2&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;" "&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;sashelp&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;class&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;run&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Macrodefinition&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;%macro&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;keep_not_null&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;,&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;out&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%local&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;varlist&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;nvar&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;keeplist&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;droplist&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;thisvar&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;thisnr&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;i&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;dsid&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;rc&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;libpart&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;mempart&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;dsid&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;open&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;Proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 12.0pt; font-family: 'Courier New'; color: #004080;"&gt;sql&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;noprint&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; due to an inconsistency of &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function "attrn(dsid,NVAR)" and &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function "varname(dsid,pos)" by using &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset option "drop"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i fetch the list of varnames from the sql dictionaries.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;libpart&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%Upcase&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;attrc&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;LIB&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;)));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;mempart&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%Upcase&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;attrc&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;MEM&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;)));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;select&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;name&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;into&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;varlist&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;separated&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;by&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;" "&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;from&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;dictionary&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;columns&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;where&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;upcase&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;libname&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;"&amp;amp;libpart."&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;and&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;upcase&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;memname&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;"&amp;amp;mempart."&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #800040; font-size: 10.0pt; font-family: 'Courier New';"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;nvar&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;sqlobs&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* for every variable in dataset counting the number of nonmissing */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;i&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;1&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%to&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;nvar&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;thisvar&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%scan&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;varlist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;i&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%str&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* probing of variable is in dataset */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;varnum&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisvar&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.))&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;select&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;count&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisvar&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;into&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;thisnr&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;from&lt;/SPAN&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;libpart&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;..&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;mempart&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisnr&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;keeplist&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;keeplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisvar&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%else&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;droplist&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;droplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisvar&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %if %sysfunc(varnum(&amp;amp;dsid.,&amp;amp;thisvar.)) &amp;gt; 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %do i = 1 %to &amp;amp;nvar. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;rc&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;close&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* dropping the variables with missing values in the output dataset */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;Input&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;Output&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;out&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;Keep&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;variables&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;keeplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;Drop&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;variables&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;droplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;quit&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%length&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;keeplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;keep&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;keeplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %if %length(&amp;amp;keeplist.) &amp;gt; 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%length&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;droplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;drop&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;droplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %if %length(&amp;amp;droplist.) &amp;gt; 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;run&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %if &amp;amp;dsid. &amp;gt; 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%else&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%STR&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;ERROR&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;:&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;Can%&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;'t open the dataset "&amp;amp;data.");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%abort&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;%mend;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Macro call&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;option mprint&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%keep_not_null( &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;test(drop=name)&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;out&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;test_out);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;option nomprint&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This macro proof for every variable, whether it contains only missing values or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Oct 2014 11:12:18 GMT</pubDate>
    <dc:creator>jh_ti_bw</dc:creator>
    <dc:date>2014-10-06T11:12:18Z</dc:date>
    <item>
      <title>Getting rid of all variables for which there are ONLY missing values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172713#M44497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working with a dataset where some of the variables have only missing values associated with them. From this dataset, I would like to completely drop all of those particular variables. Is there a way to do this, or do I have to deal with each variable individually? I'm working with over 300 variables, and about 200 of them are the ones I want to drop, so doing a keep statement for the 100 other variables will still be way too time-consuming. I know I can do &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if variable=. then delete&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get rid of my missing values, but I don't know how to tell SAS to get rid of all the variables that don't have any values associated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help would be greatly appreciated!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Oct 2014 23:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172713#M44497</guid>
      <dc:creator>EAIAAUA</dc:creator>
      <dc:date>2014-10-05T23:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rid of all variables for which there are ONLY missing values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172714#M44498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you can automate that task (assuming you only want to get rid of empty NUMERIC variables) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Add empty variables v1 and v2 to test dataset */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data test; set sashelp.class; call missing(v1, v2); run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc univariate data=test outtable=ot(keep=_var_ _nobs_) noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var _numeric_;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select _var_ into :vList separated by " "&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from ot where _nobs_=0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data clean;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;drop &amp;amp;vList;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 01:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172714#M44498</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-10-06T01:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rid of all variables for which there are ONLY missing values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172715#M44499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the answer from PGStats works only for numeric variables. If you need a list of character or mixed type variables you can automate it with this macro:&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Testdata &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;test&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;retain&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;v1&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;v2&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;" "&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;sashelp&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;class&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;run&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Macrodefinition&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;%macro&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;keep_not_null&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;,&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;out&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%local&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;varlist&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;nvar&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;keeplist&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;droplist&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;thisvar&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;thisnr&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;i&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;dsid&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;rc&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;libpart&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;mempart&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;dsid&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;open&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;Proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 12.0pt; font-family: 'Courier New'; color: #004080;"&gt;sql&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;noprint&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; due to an inconsistency of &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function "attrn(dsid,NVAR)" and &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function "varname(dsid,pos)" by using &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset option "drop"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i fetch the list of varnames from the sql dictionaries.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;libpart&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%Upcase&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;attrc&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;LIB&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;)));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;mempart&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%Upcase&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;attrc&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;MEM&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;)));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;select&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;name&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;into&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;varlist&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;separated&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;by&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;" "&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;from&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;dictionary&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;columns&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;where&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;upcase&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;libname&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;"&amp;amp;libpart."&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;and&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;upcase&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;memname&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;"&amp;amp;mempart."&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #800040; font-size: 10.0pt; font-family: 'Courier New';"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;nvar&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;sqlobs&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* for every variable in dataset counting the number of nonmissing */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;i&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;1&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%to&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;nvar&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;thisvar&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%scan&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;varlist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;i&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%str&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* probing of variable is in dataset */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;varnum&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.,&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisvar&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.))&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;select&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;count&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisvar&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;into&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;thisnr&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;from&lt;/SPAN&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;libpart&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;..&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;mempart&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisnr&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;keeplist&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;keeplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisvar&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%else&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;droplist&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;droplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;thisvar&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %if %sysfunc(varnum(&amp;amp;dsid.,&amp;amp;thisvar.)) &amp;gt; 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %do i = 1 %to &amp;amp;nvar. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%let&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;rc&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;close&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;dsid&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.));&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* dropping the variables with missing values in the output dataset */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;Input&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;Output&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;out&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;Keep&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;variables&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;keeplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;Drop&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;variables&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;droplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;quit&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%length&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;keeplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;keep&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;keeplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %if %length(&amp;amp;keeplist.) &amp;gt; 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%if&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%length&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;droplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.)&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #ff0080;"&gt;0&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%then&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;drop&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;&amp;amp;droplist&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;.;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %if %length(&amp;amp;droplist.) &amp;gt; 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;run&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* %if &amp;amp;dsid. &amp;gt; 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%else&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%do&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%put&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%STR&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;ERROR&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;:&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;Can%&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;'t open the dataset "&amp;amp;data.");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%abort&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&amp;nbsp; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%end&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;%mend;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;/* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Macro call&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: green;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;option mprint&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: purple;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: #800040; background: #FFFFBF;"&gt;%keep_not_null( &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;test(drop=name)&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;out&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: #800040;"&gt;=&lt;SPAN lang="EN-US" style="font-size: 8.0pt; font-family: Courier; color: black;"&gt;test_out);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;option nomprint&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This macro proof for every variable, whether it contains only missing values or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 11:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172715#M44499</guid>
      <dc:creator>jh_ti_bw</dc:creator>
      <dc:date>2014-10-06T11:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rid of all variables for which there are ONLY missing values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172716#M44500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This question has been discussed many times in this forum. Search it at this forum firstly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check Mike Zdeb and me .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="60903" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 11:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Getting-rid-of-all-variables-for-which-there-are-ONLY-missing/m-p/172716#M44500</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-10-06T11:55:19Z</dc:date>
    </item>
  </channel>
</rss>

