<?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: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603691#M174917</link>
    <description>&lt;P&gt;My favorite null statement to avoid (and perhaps the most common observed) is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macrocall(foo);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That semicolon is NOT part of the macro language.&amp;nbsp; The final parenthesis ends the macro invocation and the macro executes.&amp;nbsp; The semicolon is an extra null statement in the SAS language.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you've got function-style macros that are designed to return part of a SAS statement, accidental generation of null SAS statements can cause all kinds of headaches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said,&amp;nbsp; a lot of macro programmers like to end their macro calls with semicolons, even though they know they're introducing null statements.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2019 19:42:19 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2019-11-12T19:42:19Z</dc:date>
    <item>
      <title>2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603656#M174901</link>
      <description>&lt;P&gt;1. What makes null statement not just null ,global and executable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not quite comprehend&amp;nbsp; &lt;STRONG&gt;executable &lt;/STRONG&gt;nature of null statement in the 1st place though there is an example in the docs that seems rather in comprehensive&amp;nbsp;to me at least. Also, I do not find&amp;nbsp; great utility to trust its executable component beyond its step boundary and specification of values embedded with semicolons . 2ndly, how does it become a &lt;EM&gt;&lt;STRONG&gt;global&lt;/STRONG&gt; &lt;/EM&gt;statement? So use anywhere as it says in the docs? How anywhere after all?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Alias for datalines are cards and lines: Is the use of alias just to remove the yellow color patch on the datalines? Well just curious though not important. Any other features?&lt;/P&gt;
&lt;P&gt;See the yellow patch not coloring the datalines when you use lines. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data test1;
input a b;
cards;
1 2
;
data test2;
input a b;
datalines;
1 2
;
data test3;
input a b;
lines;
1 2
;&lt;/CODE&gt;&lt;/PRE&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 18:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603656#M174901</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-11-12T18:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603666#M174904</link>
      <description>&lt;P&gt;2. Interesting.. I don't see any coloring difference between lines and datalines in my IDE? Can you snapshot it? From what I understand, they are purely aliases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 18:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603666#M174904</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-11-12T18:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603668#M174905</link>
      <description>&lt;P&gt;In my PC SAS it does color distinction. However,l i am not allowed attachments on the internet at work. I may have to go home and upload it.&amp;nbsp; Sorry about that&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 18:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603668#M174905</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-11-12T18:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603673#M174907</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding #2,&amp;nbsp; I&amp;nbsp; was not aware of (or perhaps completely forgot about) the existence of a LINES statement.&amp;nbsp; Only&amp;nbsp; CARDS and DATALINES have any space in my memory bank. &amp;nbsp; Although I reproduced what you describe (no yellow coloring for in-lline data when using the LINES statement), did you notice that&amp;nbsp; the rendering of the data in your inserted program is yellow for ALL the programs, even using LINES.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to #1, can you tell me what part of the docs you are referring to?&amp;nbsp; I don't think I fully understand the question.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 18:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603673#M174907</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-11-12T18:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603678#M174909</link>
      <description>&lt;P&gt;Thank you Mark, I am not too concerned about #2 and certainly doesn't require a wharton answer. It's just fun. However 1st one seems to apply to a context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n0grfgqwd2djh5n1ordogecfgu76.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n0grfgqwd2djh5n1ordogecfgu76.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This says&amp;nbsp;&lt;/P&gt;
&lt;H1 id="n0grfgqwd2djh5n1ordogecfgu76" class="xis-title"&gt;Null Statement&lt;/H1&gt;
&lt;P class="xis-shortDescription"&gt;Signals the end of data lines or acts as a placeholder.&lt;/P&gt;
&lt;TABLE class="xis-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-summaryNote"&gt;Note:&lt;/TD&gt;
&lt;TD class="xis-summaryValue"&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" tabindex="0" title="opens in a new window or tab" href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=n0grfgqwd2djh5n1ordogecfgu76.htm" target="_blank" rel="noopener"&gt;Null Statement&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;has moved to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xis-bookTitle"&gt;SAS Global Statements&lt;/SPAN&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next one(the full explanation here)&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000289429.htm" target="_blank" rel="noopener"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000289429.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;&lt;A target="_blank" name="a000289429"&gt;&lt;/A&gt;Null Statement&lt;/H1&gt;
&lt;HR /&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="shortDesc"&gt;Signals the end of data lines or acts as a placeholder.&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE cellspacing="2" cellpadding="4"&gt;
&lt;TBODY&gt;
&lt;TR valign="top"&gt;
&lt;TD align="right" class="label"&gt;Valid:&lt;/TD&gt;
&lt;TD align="left" class="bgBlockDark"&gt;Anywhere&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD align="right" class="label"&gt;Category:&lt;/TD&gt;
&lt;TD align="left" class="bgBlockDark"&gt;Action&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD align="right" class="label"&gt;Type:&lt;/TD&gt;
&lt;TD align="left" class="bgBlockDark"&gt;Executable&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes there is an example there, just not &lt;EM&gt;convincing&lt;/EM&gt; to me and i felt I may as well ask here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603678#M174909</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-11-12T19:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603679#M174910</link>
      <description>&lt;P&gt;I'm not sure this is the answer you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for your first question I think that next code illustrates a null statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if &amp;lt;condition&amp;gt; then ;  /* null statement */
