<?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: SPOOL Error in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SPOOL-Error/m-p/748250#M29519</link>
    <description>&lt;P&gt;How were these datasets created in the first place? Depending on the source type, you can set the variable types consistently when the data is brought into SAS.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jun 2021 04:41:16 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-06-16T04:41:16Z</dc:date>
    <item>
      <title>SPOOL Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SPOOL-Error/m-p/748242#M29517</link>
      <description>&lt;P&gt;&lt;EM&gt;I am reading in a set of data sets that share a naming convention, but each subsequent data set name has a suffix that is incremented by 1--i.e., tx1, tx2, . . . tx28. Three of the 28 data sets have a variable that is num, when in the rest of the data sets this variable is char. I am trying to make the type consistent before appending these data sets; however, I am getting a SPOOL error.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%macro vartype;
	%do i=1 %to 28;
		data tx2&amp;amp;i;
		  set tx&amp;amp;i.; 
		  	CASE_CAUSE_NBR2 = trim(left(put(CASE_CAUSE_NBR, 9.);
		run;
	%end;
%mend vartype;
%vartype;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;When I comment out the line that generates the new variable, the code runs successfully; however, when I include it, that's when the error arises . . .&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MLOGIC(VARTYPE): %DO loop index variable I is now 28; loop will iterate again.&lt;BR /&gt;SYMBOLGEN: Macro variable I resolves to 28&lt;BR /&gt;MPRINT(VARTYPE): data tx228;&lt;BR /&gt;SYMBOLGEN: Macro variable I resolves to 28&lt;BR /&gt;22: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN&lt;BR /&gt;where the error has occurred.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, ',', -, /, &amp;lt;, &amp;lt;=,&lt;BR /&gt;&amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOT, NOTIN, OR, ^,&lt;BR /&gt;^=, |, ||, ~, ~=.&lt;BR /&gt;76: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where&lt;BR /&gt;the error has occurred.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;MPRINT(VARTYPE): set tx28;&lt;BR /&gt;MPRINT(VARTYPE): CASE_CAUSE_NBR2 = trim(left(put(CASE_CAUSE_NBR, 9.);&lt;BR /&gt;MPRINT(VARTYPE): run;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.TX228 may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 66 variables.&lt;BR /&gt;WARNING: Data set WORK.TX228 was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Any ideas?&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 01:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SPOOL-Error/m-p/748242#M29517</guid>
      <dc:creator>raivester</dc:creator>
      <dc:date>2021-06-16T01:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: SPOOL Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SPOOL-Error/m-p/748243#M29518</link>
      <description>&lt;P&gt;You are missing two right brackets:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CASE_CAUSE_NBR2 = trim(left(put(CASE_CAUSE_NBR, 9.)));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jun 2021 01:40:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SPOOL-Error/m-p/748243#M29518</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-06-16T01:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: SPOOL Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SPOOL-Error/m-p/748250#M29519</link>
      <description>&lt;P&gt;How were these datasets created in the first place? Depending on the source type, you can set the variable types consistently when the data is brought into SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 04:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SPOOL-Error/m-p/748250#M29519</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-16T04:41:16Z</dc:date>
    </item>
  </channel>
</rss>

