<?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: create list of missing variables by subject in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107390#M291851</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;improved version:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id $ v1 v2 v3 v4;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;a 1 2 3 .&lt;/P&gt;&lt;P&gt;b 2 3 . .&lt;/P&gt;&lt;P&gt;c 2 . . .&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;length new $ 50;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;array _v(*) _numeric_;&lt;/P&gt;&lt;P&gt;do _n_=1 to dim(_v);&lt;/P&gt;&lt;P&gt;if _v(_n_)=. then new=catx('-',new,vname(_v(_n_)));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linlin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2012 15:23:46 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2012-05-08T15:23:46Z</dc:date>
    <item>
      <title>create list of missing variables by subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107387#M291848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset in which each line is a subject, and I'm interested in creating a new variable that contains a list of 40 possible variables, but only the ones that are missing for each subject. Is there an existing macro for this task? Can anyone help me figure out how to create a variable that contains a list of variables that is unique to each line in a dataset?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 15:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107387#M291848</guid>
      <dc:creator>aklr</dc:creator>
      <dc:date>2012-05-08T15:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: create list of missing variables by subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107388#M291849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are the variables numeric or character or both?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 15:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107388#M291849</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-05-08T15:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: create list of missing variables by subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107389#M291850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are all numeric.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 15:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107389#M291850</guid>
      <dc:creator>aklr</dc:creator>
      <dc:date>2012-05-08T15:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: create list of missing variables by subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107390#M291851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;improved version:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id $ v1 v2 v3 v4;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;a 1 2 3 .&lt;/P&gt;&lt;P&gt;b 2 3 . .&lt;/P&gt;&lt;P&gt;c 2 . . .&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;length new $ 50;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;array _v(*) _numeric_;&lt;/P&gt;&lt;P&gt;do _n_=1 to dim(_v);&lt;/P&gt;&lt;P&gt;if _v(_n_)=. then new=catx('-',new,vname(_v(_n_)));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linlin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 15:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107390#M291851</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-05-08T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: create list of missing variables by subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107391#M291852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I needed to get rid of the retain. Otherwise I was getting repeated variable names in the list, but otherwise, this is perfect. Exactly what I needed. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 15:44:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107391#M291852</guid>
      <dc:creator>aklr</dc:creator>
      <dc:date>2012-05-08T15:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: create list of missing variables by subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107392#M291853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;"call missing (your-variable)" gets rid of the missing variable names from previous IDs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 16:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107392#M291853</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-05-08T16:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: create list of missing variables by subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107393#M291854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Linlin, since you create a new list for each observation, you don't need the retain, the call missing() or the output statements. It works just as well without them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 16:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107393#M291854</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-05-08T16:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: create list of missing variables by subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107394#M291855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you PG!!!&lt;/P&gt;&lt;P&gt;improved version:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id $ v1 v2 v3 v4;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;a 1 2 3 .&lt;/P&gt;&lt;P&gt;b 2 3 . .&lt;/P&gt;&lt;P&gt;c 2 . . .&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;length new $ 50;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;array _v(*) _numeric_;&lt;/P&gt;&lt;P&gt;do _n_=1 to dim(_v);&lt;/P&gt;&lt;P&gt;if _v(_n_)=. then new=catx('-',new,vname(_v(_n_)));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 16:13:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-list-of-missing-variables-by-subject/m-p/107394#M291855</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-05-08T16:13:18Z</dc:date>
    </item>
  </channel>
</rss>