else do;
   ...
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;sometimes it fits way of thinking or emphasizes that the situation was not skipped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for your 2nd question:&lt;/P&gt;
&lt;P&gt;In the early 1980 I remember I was using CARDS only.&lt;/P&gt;
&lt;P&gt;Maybe DATALINES and LINES were added later.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603679#M174910</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-11-12T19:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603680#M174911</link>
      <description>&lt;P&gt;Thank you Sir. Can you really illustrate the IF THEN ;;;; with a practical example plz.&lt;EM&gt; How, why , when and what&lt;/EM&gt; scenarios plz&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:05:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603680#M174911</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-11-12T19:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603681#M174912</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp; - My recollection is that the CARDS statement came first to SAS and it was originally restricted to 80 byte / char records, analogous to punched card input. DATALINES / LINES was added later to allow greater than 80 byte records. Now the CARDS and DATALINES statements behave exactly the same and whether greater than 80 byte records is allowed is controlled by the CARDIMAGE SAS option:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p0114gachtut3nn1and4ap8ke9nf.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p0114gachtut3nn1and4ap8ke9nf.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603681#M174912</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-11-12T19:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603682#M174913</link>
      <description>&lt;P&gt;Well if the null statement can be used anywhere, that's probably enough to classify is as global.&amp;nbsp; It's trivial below, but it is global:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.class;
  tables  sex;
run;
;
proc means data=sashelp.class;
   var age;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I guess you can call it executable, because in the&amp;nbsp; presence of in-line data, it tells the data step to stop processing data - i.e. to stop executing. &amp;nbsp; But one could avoid it if one wanted to demonstrate especially bad programming practice:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t1;
  input a b;
cards;
1 2
proc freq data=t1;   /* or proc freq data=t1;;;;*/
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:14:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603682#M174913</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-11-12T19:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603684#M174914</link>
      <description>&lt;P&gt;&amp;nbsp;SAS statements end with a semi-colon. A "null statement" is just a free floating semi-colon. They are GLOBAL because they can appear outside of a PROC or DATA step (or inside either a PROC or a data STEP).&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:17:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603684#M174914</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-12T19:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603685#M174915</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you Sir. Can you really illustrate the IF THEN ;;;; with a practical example plz.&lt;EM&gt; How, why , when and what&lt;/EM&gt; scenarios plz&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When you have a many conditions it is easy to build a decisions table, like:&lt;/P&gt;
&lt;PRE&gt;C stands for condition in next table:

C1    C2     C3  ....  Cn    exec
 0       0       0                   nothing (not available)
 0       0       1                    ex1
 0       1       0                    ex2
 ....
 1       1       1                   nothing 
&lt;/PRE&gt;
&lt;P&gt;In such case I want to cover and code all combinations of the conditions, while some of then need no action&lt;/P&gt;
&lt;P&gt;or I believe they are not available or I have no such data and cannot decide what to do - in such case a NULL statement&lt;/P&gt;
&lt;P&gt;may be used.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:16:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603685#M174915</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-11-12T19:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603691#M174917</link>
      <description>&lt;P&gt;My favorite null statement to avoid (and perhaps the most common observed) is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macrocall(foo);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That semicolon is NOT part of the macro language.&amp;nbsp; The final parenthesis ends the macro invocation and the macro executes.&amp;nbsp; The semicolon is an extra null statement in the SAS language.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you've got function-style macros that are designed to return part of a SAS statement, accidental generation of null SAS statements can cause all kinds of headaches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said,&amp;nbsp; a lot of macro programmers like to end their macro calls with semicolons, even though they know they're introducing null statements.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603691#M174917</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2019-11-12T19:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603744#M174941</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; Is the use of alias just to remove the yellow color patch on the datalines? &lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The color parser is not always right and makes mistakes.&lt;/P&gt;
