<?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: loop with substr function in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/loop-with-substr-function/m-p/13810#M2049</link>
    <description>This is basic DATA step IF &lt;CONDITION&gt; THEN &lt;ASSIGNMENT&gt;;   logic.&lt;BR /&gt;
&lt;BR /&gt;
Have a look at the SAS-hosted DOC and supplemental references on their SAS.COM support website - links revealed with search below.  Then come back to the forum again with code challenges/issues -- suggest using the SAS diagnostic code below to reveal much info:&lt;BR /&gt;
&lt;BR /&gt;
PUTLOG _ALL_;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Recommended Google advanced search arguments, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
data step programming introduction site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
data step assign sas variable site:sas.com&lt;/ASSIGNMENT&gt;&lt;/CONDITION&gt;</description>
    <pubDate>Fri, 30 Apr 2010 20:50:42 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-04-30T20:50:42Z</dc:date>
    <item>
      <title>loop with substr function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/loop-with-substr-function/m-p/13809#M2048</link>
      <description>Hello &lt;BR /&gt;
&lt;BR /&gt;
I am trying to create a dataset from an existing dataset.&lt;BR /&gt;
&lt;BR /&gt;
The current dataset has a variable called id_code. The id_code is a string of length 10 characters. I need to extract the 2 left most characters and based on whether it is a 01 assign "temp" and if 02 assign "non-temp".&lt;BR /&gt;
&lt;BR /&gt;
I have to repeat this process till the end of the dataset that has around 350 observations.&lt;BR /&gt;
&lt;BR /&gt;
Could anyone help me with the code for this.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Fri, 30 Apr 2010 20:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/loop-with-substr-function/m-p/13809#M2048</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-04-30T20:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: loop with substr function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/loop-with-substr-function/m-p/13810#M2049</link>
      <description>This is basic DATA step IF &lt;CONDITION&gt; THEN &lt;ASSIGNMENT&gt;;   logic.&lt;BR /&gt;
&lt;BR /&gt;
Have a look at the SAS-hosted DOC and supplemental references on their SAS.COM support website - links revealed with search below.  Then come back to the forum again with code challenges/issues -- suggest using the SAS diagnostic code below to reveal much info:&lt;BR /&gt;
&lt;BR /&gt;
PUTLOG _ALL_;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Recommended Google advanced search arguments, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
data step programming introduction site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
data step assign sas variable site:sas.com&lt;/ASSIGNMENT&gt;&lt;/CONDITION&gt;</description>
      <pubDate>Fri, 30 Apr 2010 20:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/loop-with-substr-function/m-p/13810#M2049</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-04-30T20:50:42Z</dc:date>
    </item>
  </channel>
</rss>

