<?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 180-332 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608357#M76642</link>
    <description>&lt;P&gt;The RUN statement marked the end of the data step.&lt;/P&gt;
&lt;P&gt;Remove it. or move it after the rest of the statements for the data step.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Nov 2019 20:44:41 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-11-29T20:44:41Z</dc:date>
    <item>
      <title>Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608314#M76637</link>
      <description>Hi SAS Community,&lt;BR /&gt;&lt;BR /&gt;I’ve been trying to run this syntax in SAS version 9.4 and continue to be faced with “error 180-332” on every line of the syntax. I’m not sure what to do. Any advice on the matter would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Fri, 29 Nov 2019 18:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608314#M76637</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-29T18:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608320#M76638</link>
      <description>&lt;P&gt;Show us the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please copy the log as text and paste it into the window that appears when you click on the {i} icon in your reply. &lt;STRONG&gt;Do not skip this step.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 19:02:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608320#M76638</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-29T19:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608350#M76639</link>
      <description>&lt;P&gt;Hi Paige,&lt;BR /&gt;&lt;BR /&gt;The computer I have SAS on does not have internet. So, I have taken a photograph and attached it to my reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG-0995.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34331i891AE64EE714FAAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMG-0995.jpg" alt="IMG-0995.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 20:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608350#M76639</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-29T20:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608351#M76640</link>
      <description>&lt;P&gt;You seemed to have missed the start of the errors. Normally once you have one error any future errors are likely just artifacts of the first error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that first line shown is the first error then it is because you cannot stick an assignment statement in the middle of nowhere. They need to be part of a data step.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  x=y;
  ...
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Nov 2019 20:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608351#M76640</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-29T20:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608355#M76641</link>
      <description>&lt;P&gt;Hi Tom,&lt;BR /&gt;&lt;BR /&gt;My apologies, this is what it looks like from the very top:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG-0994.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34332iAFF123091469CFAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMG-0994.jpg" alt="IMG-0994.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 20:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608355#M76641</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-29T20:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608357#M76642</link>
      <description>&lt;P&gt;The RUN statement marked the end of the data step.&lt;/P&gt;
&lt;P&gt;Remove it. or move it after the rest of the statements for the data step.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 20:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608357#M76642</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-29T20:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608459#M76645</link>
      <description>&lt;P&gt;Thank you Tom! I managed to get the SAS environment reading the data file I would like to work with. However, when running the commands I tried to earlier, in my active editor window it is indicating "data step running" for a very long time. Have you had any experience with this when using SAS yourself? I'm not sure what is taking the program so long. It is a fairly large dataset (~ 60 000 participants) but even so, it didn't take that long to run frequency tables, etc. using the dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice you have on the matter would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 17:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608459#M76645</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-30T17:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608460#M76646</link>
      <description>&lt;P&gt;Sounds like you removed ALL &lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt; statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your data step has to have one and only one &lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt; statement, at the very end, which must be executed along with the rest of the data step. Then it should not show "Running" for a very long time, unless there is some other mistake.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 17:19:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608460#M76646</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-30T17:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608461#M76647</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sounds like you submitted code like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data x;
  set y;
  newvar=oldvar/10;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS compiles and runs the code in steps.&amp;nbsp; It knows when one steps ends when you either explicitly tell it so with RUN or QUIT statement (which to use depends of the type of step you are running) or you start a new step.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in this case it is waiting for a RUN statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data x;
  set y;
  newvar=oldvar/10;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Other possibilities are missing semi-colon to the end a statement. Or worse unbalanced quotes.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 17:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608461#M76647</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-30T17:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608463#M76648</link>
      <description>&lt;P&gt;I've combed over the syntax several times and can't seem to find the issue. I'm not sure what unbalanced quotes mean. If you could elaborate, that would be helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached the syntax here in it's entirety (again, as an image because the computer with SAS has no internet). If either one of you could have a scan through and let me know if anything jumps out at you as an error, that I could modify to make this run. I would greatly appreciate it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 17:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608463#M76648</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-30T17:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608464#M76649</link>
      <description>&lt;P&gt;Did you submit with your code the final line which says&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, that would cause the problem that the program seems to run a very long time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't have imbalanced quotes, this would be something where there is not quotes in pairs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;y='text;   /* Imbalanced quotes, not a pair of quotes */
