<?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: SYSINDEX in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73671#M15852</link>
    <description>having the %SYSINDEX feels better, as it is a good match for the documentation.&lt;BR /&gt;
In on-line help and Doc, I can't find monotonic. &lt;BR /&gt;
On SAS Support site, it is declared as not supported in SQL&lt;BR /&gt;
 &lt;BR /&gt;
So I feel more confident about leaving %sysindex in client autocall libraries.&lt;BR /&gt;
Would you not agree?&lt;BR /&gt;
 &lt;BR /&gt;
PeterC</description>
    <pubDate>Wed, 11 Feb 2009 21:11:20 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-02-11T21:11:20Z</dc:date>
    <item>
      <title>SYSINDEX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73669#M15850</link>
      <description>just wanted to share the "out of the box" moment.&lt;BR /&gt;
&amp;amp;SYSINDEX is clearly documented "You can use SYSINDEX in a program that uses macros when you need a unique number that changes after each macro invocation."&lt;BR /&gt;
I wanted a unique number when some conditions occurred in a macro and thought of &amp;amp;SYSINDEX. but it only created a constant &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; .&lt;BR /&gt;
This time the light bulb switched on and I saw out of the box &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; I should use &lt;B&gt;%SYSINDEX &lt;/B&gt;.&lt;BR /&gt;
 OK, I know that does not exist, but it is simple enough to create[pre]      %macro sysindex ;&lt;BR /&gt;
      &amp;amp;sysindex&lt;BR /&gt;
      %mend  sysindex ;[/pre]So I only needed to change that "&amp;amp;" prefix into "%" before the SYSINDEX and obtained exactly what I needed.&lt;BR /&gt;
Every invocation of %sysindex provides a unique number for the SAS session. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
 &lt;BR /&gt;
regards to the Forum&lt;BR /&gt;
 &lt;BR /&gt;
PeterC</description>
      <pubDate>Wed, 11 Feb 2009 12:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73669#M15850</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-11T12:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: SYSINDEX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73670#M15851</link>
      <description>Alternatively:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
%sysfunc(monotonic())&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
More typing but then you don't need to maintain a macro that provides very little function.</description>
      <pubDate>Wed, 11 Feb 2009 12:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73670#M15851</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-02-11T12:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: SYSINDEX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73671#M15852</link>
      <description>having the %SYSINDEX feels better, as it is a good match for the documentation.&lt;BR /&gt;
In on-line help and Doc, I can't find monotonic. &lt;BR /&gt;
On SAS Support site, it is declared as not supported in SQL&lt;BR /&gt;
 &lt;BR /&gt;
So I feel more confident about leaving %sysindex in client autocall libraries.&lt;BR /&gt;
Would you not agree?&lt;BR /&gt;
 &lt;BR /&gt;
PeterC</description>
      <pubDate>Wed, 11 Feb 2009 21:11:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73671#M15852</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-11T21:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: SYSINDEX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73672#M15853</link>
      <description>The monotonic() function is undocumented (which is why you can't find it!).  This is because it can be problematic and produce unexpected results in some cases, e.g. when used within PROC SQL.  So if you go that route, be careful!</description>
      <pubDate>Thu, 19 Feb 2009 16:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSINDEX/m-p/73672#M15853</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2009-02-19T16:24:04Z</dc:date>
    </item>
  </channel>
</rss>

