<?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 create time using proc iml and loop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-time-using-proc-iml-and-loop/m-p/373998#M276270</link>
    <description>&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a time matrix using the proc iml function, the ideal output would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;time1 &amp;nbsp; &amp;nbsp;time2 &amp;nbsp; time3 &amp;nbsp;time4 &amp;nbsp; &amp;nbsp; ...&amp;nbsp;time 1339 time1440&lt;/P&gt;&lt;P&gt;0:00 &amp;nbsp; &amp;nbsp; 0:01 &amp;nbsp; &amp;nbsp; 0:02 &amp;nbsp; &amp;nbsp;0:03 &amp;nbsp; &amp;nbsp; &amp;nbsp;.... &amp;nbsp;23:59 &amp;nbsp; &amp;nbsp; &amp;nbsp; 24:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current codes are like this, but does not work:&lt;/P&gt;&lt;PRE&gt;proc iml;

time = {'0:00't:'24:00't};
mattrib time format =timeampm.;

create matrix var {"Time"};
append;
close matrix;&lt;/PRE&gt;&lt;P&gt;I think looping would help but not sure what extactly to do, but writing the time for 1440 times definitely is not the solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2017 15:13:11 GMT</pubDate>
    <dc:creator>panda</dc:creator>
    <dc:date>2017-07-07T15:13:11Z</dc:date>
    <item>
      <title>create time using proc iml and loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-time-using-proc-iml-and-loop/m-p/373998#M276270</link>
      <description>&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a time matrix using the proc iml function, the ideal output would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;time1 &amp;nbsp; &amp;nbsp;time2 &amp;nbsp; time3 &amp;nbsp;time4 &amp;nbsp; &amp;nbsp; ...&amp;nbsp;time 1339 time1440&lt;/P&gt;&lt;P&gt;0:00 &amp;nbsp; &amp;nbsp; 0:01 &amp;nbsp; &amp;nbsp; 0:02 &amp;nbsp; &amp;nbsp;0:03 &amp;nbsp; &amp;nbsp; &amp;nbsp;.... &amp;nbsp;23:59 &amp;nbsp; &amp;nbsp; &amp;nbsp; 24:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current codes are like this, but does not work:&lt;/P&gt;&lt;PRE&gt;proc iml;

time = {'0:00't:'24:00't};
mattrib time format =timeampm.;

create matrix var {"Time"};
append;
close matrix;&lt;/PRE&gt;&lt;P&gt;I think looping would help but not sure what extactly to do, but writing the time for 1440 times definitely is not the solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 15:13:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-time-using-proc-iml-and-loop/m-p/373998#M276270</guid>
      <dc:creator>panda</dc:creator>
      <dc:date>2017-07-07T15:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: create time using proc iml and loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-time-using-proc-iml-and-loop/m-p/374153#M276271</link>
      <description>&lt;P&gt;Why not post it at IML forum ? since it is about IML question&lt;CODE&gt;.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;Fixed a problem.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt; proc iml; time=do('0:00't,'24:00't,'00:01't); vname='time1':'time'+char(ncol(time)); mattrib time format=hhmm5.; create want from time[c=vname]; append from time; close; quit;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jul 2017 05:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-time-using-proc-iml-and-loop/m-p/374153#M276271</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-07-08T05:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: create time using proc iml and loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-time-using-proc-iml-and-loop/m-p/374174#M276272</link>
      <description>&lt;P&gt;That makes sense, will do so in the future!!&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jul 2017 15:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-time-using-proc-iml-and-loop/m-p/374174#M276272</guid>
      <dc:creator>panda</dc:creator>
      <dc:date>2017-07-08T15:10:10Z</dc:date>
    </item>
  </channel>
</rss>

