<?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 A function on the LEFT side of the eq-sign?! in SAS Community Nordic</title>
    <link>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826594#M377</link>
    <description>&lt;P&gt;Can anyone explain - why is this possible? Is it just a smart way to add an extra character to the string?&lt;/P&gt;
&lt;P&gt;Nevet seen it before. Topic for next SAS Programming?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do i=1 to num_ids;&lt;BR /&gt;do j=1 to 30;&lt;BR /&gt;temp=ceil((num_allowed * rand("uniform")));&lt;BR /&gt;&lt;STRONG&gt;substr(my_id30,j,1)&lt;/STRONG&gt;=substr(allowed,temp,1);&lt;BR /&gt;put temp my_id30;&lt;BR /&gt;end;&lt;BR /&gt;output;&lt;BR /&gt;call symputx('_pwd30', my_id30);&lt;BR /&gt;end;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 11:22:40 GMT</pubDate>
    <dc:creator>jmic_nyk</dc:creator>
    <dc:date>2022-08-02T11:22:40Z</dc:date>
    <item>
      <title>A function on the LEFT side of the eq-sign?!</title>
      <link>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826594#M377</link>
      <description>&lt;P&gt;Can anyone explain - why is this possible? Is it just a smart way to add an extra character to the string?&lt;/P&gt;
&lt;P&gt;Nevet seen it before. Topic for next SAS Programming?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do i=1 to num_ids;&lt;BR /&gt;do j=1 to 30;&lt;BR /&gt;temp=ceil((num_allowed * rand("uniform")));&lt;BR /&gt;&lt;STRONG&gt;substr(my_id30,j,1)&lt;/STRONG&gt;=substr(allowed,temp,1);&lt;BR /&gt;put temp my_id30;&lt;BR /&gt;end;&lt;BR /&gt;output;&lt;BR /&gt;call symputx('_pwd30', my_id30);&lt;BR /&gt;end;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 11:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826594#M377</guid>
      <dc:creator>jmic_nyk</dc:creator>
      <dc:date>2022-08-02T11:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: A function on the LEFT side of the eq-sign?!</title>
      <link>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826597#M378</link>
      <description>&lt;P&gt;Why is it possible? Because the smart people at SAS allowed this to happen in the case of the SUBSTR function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the documentation here:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/p0uev77ebdwy90n1rsd7hwjd2qc3.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/p0uev77ebdwy90n1rsd7hwjd2qc3.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't think it is adding a character to the string; it is replacing the character in the j-th position in the text string of variable MY_ID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the future, please don't show us partial DATA step code, show us the ENTIRE data step code.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 11:39:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826597#M378</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-02T11:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: A function on the LEFT side of the eq-sign?!</title>
      <link>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826598#M379</link>
      <description>&lt;P&gt;I assume the question relates to using a function to the left of the equal sign and not the posted code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Yes, the Substr&amp;nbsp;Function can be used to the left of the equal sign. Technically the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/p0uev77ebdwy90n1rsd7hwjd2qc3.htm" target="_self"&gt;Substr Function (left of = )&lt;/A&gt; and&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/n0n08xougp40i5n1xw7njpcy0a2b.htm" target="_self"&gt;Substr Function (right of = )&lt;/A&gt; are two different functions with two different documentations (see below). As far as I know, this is the only function where this is the case.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PeterClemmensen_0-1659439739152.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73998iADE25F2CC935EB03/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PeterClemmensen_0-1659439739152.png" alt="PeterClemmensen_0-1659439739152.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume that SAS created this capability because it seems logic to many developers and aligns well with other languages. However, in most cases, its functionality can easily be obtained by other character functions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards Peter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 11:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826598#M379</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-08-02T11:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: A function on the LEFT side of the eq-sign?!</title>
      <link>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826609#M380</link>
      <description>R T F M</description>
      <pubDate>Tue, 02 Aug 2022 12:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Community-Nordic/A-function-on-the-LEFT-side-of-the-eq-sign/m-p/826609#M380</guid>
      <dc:creator>jmic_nyk</dc:creator>
      <dc:date>2022-08-02T12:26:27Z</dc:date>
    </item>
  </channel>
</rss>

