<?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: Send this IML output to dataset instead of result window in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419343#M3878</link>
    <description>Proc Freq can't output all of the variables to a dataset, which is the original issue raised here.</description>
    <pubDate>Thu, 07 Dec 2017 21:02:28 GMT</pubDate>
    <dc:creator>ProcWes</dc:creator>
    <dc:date>2017-12-07T21:02:28Z</dc:date>
    <item>
      <title>Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419318#M3871</link>
      <description>&lt;P&gt;This is either impossible or really easy, but today's the first day I've ever looked at IML. &amp;nbsp;I am using this code to analyze a dataset to see what percent is missing for each variable. &amp;nbsp;I need the results in a dataset instead of a result window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc iml;
use one;
read all var _NUM_ into x[colname=nNames]; 
n = countn(x,"col");
nmiss = countmiss(x,"col");
 
read all var _CHAR_ into x[colname=cNames]; 
close one;
c = countn(x,"col");
cmiss = countmiss(x,"col");
 
/* combine results for num and char into a single table */
Names = cNames || nNames;
rNames = {"    Missing", "Not Missing"};
cnt = (cmiss // c) || (nmiss // n);
print cnt[r=rNames c=Names label=""];
quit;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419318#M3871</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2017-12-07T19:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419320#M3872</link>
      <description>&lt;P&gt;Here's a blog post with instructions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/04/18/writing-data-from-a-matrix-to-a-sas-data-set.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2011/04/18/writing-data-from-a-matrix-to-a-sas-data-set.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151081"&gt;@ProcWes&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;This is either impossible or really easy, but today's the first day I've ever looked at IML. &amp;nbsp;I am using this code to analyze a dataset to see what percent is missing for each variable. &amp;nbsp;I need the results in a dataset instead of a result window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc iml;
use one;
read all var _NUM_ into x[colname=nNames]; 
n = countn(x,"col");
nmiss = countmiss(x,"col");
 
read all var _CHAR_ into x[colname=cNames]; 
close one;
c = countn(x,"col");
cmiss = countmiss(x,"col");
 
/* combine results for num and char into a single table */
Names = cNames || nNames;
rNames = {"    Missing", "Not Missing"};
cnt = (cmiss // c) || (nmiss // n);
print cnt[r=rNames c=Names label=""];
quit;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419320#M3872</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-07T19:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419322#M3873</link>
      <description>&lt;P&gt;Thanks for the reply. &amp;nbsp;I was unable to apply that blog to this code. &amp;nbsp;Good effort though.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419322#M3873</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2017-12-07T19:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419324#M3874</link>
      <description>&lt;P&gt;Post what you've tried then and we can point out where it's incorrect.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:58:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419324#M3874</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-07T19:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419326#M3875</link>
      <description>&lt;PRE&gt;proc iml;
use one;
read all var _NUM_ into x[colname=nNames]; 
n = countn(x,"col");
nmiss = countmiss(x,"col");
 
read all var _CHAR_ into x[colname=cNames]; 
close one;
c = countn(x,"col");
cmiss = countmiss(x,"col");
 
/* combine results for num and char into a single table */
Names = cNames || nNames;
rNames = {"    Missing", "Not Missing"};
cnt = (cmiss // c) || (nmiss // n);
print cnt[r=rNames c=Names label=""];
create wes;
append from cnt;
close wes;
quit;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Dec 2017 20:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419326#M3875</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2017-12-07T20:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419341#M3876</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create wes var {cnt};
append;
close wes;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;This is closer but probably not what you want. I would reshape it using T as indicated in the comments here, where I'm assuming your code also originates from.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should also note the comments,&amp;nbsp;PROC FREQ is considered faster this solution is not optimized within IML.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 20:59:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419341#M3876</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-07T20:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419342#M3877</link>
      <description>&lt;P&gt;I figured it out on my own. &amp;nbsp;Posting this for anyone who finds this post later. &amp;nbsp;This would work to analyze a set to find missing rates of all variables, but it runs out of memory for my large data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc iml;
use one;
read all var _NUM_ into x[colname=nNames]; 
n = countn(x,"col");
nmiss = countmiss(x,"col");
 
read all var _CHAR_ into x[colname=cNames]; 
close one;
c = countn(x,"col");
cmiss = countmiss(x,"col");
 
/* combine results for num and char into a single table */
Names = cNames || nNames;
VarName = {"Missing", "Not Missing"};
cnt = (cmiss // c) || (nmiss // n);
print cnt[r=VarName c=Names label=""];
create wes from cnt[rowname=VarName colname=names];
append from cnt[rowname=VarName];
close wes;
quit;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Dec 2017 21:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419342#M3877</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2017-12-07T21:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419343#M3878</link>
      <description>Proc Freq can't output all of the variables to a dataset, which is the original issue raised here.</description>
      <pubDate>Thu, 07 Dec 2017 21:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419343#M3878</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2017-12-07T21:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419346#M3879</link>
      <description>&lt;P&gt;Why not? Same out of memory error?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151081"&gt;@ProcWes&lt;/a&gt; wrote:&lt;BR /&gt;Proc Freq can't output all of the variables to a dataset, which is the original issue raised here.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 21:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419346#M3879</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-07T21:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419352#M3880</link>
      <description>&lt;P&gt;No, because Proc Freq doesn't create a table that looks like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Var1 &amp;nbsp; &amp;nbsp;Var2&lt;/P&gt;&lt;P&gt;Missing &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;&lt;P&gt;NotMissing &amp;nbsp; 8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 21:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419352#M3880</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2017-12-07T21:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419357#M3881</link>
      <description>&lt;P&gt;Not by default but it easily can. In this one the format is transposed, from what you indicated, but PROC TRANSPOSE can easily fix that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/2de1faf1644dc8160fe721056202f111" target="_blank"&gt;https://gist.github.com/statgeek/2de1faf1644dc8160fe721056202f111&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 21:21:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419357#M3881</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-07T21:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419392#M3882</link>
      <description>&lt;P&gt;See &lt;A href="https://blogs.sas.com/content/iml/2011/04/18/writing-data-from-a-matrix-to-a-sas-data-set.html" target="_self"&gt;"Writing data from a matrix to a SAS data set"&lt;/A&gt;&amp;nbsp;for an example, or &lt;A href="http://go.documentation.sas.com/?docsetId=imlug&amp;amp;docsetTarget=imlug_langref_sect093.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;the SAS/IML documentation for the CREATE statement.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 22:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419392#M3882</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-12-07T22:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419394#M3883</link>
      <description>How do I mark this as not helpful? This is the same blog Reeza posted earlier.</description>
      <pubDate>Thu, 07 Dec 2017 22:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419394#M3883</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2017-12-07T22:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Send this IML output to dataset instead of result window</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419399#M3884</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151081"&gt;@ProcWes&lt;/a&gt; wrote:&lt;BR /&gt;How do I mark this as not helpful? This is the same blog Reeza posted earlier.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Seriously? Ever heard of the saying, if you don't have something nice to say don't say anything at all.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You realize Rick is the person who originally posted those blogs and takes the time to write them in the first place?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 22:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Send-this-IML-output-to-dataset-instead-of-result-window/m-p/419399#M3884</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-07T22:32:57Z</dc:date>
    </item>
  </channel>
</rss>

