<?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 when %including more scoring codes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470239#M120372</link>
    <description>&lt;P&gt;This looks like the code in the include files uses goto and a specific label. Within one data step, a label can appear only once. Change the goto statements and the labels in the includes so no label is used repeatedly.&lt;/P&gt;
&lt;P&gt;It might also be that the whole scoring code is structured in a way that only one of them can be used at any time, so you might get other issues.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 10:42:20 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-06-14T10:42:20Z</dc:date>
    <item>
      <title>Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470236#M120370</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have more models (HPLogistic/HPgenselect) and use CODE FILE to score data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When reading this file using %include into a datastep like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA want;
SET have;
%include '\\sasmat\FirstHPgenSelect.sas'
%include '\\sasmat\SecondHPgenSelect.sas'
%include '\\sasmat\ThirdHPgenSelect.sas'
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;following error occurres:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;+_SKIP_000:&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#ff0000"&gt; _________&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 305&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;ERROR 305-185: Label has already been used.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... It reads only the first %include and gives the error for all the others. It seems like the code wants to navigate to a specific location in the generated scoring code which has the same name in all these files and Sas can't handle it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to overcome this problem is highly appriciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;___&lt;/P&gt;&lt;P&gt;*SAS EG version&amp;nbsp;7.15 HF3 (7.100.5.6132) (64-bit)&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 10:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470236#M120370</guid>
      <dc:creator>JamesBlack</dc:creator>
      <dc:date>2018-06-14T10:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470239#M120372</link>
      <description>&lt;P&gt;This looks like the code in the include files uses goto and a specific label. Within one data step, a label can appear only once. Change the goto statements and the labels in the includes so no label is used repeatedly.&lt;/P&gt;
&lt;P&gt;It might also be that the whole scoring code is structured in a way that only one of them can be used at any time, so you might get other issues.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 10:42:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470239#M120372</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-14T10:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470240#M120373</link>
      <description>&lt;P&gt;First off, do not put %include statements in a datastep - they are not datastep components.&amp;nbsp; Second, an include statement should be finished with a semicolon.&amp;nbsp; Third, dont code in uppercase.&lt;/P&gt;
&lt;PRE&gt;%include '\\sasmat\FirstHPgenSelect.sas';
%include '\\sasmat\SecondHPgenSelect.sas';
%include '\\sasmat\ThirdHPgenSelect.sas';

data want;
  set have;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would be more appropriate, although I suspect you have some general SAS code in those files you would want to include in your program, if so make them macros and then call the macro in the datastep, much cleaner, and you could then put them on the sasautos and not include at all.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 10:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470240#M120373</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-14T10:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470241#M120374</link>
      <description>&lt;P&gt;Renaming the label and fixing all goto statements using it is the easy way to solve this. Not using labels and goto in a data step would be my first choice.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 10:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470241#M120374</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-06-14T10:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470256#M120378</link>
      <description>&lt;P&gt;To your First, it is proper technique to score data using %include in data step, see "&lt;A title="Techniques for scoring a regression model in SAS" href="https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank"&gt;The CODE statement&lt;/A&gt;". I'm aware of semicolons, I just forgot them in this sample code... I would be getting different error, if they were not in my script.&lt;BR /&gt;I have not noticed that SAS would be case sensitive...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calling this file from a macro desn't make any difference since it doesn't change anything inside the file which causes the error.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 11:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470256#M120378</guid>
      <dc:creator>JamesBlack</dc:creator>
      <dc:date>2018-06-14T11:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470258#M120379</link>
      <description>&lt;P&gt;Mine too, but I don't know how to do that in a simple way in one piece of code. Editing multiple prefabricated SAS codes which suppose to save my time, seems ineffective to me...&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 11:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470258#M120379</guid>
      <dc:creator>JamesBlack</dc:creator>
      <dc:date>2018-06-14T11:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470260#M120380</link>
      <description>Thank you, I noticed this. I don't know how to do that without having to edit all included files separatly...&lt;BR /&gt;&lt;BR /&gt;The option to be able to use only one scoring code doesn't look good to me, since I need to score quite big dataset with bunch of models...</description>
      <pubDate>Thu, 14 Jun 2018 11:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470260#M120380</guid>
      <dc:creator>JamesBlack</dc:creator>
      <dc:date>2018-06-14T11:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470267#M120384</link>
      <description>&lt;P&gt;I always advise to put setup things at the top, such as include files, macro variables, options, so it is clear where things are defined.&amp;nbsp; In this case it seems to be different, so can't speak there.&amp;nbsp; What I was getting as was to put the code within the included files a a macro and then call that, thus utilising sasautos, however again, in this instance this appears to go against the grain.&lt;/P&gt;
&lt;P&gt;SAS itself is not case sensitive, but my eyes are.&amp;nbsp; Code is far easier to read and debug when not written in uppercase.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 11:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470267#M120384</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-14T11:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error when %including more scoring codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470275#M120387</link>
      <description>&lt;P&gt;Just guessing here since you didn't include full code (or log) but it looks like your separate %INCLUDE blocks are all using the same LABEL statement.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;_SKIP_000:&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So you cannot use them together in the same data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either code them to use unique labels.&lt;/P&gt;
&lt;P&gt;Or run them as separate data steps.&lt;/P&gt;
&lt;P&gt;Or find another way to do this that does not need labels.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 12:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-when-including-more-scoring-codes/m-p/470275#M120387</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-06-14T12:15:33Z</dc:date>
    </item>
  </channel>
</rss>

