<?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 Repeating Values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422958#M68071</link>
    <description>&lt;P&gt;Hello, any input would be appreciated, I'm trying to do the problem with a do loop statement but I cannot produce the expected output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;amount with levels 0.9, 0.8, 0.7 and 0.6, and concentration with levels 1%, 1.5%, 2%, 2.5% and 3%, to chemical reaction time.&lt;/P&gt;&lt;P&gt;The data contains: 10.9 11.5 9.8 12.7 10.6 9.2 10.3 9.0 10.6 9.4 8.7 9.7 8.2 9.4 8.5 7.2 8.6 7.5 9.7 7.7&lt;/P&gt;&lt;P&gt;Each row corresponds to the levels of amount and each column corresponds to the levels of concetration.&lt;/P&gt;&lt;P&gt;Create a permanent SAS data set with this format: concentration amount time&lt;/P&gt;&lt;P&gt;1% 0.9 10.9&lt;/P&gt;&lt;P&gt;1.5% 0.9 11.5&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;2.5% 0.6 9.7&lt;/P&gt;&lt;P&gt;3% 0.6 7.7&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2017 06:48:56 GMT</pubDate>
    <dc:creator>SuperSaiyan</dc:creator>
    <dc:date>2017-12-21T06:48:56Z</dc:date>
    <item>
      <title>Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422958#M68071</link>
      <description>&lt;P&gt;Hello, any input would be appreciated, I'm trying to do the problem with a do loop statement but I cannot produce the expected output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;amount with levels 0.9, 0.8, 0.7 and 0.6, and concentration with levels 1%, 1.5%, 2%, 2.5% and 3%, to chemical reaction time.&lt;/P&gt;&lt;P&gt;The data contains: 10.9 11.5 9.8 12.7 10.6 9.2 10.3 9.0 10.6 9.4 8.7 9.7 8.2 9.4 8.5 7.2 8.6 7.5 9.7 7.7&lt;/P&gt;&lt;P&gt;Each row corresponds to the levels of amount and each column corresponds to the levels of concetration.&lt;/P&gt;&lt;P&gt;Create a permanent SAS data set with this format: concentration amount time&lt;/P&gt;&lt;P&gt;1% 0.9 10.9&lt;/P&gt;&lt;P&gt;1.5% 0.9 11.5&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;2.5% 0.6 9.7&lt;/P&gt;&lt;P&gt;3% 0.6 7.7&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 06:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422958#M68071</guid>
      <dc:creator>SuperSaiyan</dc:creator>
      <dc:date>2017-12-21T06:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422962#M68072</link>
      <description>&lt;P&gt;Please post what you’ve tried so far. It’s easier to help point out where things need to be fixed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your question is also a bit unclear though so think you’re trying to create a SAS data set out of the values below the table? And a second table of all possible combinations, ergo the do loop?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183530"&gt;@SuperSaiyan&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello, any input would be appreciated, I'm trying to do the problem with a do loop statement but I cannot produce the expected output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;amount with levels 0.9, 0.8, 0.7 and 0.6, and concentration with levels 1%, 1.5%, 2%, 2.5% and 3%, to chemical reaction time.&lt;/P&gt;
