<?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 Replacing the nth character in string with a specified value in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Replacing-the-nth-character-in-string-with-a-specified-value/m-p/582149#M13790</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a field on a table where I want to replace the 8th digit with a 1 in the character string for each of the rows.&amp;nbsp; The string is consistently 12 characters long.&amp;nbsp; Currently that 8th digit is always a zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anybody know how I can accomplish this task?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS 7.1.&amp;nbsp; We'll be upgrading to 8.1 in the near future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much in advance!&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 15:56:46 GMT</pubDate>
    <dc:creator>jmniotis</dc:creator>
    <dc:date>2019-08-19T15:56:46Z</dc:date>
    <item>
      <title>Replacing the nth character in string with a specified value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replacing-the-nth-character-in-string-with-a-specified-value/m-p/582149#M13790</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a field on a table where I want to replace the 8th digit with a 1 in the character string for each of the rows.&amp;nbsp; The string is consistently 12 characters long.&amp;nbsp; Currently that 8th digit is always a zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anybody know how I can accomplish this task?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS 7.1.&amp;nbsp; We'll be upgrading to 8.1 in the near future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much in advance!&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 15:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replacing-the-nth-character-in-string-with-a-specified-value/m-p/582149#M13790</guid>
      <dc:creator>jmniotis</dc:creator>
      <dc:date>2019-08-19T15:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing the nth character in string with a specified value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replacing-the-nth-character-in-string-with-a-specified-value/m-p/582151#M13791</link>
      <description>&lt;P&gt;Use the SUBSTR() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;substr(varName, 8, 1) = '1';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/285742"&gt;@jmniotis&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a field on a table where I want to replace the 8th digit with a 1 in the character string for each of the rows.&amp;nbsp; The string is consistently 12 characters long.&amp;nbsp; Currently that 8th digit is always a zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anybody know how I can accomplish this task?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using SAS 7.1.&amp;nbsp; We'll be upgrading to 8.1 in the near future.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much in advance!&lt;/P&gt;
&lt;P&gt;Jonathan&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 16:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replacing-the-nth-character-in-string-with-a-specified-value/m-p/582151#M13791</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-19T16:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing the nth character in string with a specified value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replacing-the-nth-character-in-string-with-a-specified-value/m-p/582157#M13795</link>
      <description>&lt;P&gt;Welcome to the SAS Community &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212267.htm" target="_self"&gt;SUBSTR (left of &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt; Function&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 16:14:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replacing-the-nth-character-in-string-with-a-specified-value/m-p/582157#M13795</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-19T16:14:32Z</dc:date>
    </item>
  </channel>
</rss>