y='text'; /* balanced quotes, the quotes are in pairs */&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 30 Nov 2019 18:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608464#M76649</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-30T18:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608465#M76650</link>
      <description>Hi Paige,&lt;BR /&gt;I have run the whole thing as is in the PDF attached, including the final line which says "run;"</description>
      <pubDate>Sat, 30 Nov 2019 18:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608465#M76650</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-30T18:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608467#M76651</link>
      <description>&lt;P&gt;I don't remember if you said how many observations are in valdata.val, but unless we're talking hundreds of millions, it shouldn't go on for hours.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other thing that can cause this is if something prior to this data step has caused an error. Those are rare, but again it could be imbalanced quotes, or some other error that I can't imagine. Did you check the log for errors prior to this data step?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 18:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608467#M76651</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-30T18:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608468#M76652</link>
      <description>&lt;P&gt;There are just over 60, 000 observations. No error's prior to this data step. It's the only thing i've run and in the log window, everything looks good. So, I'm stumped.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 18:16:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608468#M76652</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-30T18:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608473#M76653</link>
      <description>&lt;P&gt;Unbalanced quotes means you started a string literal and never ended it. So now SAS is out of wack and thinks your quoted values are the statements and the statements are part of string literals.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;2008  data test;
2009    x='String1';
2010    y='
          -
          49
2010! String2 ;
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.
             Inserting white space between a quoted string and the succeeding identifier is recommended.

2011    z='String3';
2012  run;
&lt;/PRE&gt;
&lt;P&gt;You can sometimes fix it by submitting an extra quote.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;2013  *'; stop; run;

NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
      2010:5    2011:13
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST may be incomplete.  When this step was stopped there were 0 observations
         and 2 variables.
WARNING: Data set WORK.TEST was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           53.36 seconds
      cpu time            0.76 seconds
&lt;/PRE&gt;
&lt;P&gt;But if all else fails it is best to just close your SAS session and start a new one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similar issues can happen with unclosed parentheses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also watch out for missing semi-colon.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;2014  data test;
2015    x='String1'
2016  run;
      ---
      22
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;,
              &amp;gt;=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=.

2017
2018  run;

NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
      2015:5
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST may be incomplete.  When this step was stopped there were 0 observations
         and 2 variables.
WARNING: Data set WORK.TEST was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;And watch out for long lines. Your PDF seems to have some statements way off the right side of the page.&amp;nbsp; Sometimes you can have characters out there you don;t see because that extend beyond the window your editor is showing and that will totally mess up your code. Or in rare cases when SAS is reading the code from a file it might only read the first XX characters on each line and miss those characters way out on the right.&amp;nbsp; I find that limiting text lines to 70-75 characters is the best of readability by humans.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 18:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608473#M76653</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-30T18:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608504#M76654</link>
      <description>In the case of missing semicolons and/or unbalanced quotes, SAS would alert me in the log window. There are no errors that appear when I run the code. I also have taken your advice Tom and brought the commands closer together so they are not far off on the right. However, no success. I continue to have the data step running in the active editor window.</description>
      <pubDate>Sat, 30 Nov 2019 22:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608504#M76654</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-30T22:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608507#M76655</link>
      <description>&lt;P&gt;Best to start with a fresh SAS session in case it is some previous step that has confused it.&lt;/P&gt;
&lt;P&gt;Try submitting a trivial step to make sure it is working.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then try to figure out what in your program is confusing SAS.&amp;nbsp; Try doing essentially a binary search.&amp;nbsp; Remove, or commentout with /*&amp;nbsp; */, half of program and see if it runs.&amp;nbsp; If it runs the problem is in the comment section if not it is in the part not commented. repeat until you find the line that is confusing SAs. Note you might need to restart SAS once it starts to fail to continue your testing.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 22:42:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608507#M76655</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-30T22:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608508#M76656</link>
      <description>Just started a fresh SAS session and ran the test you recommended. SAS is working. Could you elaborate on the commentout method to see which part of my program is confusing SAS. That's where I lost you.</description>
      <pubDate>Sat, 30 Nov 2019 22:53:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608508#M76656</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-30T22:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608509#M76657</link>
      <description>&lt;P&gt;Another thought occurs to me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes, if you are joining two tables in SQL, or via the DATA step MERGE command, sometimes I do it wrong and instead of getting the desired answer, you get a data set with 1000 times too many observations. You might want to check that, because that could cause later steps to take huge long times. But there's no error in the LOG.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 22:59:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608509#M76657</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-30T22:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error 180-332</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608510#M76658</link>
      <description>Good thought. However, I'm not merging any data. Just a simple import of one dataset. SAS is recognizing the dataset because i've run frequencies on the variables that make up that long syntax that was in the PDF. It's that particular syntax that is causing it grief. I still haven't figured out what part of it is stressing SAS out.</description>
      <pubDate>Sat, 30 Nov 2019 23:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-180-332/m-p/608510#M76658</guid>
      <dc:creator>ValSki</dc:creator>
      <dc:date>2019-11-30T23:02:14Z</dc:date>
    </item>
  </channel>
</rss>

