<?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: ERROR 117-185: There was 1 unclosed DO block. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/447024#M69497</link>
    <description>&lt;P&gt;Visual formatting of code can do wonders for you:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data parmestPG1_;
set parmestPG1;
rename
  Estimate=Estimate1
  Probt=Probt1
  stdErr=StdErr1
;
if Biased ^= .
then do;
  if 0.05 &amp;lt; probt1 &amp;lt;= 0.1
  then sig1 = '*';
  else if 0.01 &amp;lt; probt1 &amp;lt;= 0.05
  then sig1 = '**';
  else if probt1 &amp;lt;= 0.01
  then sig1 = '***';
/* why did I end up one indent in before the run;?
   oh, there's a missing end! */ 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As long as you write spaghetti code, such mistakes won't stand out for you as they do for people who write code in a proper style.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Mar 2018 08:05:59 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-03-20T08:05:59Z</dc:date>
    <item>
      <title>ERROR 117-185: There was 1 unclosed DO block.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/446957#M69487</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; parmestPG1_;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; parmestPG1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Estimate=Estimate1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Probt=Probt1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; stdErr=StdErr1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Biased^=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0.05&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;lt;probt1 &amp;lt;= &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0.1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sig1='*'; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0.01&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;lt;probt1 &amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0.05&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sig1='**'; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; probt1 &amp;lt;= &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0.01&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sig1='***';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the following error message:&lt;/P&gt;&lt;P&gt;ERROR 117-185: There was 1 unclosed DO block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me fix it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 22:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/446957#M69487</guid>
      <dc:creator>GKati</dc:creator>
      <dc:date>2018-03-19T22:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 117-185: There was 1 unclosed DO block.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/446960#M69488</link>
      <description>&lt;P&gt;Add an END statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data parmestPG1_;
set parmestPG1;
rename Estimate=Estimate1;
rename Probt=Probt1;
rename stdErr=StdErr1;
 
if Biased^=. then do;
if 0.05&amp;lt;probt1 &amp;lt;= 0.1 then sig1='*';
else if 0.01 &amp;lt;probt1 &amp;lt;=0.05 then sig1='**';
else if probt1 &amp;lt;= 0.01 then sig1='***';
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Mar 2018 22:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/446960#M69488</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-03-19T22:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 117-185: There was 1 unclosed DO block.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/446961#M69489</link>
      <description>Hi:&lt;BR /&gt;  Where is the END; statement for the&lt;BR /&gt;if Biased ^=. then do; statement?&lt;BR /&gt;&lt;BR /&gt;Or, did you want a subsetting IF there:&lt;BR /&gt;if Biased ^=.; ?? &lt;BR /&gt;&lt;BR /&gt;It really depends on your desired results. Do you only want to output the rows where Biased ^= .? Or do you want to output all the rows that are in parmestPG1?&lt;BR /&gt;Cynthia;</description>
      <pubDate>Mon, 19 Mar 2018 22:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/446961#M69489</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-03-19T22:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 117-185: There was 1 unclosed DO block.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/447024#M69497</link>
      <description>&lt;P&gt;Visual formatting of code can do wonders for you:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data parmestPG1_;
set parmestPG1;
rename
  Estimate=Estimate1
  Probt=Probt1
  stdErr=StdErr1
;
if Biased ^= .
then do;
  if 0.05 &amp;lt; probt1 &amp;lt;= 0.1
  then sig1 = '*';
  else if 0.01 &amp;lt; probt1 &amp;lt;= 0.05
  then sig1 = '**';
  else if probt1 &amp;lt;= 0.01
  then sig1 = '***';
/* why did I end up one indent in before the run;?
   oh, there's a missing end! */ 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As long as you write spaghetti code, such mistakes won't stand out for you as they do for people who write code in a proper style.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 08:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/447024#M69497</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-20T08:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 117-185: There was 1 unclosed DO block.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/447027#M69498</link>
      <description>So here is a riddle then.&lt;BR /&gt;&lt;BR /&gt;I've changed my code as follows:&lt;BR /&gt;1. I've added the end at the end of the code. This in itself DID NOT solve the problem.&lt;BR /&gt;2. I've changed the stars to text. This DID solve my problem.&lt;BR /&gt;&lt;BR /&gt;data parmestPG1_;&lt;BR /&gt;set parmestPG1;&lt;BR /&gt;rename Estimate=Estimate1;&lt;BR /&gt;rename Probt=Probt1;&lt;BR /&gt;rename stdErr=StdErr1;&lt;BR /&gt;&lt;BR /&gt;if StdErr1^=. then do;&lt;BR /&gt;if 0.05&amp;lt;Probt1 &amp;lt;= 0.1 then sig1='1-star';&lt;BR /&gt;else if 0.01 &amp;lt;Probt1 &amp;lt;=0.05 then sig1='2-stars';&lt;BR /&gt;else if Probt1 &amp;lt;= 0.01 then sig1='3-stars';&lt;BR /&gt;*else sig1='';&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Mar 2018 08:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/447027#M69498</guid>
      <dc:creator>GKati</dc:creator>
      <dc:date>2018-03-20T08:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 117-185: There was 1 unclosed DO block.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/447034#M69499</link>
      <description>&lt;OL&gt;
&lt;LI&gt;post example data in a data step&lt;/LI&gt;
&lt;LI&gt;post example data in a data step&lt;/LI&gt;
&lt;LI&gt;post example data in a data step&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;otherwise you will always get untested code.&lt;/P&gt;
&lt;P&gt;I need to add a correction to my previous code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data parmestPG1_;
set parmestPG1;
rename
  Estimate=Estimate1
  Probt=Probt1
  stdErr=StdErr1
;
length sig1 $3;
if Biased ^= .
then do;
  if 0.05 &amp;lt; probt1 &amp;lt;= 0.1
  then sig1 = '*';
  else if 0.01 &amp;lt; probt1 &amp;lt;= 0.05
  then sig1 = '**';
  else if probt1 &amp;lt;= 0.01
  then sig1 = '***';
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Without the length statement, SAS will take the length of the first assigned string for sig1, and you'll only get 1 charascter, no matter how many you assign later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post code using the proper buttons ({i} or "little running man"), so that the formatting is preserved.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 08:52:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-117-185-There-was-1-unclosed-DO-block/m-p/447034#M69499</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-20T08:52:55Z</dc:date>
    </item>
  </channel>
</rss>

