<?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 How to Monitor IML Iterations Using Log? in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569696#M4720</link>
    <description>&lt;P&gt;I oftentimes monitor MACRO iterations as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro repeat;
%do i=1 %to 100;
%if %sysfunc(mod(&amp;amp;i.,10))=0 %then %put NOTE: &amp;amp;i.th iteration now;
%end;
%mend;
%repeat;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can do the same thing in DATA as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
do i=1 to 100;
if mod(i,10)=0 then put i;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I use this code as something similar to a loading bar—the code notifies at the 10th, 20th iterations, etc. I tried to do the identical thing in IML but failed because PUT in IML works differently.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
do i=1 to 100;
if mod(i,10)=0 then put i;
end;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The log is here.&lt;/P&gt;&lt;PRE&gt;1    proc iml;
NOTE: IML Ready
2    do i=1 to 100;
3    if mod(i,10)=0 then put i;
4    end;
ERROR: No current file to write to.

 statement : PUT at line 3 column 21
5    quit;
NOTE: Exiting IML.
NOTE: The SAS System stopped processing this step because of
      errors.
NOTE: PROCEDURE IML used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds&lt;/PRE&gt;&lt;P&gt;Second, I tried CALL SYMPUT and %PUT instead, but still failed.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
do i=1 to 100;
if mod(i,10)=0 then do;
call symputx("i",i);
%put &amp;amp;i.;
end;
end;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The corresponding log is here.&lt;/P&gt;&lt;PRE&gt;1    proc iml;
NOTE: IML Ready
2    do i=1 to 100;
3    if mod(i,10)=0 then do;
4    call symputx("i",i);
5    %put &amp;amp;i.;
100
6    end;
7    end;
8    quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds&lt;/PRE&gt;&lt;P&gt;Is there any considerable alternative in IML? Much appreciate again.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2019 05:14:22 GMT</pubDate>
    <dc:creator>Junyong</dc:creator>
    <dc:date>2019-06-28T05:14:22Z</dc:date>
    <item>
      <title>How to Monitor IML Iterations Using Log?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569696#M4720</link>
      <description>&lt;P&gt;I oftentimes monitor MACRO iterations as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro repeat;
%do i=1 %to 100;
%if %sysfunc(mod(&amp;amp;i.,10))=0 %then %put NOTE: &amp;amp;i.th iteration now;
%end;
%mend;
%repeat;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can do the same thing in DATA as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
do i=1 to 100;
if mod(i,10)=0 then put i;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I use this code as something similar to a loading bar—the code notifies at the 10th, 20th iterations, etc. I tried to do the identical thing in IML but failed because PUT in IML works differently.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
do i=1 to 100;
if mod(i,10)=0 then put i;
end;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The log is here.&lt;/P&gt;&lt;PRE&gt;1    proc iml;
NOTE: IML Ready
2    do i=1 to 100;
3    if mod(i,10)=0 then put i;
4    end;
ERROR: No current file to write to.

 statement : PUT at line 3 column 21
5    quit;
NOTE: Exiting IML.
NOTE: The SAS System stopped processing this step because of
      errors.
NOTE: PROCEDURE IML used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds&lt;/PRE&gt;&lt;P&gt;Second, I tried CALL SYMPUT and %PUT instead, but still failed.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
do i=1 to 100;
if mod(i,10)=0 then do;
call symputx("i",i);
%put &amp;amp;i.;
end;
end;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The corresponding log is here.&lt;/P&gt;&lt;PRE&gt;1    proc iml;
NOTE: IML Ready
2    do i=1 to 100;
3    if mod(i,10)=0 then do;
4    call symputx("i",i);
5    %put &amp;amp;i.;
100
6    end;
7    end;
8    quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds&lt;/PRE&gt;&lt;P&gt;Is there any considerable alternative in IML? Much appreciate again.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 05:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569696#M4720</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2019-06-28T05:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor IML Iterations Using Log?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569699#M4721</link>
      <description>&lt;P&gt;See the blog post&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2015/02/18/monitor-long-program.html" target="_self"&gt;Monitor the progress of a long-running SAS/IML program&lt;/A&gt;&amp;nbsp;by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 05:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569699#M4721</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-28T05:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor IML Iterations Using Log?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569701#M4722</link>
      <description>&lt;P&gt;Thanks for the helpful post, but I have one additional question about that. I just tried the following.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
i=1;
submit i;
%put NOTE: &amp;amp;i;
endsubmit;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Sadly, the %PUT inside spits out nothing due to the colon : right after the NOTE. I want to use the NOTE: if possible as it highlights anything in a log. Do you have any suggestion in this respect?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 05:46:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569701#M4722</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2019-06-28T05:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor IML Iterations Using Log?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569730#M4723</link>
      <description>&lt;P&gt;By default, NOTEs are turned&amp;nbsp; off in a SUBMIT block. Use OPTIONS NOTES at the top of the SUBMIT block, as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* write NOTE: &amp;lt;message&amp;gt; */
submit i;
   options notes; /* turn on notes */  
   %put NOTE: Iteration = &amp;amp;i; /* displays NOTE: in color */
endsubmit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Jun 2019 09:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-Monitor-IML-Iterations-Using-Log/m-p/569730#M4723</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-06-28T09:41:32Z</dc:date>
    </item>
  </channel>
</rss>