&lt;P&gt;The data contains: 10.9 11.5 9.8 12.7 10.6 9.2 10.3 9.0 10.6 9.4 8.7 9.7 8.2 9.4 8.5 7.2 8.6 7.5 9.7 7.7&lt;/P&gt;
&lt;P&gt;Each row corresponds to the levels of amount and each column corresponds to the levels of concetration.&lt;/P&gt;
&lt;P&gt;Create a permanent SAS data set with this format: concentration amount time&lt;/P&gt;
&lt;P&gt;1% 0.9 10.9&lt;/P&gt;
&lt;P&gt;1.5% 0.9 11.5&lt;/P&gt;
&lt;P&gt;. . .&lt;/P&gt;
&lt;P&gt;2.5% 0.6 9.7&lt;/P&gt;
&lt;P&gt;3% 0.6 7.7&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 07:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422962#M68072</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-21T07:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422964#M68073</link>
      <description>&lt;P&gt;The question was also bit unclear to me, but I think my teacher wants to produce repeated values for the concentration levels and amount levels per reaction time. First I tried merging, but as expected it only merged the data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 07:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422964#M68073</guid>
      <dc:creator>SuperSaiyan</dc:creator>
      <dc:date>2017-12-21T07:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422966#M68074</link>
      <description>also, tried doing the do loop, but I cannot fully get it.</description>
      <pubDate>Thu, 21 Dec 2017 07:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422966#M68074</guid>
      <dc:creator>SuperSaiyan</dc:creator>
      <dc:date>2017-12-21T07:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422969#M68075</link>
      <description>how do I repeat the two values?</description>
      <pubDate>Thu, 21 Dec 2017 07:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422969#M68075</guid>
      <dc:creator>SuperSaiyan</dc:creator>
      <dc:date>2017-12-21T07:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422970#M68076</link>
      <description>I think you two nested do loops. &lt;BR /&gt;A basic example is here&lt;BR /&gt;&lt;BR /&gt;Data temp;&lt;BR /&gt;Do concrete=1,3,5;&lt;BR /&gt;Do iron = 2,3,6;&lt;BR /&gt;Output;&lt;BR /&gt;End;&lt;BR /&gt;End;&lt;BR /&gt;Run;</description>
      <pubDate>Thu, 21 Dec 2017 07:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422970#M68076</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-21T07:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422972#M68077</link>
      <description>You need to show your code.</description>
      <pubDate>Thu, 21 Dec 2017 07:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422972#M68077</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-21T07:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422988#M68078</link>
      <description>&lt;P&gt;&lt;SPAN&gt;data chemical; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;do amount =0.9,0.8,0.7,0.6; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;do concentration=1%,1.5%,2%,2.5%,3%; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;input amount concentration time; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;output; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;datalines; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;10.9 11.5 9.8 12.7 10.6 9.2 10.3 9.0 10.6 9.4 8.7 9.7 8.2 9.4 8.5 7.2 8.6 7.5 9.7 7.7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tried using the codes above but it shows error&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 08:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422988#M68078</guid>
      <dc:creator>SuperSaiyan</dc:creator>
      <dc:date>2017-12-21T08:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422993#M68079</link>
      <description>&lt;P&gt;This is not valid:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1%,1.5%,2%,2.5%,3%;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Use a number then apply a format.&amp;nbsp; Also use the {i} code window for code to retain formatting:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;data chemical;
  do amount =0.9,0.8,0.7,0.6;  
    do concentration=1 to 3 by 0.5;
      output;
    end;
  end;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;As for why you have the datalines there at all is a mystery to me?&amp;nbsp; Explain what you want out.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 09:13:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422993#M68079</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-21T09:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422995#M68080</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried another one using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data chemical;&lt;BR /&gt;do amount = .9 , .8 , .7 , .6 ;&lt;BR /&gt;do concentration= "1%" , "1.5%" , "2%" , "2.5%" , "3%" ;&lt;BR /&gt;input time@@;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;datalines;&lt;BR /&gt;10.9 11.5 9.8 12.7 10.6&lt;BR /&gt;9.2 10.3 9.0 10.6 9.4&lt;BR /&gt;8.7 9.7 8.2 9.4 8.5&lt;BR /&gt;7.2 8.6 7.5 9.7 7.7&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=chemical;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it cannot read the percentage with decimal point as expected,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it show&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ssss.PNG" style="width: 409px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17468iDAB745306BACEA09/image-size/large?v=v2&amp;amp;px=999" role="button" title="ssss.PNG" alt="ssss.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 09:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422995#M68080</guid>
      <dc:creator>SuperSaiyan</dc:creator>
      <dc:date>2017-12-21T09:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422996#M68081</link>
      <description>I have attached a photo of the supposed output, but I have problems with the percentages, i cannot it out the percentages with decimal points.</description>
      <pubDate>Thu, 21 Dec 2017 09:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/422996#M68081</guid>
      <dc:creator>SuperSaiyan</dc:creator>
      <dc:date>2017-12-21T09:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/423008#M68083</link>
      <description>&lt;P&gt;Use the code window = {i}.&amp;nbsp; Something like:&lt;/P&gt;
&lt;PRE&gt;data times;
  input time@@;
datalines;
10.9 11.5 9.8 12.7 10.6
9.2 10.3 9.0 10.6 9.4
8.7 9.7 8.2 9.4 8.5
7.2 8.6 7.5 9.7 7.7
;
run;

data want;
  set times;
  do amount=0.9 to 0.6 by -0.1;
    do concentration=1 to 3 by 0.5;
      output;
    end;
  end;
  format concentration percent 4.1;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Dec 2017 09:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/423008#M68083</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-21T09:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/423022#M68084</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SSSSS.PNG" style="width: 435px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17485iAC5959CF54154FDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="SSSSS.PNG" alt="SSSSS.PNG" /&gt;&lt;/span&gt;&amp;nbsp;I tried running the codes you gave but the ouput is attache here,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 10:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/423022#M68084</guid>
      <dc:creator>SuperSaiyan</dc:creator>
      <dc:date>2017-12-21T10:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/423057#M68086</link>
      <description>&lt;P&gt;Typo, there was a space after the word percent which shouldn't be there:&lt;/P&gt;
&lt;PRE&gt;data times;
  input time@@;
datalines;
10.9 11.5 9.8 12.7 10.6
9.2 10.3 9.0 10.6 9.4
8.7 9.7 8.2 9.4 8.5
7.2 8.6 7.5 9.7 7.7
;
run;

data want;
  set times;
  do amount=0.9 to 0.6 by -0.1;
    do concentration=1 to 3 by 0.5;
      output;
    end;
  end;
  format concentration percent4.1;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Dec 2017 11:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeating-Values/m-p/423057#M68086</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-21T11:30:56Z</dc:date>
    </item>
  </channel>
</rss>