&lt;P&gt;These statement are the same (read &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt; 's comment). Don't rely on the color parser to tell you what syntax is right, even if most times it helps.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 03:09:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603744#M174941</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-11-13T03:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603775#M174961</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;Mark, ha-ha. It's a good thing you'd forgotten about LINES since this is a poison pill - if only the color thing discovered by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt; were the problem. Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;                                                                                                                             
  infile lines ;                                                                                                                        
  input x ;                                                                                                                             
  lines ;                                                                                                                               
1                                                                                                                                       
2                                                                                                                                       
run ; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What do you get? Right, this:&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#800000"&gt;ERROR: No logical assign for filename LINES.
&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;Huh? But now, try this:&lt;/P&gt;
&lt;PRE&gt;data have ;                                                                                                                             
  infile &lt;FONT color="#0000FF"&gt;cards&lt;/FONT&gt; ; * place 1 ;                                                                                                                        
  input x ;                                                                                                                             
  &lt;FONT color="#0000FF"&gt;lines&lt;/FONT&gt; ;        * place 2 ;                                                                                                                                
1                                                                                                                                       
2                                                                                                                                       
run ;    
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;And everything is hunky-dory. Bottom line (npi), LINES is never good in place 1, regardless of what is in place 2, even if it's LINES itself. However, CARDS and DATALINES are always good in place 1 irrespective of whether place 2 is occupied by CARDS, LINES, or DATALINES.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no first clue why it was necessary to create such a confusion, as if CARDS/CARDS4 weren't good enough. If it was just the desire to cater to a younger audience by shaking off the image of CARDS as something ancient harking back to the mainframe, the introduction of LINES and DATALINES was hardly worth the effort. SAS is still chock full of keywords, and indeed features, borrowed from the mainframe, and I find absolutely nothing wrong with it. Getting rid of them would be tantamount to throwing the baby away with the bathwater. Shall we get rid, just for starters, of:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;MSGLEVEL&amp;nbsp;LRECL&amp;nbsp;RECFM&amp;nbsp;DISP OLD NEW SHARE MOD&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&amp;amp; and &amp;amp;&amp;amp; as symbolic references and . and .. as indicators of their termini&lt;/LI&gt;
&lt;LI&gt;The concepts of STEP, PROCEDURE, LIBRARY, CATALOG&lt;/LI&gt;
&lt;LI&gt;The entire PL/I syntax (including the macro language syntax) upon which the entire SAS language syntax is built&lt;/LI&gt;
&lt;LI&gt;...&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I guess I'm asking a rhetorical question.&amp;nbsp;I've always coded CARDS, code CARDS, and will always code CARDS - and nothing else. If it should offend some folks inheriting my code who have never seen a punch card, none of my business - they can replace it with DATALINES if they think it adds any value to their code. As far as LINES is concerned, see above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Paul D.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 06:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603775#M174961</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-11-13T06:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603780#M174964</link>
      <description>&lt;P&gt;The Version 8 documentation (which in many ways is soo much easier to read) clearly shows that LINES is an alias for CARDS/DATALINES.&amp;nbsp;&amp;nbsp;&lt;A href="https://v8doc.sas.com/sashtml/lgref/z0188182.htm" target="_blank"&gt;https://v8doc.sas.com/sashtml/lgref/z0188182.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;&lt;FONT size="5"&gt;&lt;A name="z0188182" target="_blank"&gt;&lt;/A&gt;DATALINES&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Indicates that data lines follow&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE cellspacing="2" cellpadding="4"&gt;
&lt;TBODY&gt;
&lt;TR valign="top"&gt;
&lt;TD align="right" bgcolor="#F5F5F5"&gt;&lt;STRONG&gt;Valid:&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left" bgcolor="#CCCCCC"&gt;in a DATA step&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD align="right" bgcolor="#F5F5F5"&gt;&lt;STRONG&gt;Category:&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left" bgcolor="#CCCCCC"&gt;File-handling&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD align="right" bgcolor="#F5F5F5"&gt;&lt;STRONG&gt;Type:&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left" bgcolor="#CCCCCC"&gt;Declarative&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD align="right" bgcolor="#F5F5F5"&gt;&lt;STRONG&gt;Aliases:&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left" bgcolor="#CCCCCC"&gt;CARDS, LINES&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD align="right" bgcolor="#F5F5F5"&gt;&lt;STRONG&gt;Restriction:&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left" bgcolor="#CCCCCC"&gt;Data lines cannot contain semicolons. Use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://v8doc.sas.com/sashtml/lgref/z0201747.htm" target="_blank"&gt;DATALINES4&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;when your data contain semicolons.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;But does not show that INFILE LINES is a valid alias for INFILE DATALINES.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://v8doc.sas.com/sashtml/lgref/z0146932.htm" target="_blank"&gt;https://v8doc.sas.com/sashtml/lgref/z0146932.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DATALINES | DATALINES4 specifies that the input data immediately follows the DATALINES or DATALINES4 statement in the DATA step. This allows you to use the INFILE statement options to control how the INPUT statement reads instream data lines.&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE cellspacing="2" cellpadding="4"&gt;
&lt;TBODY&gt;
&lt;TR valign="top"&gt;
&lt;TD width="95" align="left" bgcolor="#F5F5F5"&gt;&lt;STRONG&gt;Alias:&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left" bgcolor="#F5F5F5"&gt;CARDS | CARDS4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD width="95" align="left" bgcolor="#F5F5F5"&gt;&lt;STRONG&gt;Featured in:&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left" bgcolor="#F5F5F5"&gt;
&lt;P&gt;&lt;A href="https://v8doc.sas.com/sashtml/lgref/z0146932.htm#z0177189" target="_blank"&gt;Changing How Delimiters are Treated&lt;/A&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&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>Wed, 13 Nov 2019 06:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603780#M174964</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-13T06:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603795#M174970</link>
      <description>&lt;P&gt;Why is a null statement considered executable? Think of&amp;nbsp; this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select (gender);
  when ('M') put "this is a male";
  when ('F') put "this is a female";
  otherwise; /* null statement */
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The select() block needs a branch for every situation resulting of what's in the select() statement (or it will throw an ERROR), so it&amp;nbsp;&lt;EM&gt;executes&lt;/EM&gt; the null statement following the otherwise keyword.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 08:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603795#M174970</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-13T08:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603852#M174984</link>
      <description>&lt;P&gt;Sir Good morning, While it's nice to note your creative thinking, I am just seeking absolute clarity on the null statement(; or ;;;;&amp;nbsp; ) as executable stand alone in its own right as claimed by the docs. An executable global statement valid anywhere be it in open code or a datastep/proc construct doesn't seem convincing yet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;@ Everyone, To go further, what token would a null statement be? Would it be a special token, text(name token), or just a place holder text. How does the compiler see and do what is been instructed? Then of course at execution time we can deal with it accordingly if we know what does it execute&amp;nbsp;&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Why is a null statement considered executable? Think of&amp;nbsp; this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select (gender);
  when ('M') put "this is a male";
  when ('F') put "this is a female";
  otherwise; /* null statement */
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The select() block needs a branch for every situation resulting of what's in the select() statement (or it will throw an ERROR), so it&amp;nbsp;&lt;EM&gt;executes&lt;/EM&gt; the null statement following the otherwise keyword.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 13:21:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603852#M174984</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-11-13T13:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603861#M174987</link>
      <description>&lt;P&gt;In the compiled executable machine code, the null statement is not present at all. It has mutated into the location where the next machine code instruction to be executed is stored.&lt;/P&gt;
&lt;P&gt;See my select() example. The only thing left from the null statement is the JMP that jumps to the first instruction after the end; but that JMP is coded at the end of all the branches.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 13:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603861#M174987</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-13T13:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603870#M174989</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;Quentin, like you, I've learned from Ian that coding something that serves no function should be avoided for two reasons: (1) it may lead to an error and (2) to a confusion. The semicolon after a macro is one of those, and it falls in both categories. A period after a macro reference "just in case" is another, though it falls just into category #2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Paul D.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 14:36:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603870#M174989</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-11-13T14:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: 2 questions 1.What makes null statement not just null ,global and exec2.Datalines vs cards vs li</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603876#M174991</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/21262"&gt;@hashman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I admit, I've gone over from CARDS to DATALINES, primarily because it is more self-descriptive, which is not entirely the same as catering to a younger audience.&amp;nbsp; So I hold my head high even as I recall dropping a program/data deck of 300 ordered cards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt; &amp;nbsp; Nice topic!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 14:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-questions-1-What-makes-null-statement-not-just-null-global-and/m-p/603876#M174991</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-11-13T14:55:52Z</dc:date>
    </item>
  </channel>
</rss>

