<?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 A single semicolon inside a data step. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/A-single-semicolon-inside-a-data-step/m-p/21502#M3459</link>
    <description>I have a number of conditions declared as macrovariables:&lt;BR /&gt;
&lt;BR /&gt;
%let cond1=if x=10;&lt;BR /&gt;
%let cond2=if x=20;&lt;BR /&gt;
.&lt;BR /&gt;
%let cond9=if x=90;&lt;BR /&gt;
&lt;BR /&gt;
and an "empty" condition: %let cond10=;&lt;BR /&gt;
&lt;BR /&gt;
I am creating 10 tables by looping in a macro:&lt;BR /&gt;
&lt;BR /&gt;
%macro example;&lt;BR /&gt;
%do i=1 %to 10;&lt;BR /&gt;
data work&amp;amp;i;&lt;BR /&gt;
set worktotal;&lt;BR /&gt;
&amp;amp;&amp;amp;condition&amp;amp;i;&lt;BR /&gt;
run;&lt;BR /&gt;
%end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%example;&lt;BR /&gt;
&lt;BR /&gt;
When i=1-9 I get the wanted conditions and when i=10 I get a single semicolon.&lt;BR /&gt;
&lt;BR /&gt;
When i=10 work10 should be set to worktotal. This seems to work.&lt;BR /&gt;
&lt;BR /&gt;
But I want to know if, in general, it's OK to place a single semicolon on a line in a data step where nothing should happen?</description>
    <pubDate>Tue, 24 Nov 2009 14:00:23 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-11-24T14:00:23Z</dc:date>
    <item>
      <title>A single semicolon inside a data step.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-single-semicolon-inside-a-data-step/m-p/21502#M3459</link>
      <description>I have a number of conditions declared as macrovariables:&lt;BR /&gt;
&lt;BR /&gt;
%let cond1=if x=10;&lt;BR /&gt;
%let cond2=if x=20;&lt;BR /&gt;
.&lt;BR /&gt;
%let cond9=if x=90;&lt;BR /&gt;
&lt;BR /&gt;
and an "empty" condition: %let cond10=;&lt;BR /&gt;
&lt;BR /&gt;
I am creating 10 tables by looping in a macro:&lt;BR /&gt;
&lt;BR /&gt;
%macro example;&lt;BR /&gt;
%do i=1 %to 10;&lt;BR /&gt;
data work&amp;amp;i;&lt;BR /&gt;
set worktotal;&lt;BR /&gt;
&amp;amp;&amp;amp;condition&amp;amp;i;&lt;BR /&gt;
run;&lt;BR /&gt;
%end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%example;&lt;BR /&gt;
&lt;BR /&gt;
When i=1-9 I get the wanted conditions and when i=10 I get a single semicolon.&lt;BR /&gt;
&lt;BR /&gt;
When i=10 work10 should be set to worktotal. This seems to work.&lt;BR /&gt;
&lt;BR /&gt;
But I want to know if, in general, it's OK to place a single semicolon on a line in a data step where nothing should happen?</description>
      <pubDate>Tue, 24 Nov 2009 14:00:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-single-semicolon-inside-a-data-step/m-p/21502#M3459</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-11-24T14:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: A single semicolon inside a data step.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-single-semicolon-inside-a-data-step/m-p/21503#M3460</link>
      <description>Extra semicolons are fine.  I have known several programmers that like to use them on blank lines to hold space.  I have never figured out why they do this, but it does not hurt.</description>
      <pubDate>Tue, 24 Nov 2009 14:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-single-semicolon-inside-a-data-step/m-p/21503#M3460</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-11-24T14:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: A single semicolon inside a data step.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-single-semicolon-inside-a-data-step/m-p/21504#M3461</link>
      <description>With SAS version 6, there was a SAS code compiler issue when using SAS macros mixed with SAS old-style (SAS 79 style) macro statements within nested (multiple) %INCLUDE references.  At times a SAS DATA statement would need to be ended with 4 or 5 semi-colons to ensure the compiler flushed well during compile processing.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 24 Nov 2009 14:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-single-semicolon-inside-a-data-step/m-p/21504#M3461</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-24T14:21:05Z</dc:date>
    </item>
  </channel>
</rss>

