<?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 INPUT and PUT in IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/INPUT-and-PUT-in-IML/m-p/635461#M5051</link>
    <description>&lt;P&gt;I convert, for example, "27mar2020"d to 202003 using PUT and INPUT as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data y;
x="27mar2020"d;
y=input(put(x,yymmn6.),6.);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can one do something equivalent in IML? I don't want to use the 100*YEAR(X)+MONTH(X) approach because I use multiple formats such as yymmddn8. and year4.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
x="27mar2020"d;
y=input(put(x,yymmn6.),6.);
/*y=100*year(x)+month(x); want to avoid*/
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2020 23:39:51 GMT</pubDate>
    <dc:creator>Junyong</dc:creator>
    <dc:date>2020-03-27T23:39:51Z</dc:date>
    <item>
      <title>INPUT and PUT in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/INPUT-and-PUT-in-IML/m-p/635461#M5051</link>
      <description>&lt;P&gt;I convert, for example, "27mar2020"d to 202003 using PUT and INPUT as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data y;
x="27mar2020"d;
y=input(put(x,yymmn6.),6.);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can one do something equivalent in IML? I don't want to use the 100*YEAR(X)+MONTH(X) approach because I use multiple formats such as yymmddn8. and year4.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
x="27mar2020"d;
y=input(put(x,yymmn6.),6.);
/*y=100*year(x)+month(x); want to avoid*/
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 23:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/INPUT-and-PUT-in-IML/m-p/635461#M5051</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2020-03-27T23:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT and PUT in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/INPUT-and-PUT-in-IML/m-p/635463#M5052</link>
      <description>&lt;P&gt;Although the PUT and INPUT functions are valid in the DATA step, the PUTN, PUTC, INPUTN, and INPUTC functions are more widely supported.&amp;nbsp; Since you want to use &lt;STRONG&gt;N&lt;/STRONG&gt;umeric formats, use PUTN and INPUTN.&amp;nbsp; (You chould use the C versions for &lt;STRONG&gt;C&lt;/STRONG&gt;haracter formats.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
x="27mar2020"d;
t = putn(x,"yymmn6.");
y = inputn(t, "6.");
print t, y;

/* or next the function calls */
y=inputn(putn(x,"yymmn6."),"6.");
print y;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Mar 2020 00:19:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/INPUT-and-PUT-in-IML/m-p/635463#M5052</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-03-28T00:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT and PUT in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/INPUT-and-PUT-in-IML/m-p/635465#M5053</link>
      <description>I don't see how what format you have attached to the variable (year. vs yymmddn.) matter? The value it contains still needs to be a date value.  Or did you mean that you want to create your different patterns of digit strings that you then convert into pseudo numbers?</description>
      <pubDate>Sat, 28 Mar 2020 01:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/INPUT-and-PUT-in-IML/m-p/635465#M5053</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-28T01:02:38Z</dc:date>
    </item>
  </channel>
</rss>

