<?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: How can use Loop  to operation ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640647#M190883</link>
    <description>&lt;P&gt;Hope this is what you are expecting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input oba f$;
cards;
1 7/30 
2 5/30
3 9/30
4 11/30
5 21/30
;

data want;
set have;
numerator=input(scan(f,1,'/'),best.);
denominator=input(scan(f,2,'/'),best.);
nd=numerator/denominator;
SE=nd*(1-nd)/5;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Apr 2020 09:19:19 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2020-04-17T09:19:19Z</dc:date>
    <item>
      <title>How can use Loop  to operation ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640643#M190879</link>
      <description>&lt;P&gt;Good afternoon fellow SAS users and the overall SAS community.&lt;/P&gt;&lt;P&gt;oba&amp;nbsp; &amp;nbsp;f&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;se&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 7/30&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; 5/30&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; 9/30&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; 11/30&lt;/P&gt;&lt;P&gt;5&amp;nbsp; &amp;nbsp; 21/30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SE=f*(1-f)/5,&lt;/P&gt;&lt;P&gt;How can use loop to operation all SE?&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 08:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640643#M190879</guid>
      <dc:creator>yuwentaiwan</dc:creator>
      <dc:date>2020-04-17T08:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can use Loop  to operation ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640647#M190883</link>
      <description>&lt;P&gt;Hope this is what you are expecting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input oba f$;
cards;
1 7/30 
2 5/30
3 9/30
4 11/30
5 21/30
;

data want;
set have;
numerator=input(scan(f,1,'/'),best.);
denominator=input(scan(f,2,'/'),best.);
nd=numerator/denominator;
SE=nd*(1-nd)/5;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Apr 2020 09:19:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640647#M190883</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-04-17T09:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can use Loop  to operation ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640784#M190944</link>
      <description>&lt;P&gt;Do you actually have that "F" value as the strings you are showing?&amp;nbsp; Or do you have two numeric variables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 17:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640784#M190944</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-17T17:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can use Loop  to operation ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640879#M190968</link>
      <description>&lt;P&gt;For the values you have, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; 's reply is probably the best way.&lt;/P&gt;
&lt;P&gt;For a generic calculation, here is another way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
input OBA F $20.;
cards;
1 7/30+4/3
2 5/30
3 9/30
4 11/30
5 21/30-23/16+5/8
;

data WANT;
  set HAVE;
  F1=input(resolve('%sysevalf('||F||')'),32.); putlog F1= ;
  SE=F1*(1-F1)/5;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="sasSource" style="color: #000000; font-family: Consolas, Courier, 'Courier New'; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;"&gt;F1=1.5666666667&lt;/DIV&gt;
&lt;DIV class="sasSource" style="color: #000000; font-family: Consolas, Courier, 'Courier New'; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;"&gt;F1=0.1666666667&lt;/DIV&gt;
&lt;DIV class="sasSource" style="color: #000000; font-family: Consolas, Courier, 'Courier New'; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;"&gt;F1=0.3&lt;/DIV&gt;
&lt;DIV class="sasSource" style="color: #000000; font-family: Consolas, Courier, 'Courier New'; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;"&gt;F1=0.3666666667&lt;/DIV&gt;
&lt;DIV class="sasSource" style="color: #000000; font-family: Consolas, Courier, 'Courier New'; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;"&gt;F1=-0.1125&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 22:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-use-Loop-to-operation/m-p/640879#M190968</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-04-17T22:32:28Z</dc:date>
    </item>
  </channel>
</rss>

