<?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: SELECT WHEN OTHERWISE STATEMENT SAS9.4, EG6.2 in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243607#M17360</link>
    <description>&lt;P&gt;Ooops. So simple and elegant. Pardon me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jan 2016 21:37:57 GMT</pubDate>
    <dc:creator>wmueller</dc:creator>
    <dc:date>2016-01-14T21:37:57Z</dc:date>
    <item>
      <title>SELECT WHEN OTHERWISE STATEMENT SAS9.4, EG6.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243600#M17357</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;although a similar question was on this community. I get similar problems with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----8&amp;lt;--------------&lt;/P&gt;&lt;P&gt;DATA Temp;&lt;BR /&gt;infile datalines delimiter=',';&lt;BR /&gt;format ITEM1 $40. ITEM2 $38.;&lt;BR /&gt;INPUT ITEM1 $ ITEM2 $;&lt;BR /&gt;datalines;&lt;BR /&gt;1000,A&lt;BR /&gt;2000,B&lt;BR /&gt;3000,C&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;set Temp;&lt;BR /&gt;select (_N_);&lt;BR /&gt;when (1) put 'First!';&lt;BR /&gt;otherwise put 'Not first!';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;-----&amp;gt;8--------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The logfile is as follows:&lt;/P&gt;&lt;P&gt;----------8&amp;lt;------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 The SAS System 21:57 Thursday, January 14, 2016&lt;/P&gt;&lt;P&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='SELECT_OTHERWISE1';&lt;BR /&gt;4 %LET _CLIENTPROJECTPATH='F:\8_SAS_Wiki\31_SAS_Syntax_Beispiele\SAS_Syntax.egp';&lt;BR /&gt;5 %LET _CLIENTPROJECTNAME='SAS_Syntax.egp';&lt;BR /&gt;6 %LET _SASPROGRAMFILE=;&lt;BR /&gt;7&lt;BR /&gt;8 ODS _ALL_ CLOSE;&lt;BR /&gt;9 OPTIONS DEV=ACTIVEX;&lt;BR /&gt;10 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;11 FILENAME EGSR TEMP;&lt;BR /&gt;12 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;13 STYLE=HtmlBlue&lt;BR /&gt;14 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")&lt;BR /&gt;15 NOGTITLE&lt;BR /&gt;16 NOGFOOTNOTE&lt;BR /&gt;17 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;18 ENCODING=UTF8&lt;BR /&gt;19 options(rolap="on")&lt;BR /&gt;20 ;&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;21&lt;BR /&gt;22 GOPTIONS ACCESSIBLE;&lt;BR /&gt;23 DATA Temp;&lt;BR /&gt;24 infile datalines delimiter=',';&lt;BR /&gt;25 format ITEM1 $40. ITEM2 $38.;&lt;BR /&gt;26 INPUT ITEM1 $ ITEM2 $;&lt;BR /&gt;27 datalines;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.TEMP has 3 observations and 2 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;BR /&gt;&lt;BR /&gt;31 ;&lt;/P&gt;&lt;P&gt;32 run;&lt;BR /&gt;33&lt;BR /&gt;34 data test;&lt;BR /&gt;35 set Temp;&lt;BR /&gt;36 put _N_;&lt;BR /&gt;37 select (_N_);&lt;BR /&gt;38 when (1) put 'First!';&lt;BR /&gt;39 otherwise put 'Not first!';&lt;BR /&gt;40 run;&lt;/P&gt;&lt;P&gt;40 run;&lt;BR /&gt;_&lt;BR /&gt;117&lt;BR /&gt;ERROR 117-185: There was 1 unclosed SELECT block.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.TEST may be incomplete. When this step was stopped there were 0 observations and 2 variables.&lt;BR /&gt;WARNING: Data set WORK.TEST was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 The SAS System 21:57 Thursday, January 14, 2016&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;41&lt;BR /&gt;42&lt;BR /&gt;43 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;44 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;45 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;46 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;47 %LET _SASPROGRAMFILE=;&lt;BR /&gt;48&lt;BR /&gt;49 ;*';*";*/;quit;run;&lt;BR /&gt;50 ODS _ALL_ CLOSE;&lt;BR /&gt;51&lt;BR /&gt;52&lt;BR /&gt;53 QUIT; RUN;&lt;BR /&gt;54&lt;/P&gt;&lt;P&gt;----------8&amp;lt;------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is going wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;wmueller&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 21:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243600#M17357</guid>
      <dc:creator>wmueller</dc:creator>
      <dc:date>2016-01-14T21:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT WHEN OTHERWISE STATEMENT SAS9.4, EG6.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243603#M17358</link>
      <description>&lt;P&gt;end;?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 21:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243603#M17358</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-01-14T21:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT WHEN OTHERWISE STATEMENT SAS9.4, EG6.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243605#M17359</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH﻿&lt;/a&gt;&amp;nbsp;is correct. &amp;nbsp;Specifically:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA Temp;
    infile datalines delimiter=',';
    format ITEM1 $40. ITEM2 $38.;
    INPUT ITEM1 $ ITEM2 $;
    datalines;
1000,A
2000,B
3000,C
;
run;

data test;
    set Temp;
    select (_N_);
        when (1) put 'First!';
        otherwise put 'Not first!';
    end; /* THIS end was missing */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jan 2016 21:36:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243605#M17359</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-01-14T21:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT WHEN OTHERWISE STATEMENT SAS9.4, EG6.2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243607#M17360</link>
      <description>&lt;P&gt;Ooops. So simple and elegant. Pardon me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 21:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SELECT-WHEN-OTHERWISE-STATEMENT-SAS9-4-EG6-2/m-p/243607#M17360</guid>
      <dc:creator>wmueller</dc:creator>
      <dc:date>2016-01-14T21:37:57Z</dc:date>
    </item>
  </channel>
</rss>

