<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gd="http://schemas.google.com/g/2005"><id>tag:blogger.com,1999:blog-7958828565254404797.post4640041282634841542..comments</id><updated>2024-12-13T03:11:35.450-08:00</updated><title type='text'>Comments on ListenData: SAS : IF-Then-Else Statements</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://www.listendata.com/feeds/comments/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html'/><link rel="hub" href="http://pubsubhubbub.appspot.com/"/><author><name>Deepanshu Bhalla</name><uri>http://www.blogger.com/profile/09802839558125192674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXm_iOrXFR9Ls-mjtOci4qd1m1V1TXkkWJINuMy84-Axo5pNS6CG7oKwR7hfHHI3tB1yuz8W_qo9HK2Cw5fHfe_4cL_2DCf_LyoK9LMLicZojbNYgypIP-RXNsw1GsVhk/s100/pic.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-8961326781104013496</id><published>2022-07-31T01:07:59.374-07:00</published><updated>2022-07-31T01:07:59.374-07:00</updated><title type='text'>DATA SHOERANGE;
LENGTH SHOERANGE$10.;
SET SASHELP....</title><content type='html'><br />DATA SHOERANGE;<br />LENGTH SHOERANGE$10.;<br />SET SASHELP.SHOES;<br />IF SALES &lt; 100000 THEN SHOERANGE =&quot;LOWER&quot;;<br />ELSE IF (SALES GT 10000) OR (SALES LT 20000) THEN SHOERANGE =&quot;MIDDLE&quot;;<br />ELSE IF SALES &gt; 200000 THEN SHOERANGE=&quot;UPPER&quot;;<br />RUN;<br /></content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/8961326781104013496'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/8961326781104013496'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1659254879374#c8961326781104013496' title=''/><link rel='related' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/7348850804742647029'/><author><name>Pavankalyangoud</name><uri>https://www.blogger.com/profile/17273243959040160359</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-766455118"/><gd:extendedProperty name="blogger.displayTime" value="July 31, 2022 at 1:07 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-7348850804742647029</id><published>2022-05-27T11:31:37.345-07:00</published><updated>2022-05-27T11:31:37.345-07:00</updated><title type='text'>Hii Sir,
Read sashelp.shoes as input.
• Create a n...</title><content type='html'>Hii Sir,<br />Read sashelp.shoes as input.<br />• Create a new SAS data set, work.shoerange.<br />• Create a new character variable SalesRange that will be used to categorize the observations into<br />three groups.<br />• Set the value of SalesRange to the following:<br />o Lower when Sales are less than $100,000.<br />o Middle when Sales are between $100,000 and $200,000, inclusively.<br />o Upper when Sales are above $200,000.<br /><br /> RUN this</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/7348850804742647029'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/7348850804742647029'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1653676297345#c7348850804742647029' title=''/><author><name>manoj</name><uri>https://www.blogger.com/profile/15527237771143998096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1583477901"/><gd:extendedProperty name="blogger.displayTime" value="May 27, 2022 at 11:31 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-6600598030428022833</id><published>2022-01-20T23:01:24.995-08:00</published><updated>2022-01-20T23:01:24.995-08:00</updated><title type='text'>DAta readin1;
set readin;
length Tag $30;
If ID in...</title><content type='html'>DAta readin1;<br />set readin;<br />length Tag $30;<br />If ID in (1,5,45,76) then tag =&#39;Incorrect&#39;;<br />run;<br />proc print;run;<br /><br />What&#39;s wrong in my code?<br />unable to show as incorrect in the output<br /><br />Ans: it will not show incorrect in output because the id&#39;s which you mentioned in in (1,5,45,76)statement are not present in sas dataset. so change the values as we have in readin dataset and try it will work. </content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/6600598030428022833'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/6600598030428022833'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1642748484995#c6600598030428022833' title=''/><link rel='related' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/1604352270147099884'/><author><name>ravi</name><uri>https://www.blogger.com/profile/12051180291065695712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitkb3x-_iayRoHpGT6QM7UByzjnXhmAnx318yG2AI4U2GSO9J8Kq6XZ4APG1fqKtpjmeOkFLgIegLMqSWoP6pdn_tmVLP0d9AFvLPl47twUhrgDpNtxUx3GdQcSxKSzFw/s220/me.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-2100201656"/><gd:extendedProperty name="blogger.displayTime" value="January 20, 2022 at 11:01 PM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-3905912851789220394</id><published>2021-01-19T12:05:25.703-08:00</published><updated>2021-01-19T12:05:25.703-08:00</updated><title type='text'>ID does not contain values (1,5,45,76).</title><content type='html'>ID does not contain values (1,5,45,76).</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/3905912851789220394'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/3905912851789220394'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1611086725703#c3905912851789220394' title=''/><link rel='related' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/1604352270147099884'/><author><name>Anonymous</name><uri>https://www.blogger.com/profile/03387847735143906782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1591322397"/><gd:extendedProperty name="blogger.displayTime" value="January 19, 2021 at 12:05 PM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-6225156968776887016</id><published>2020-05-06T01:36:22.776-07:00</published><updated>2020-05-06T01:36:22.776-07:00</updated><title type='text'>You didn&#39;t specify what data to print.

The la...</title><content type='html'>You didn&#39;t specify what data to print.<br /><br />The last line should read;<br /><br />proc print data=reading1;<br />run;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/6225156968776887016'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/6225156968776887016'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1588754182776#c6225156968776887016' title=''/><link rel='related' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/1604352270147099884'/><author><name>Kaybest</name><uri>https://www.blogger.com/profile/11103046457123891488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-447049203"/><gd:extendedProperty name="blogger.displayTime" value="May 6, 2020 at 1:36 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-1604352270147099884</id><published>2020-05-01T07:50:30.112-07:00</published><updated>2020-05-01T07:50:30.112-07:00</updated><title type='text'>DAta readin1;
set readin;
length Tag $30;
If ID in...</title><content type='html'>DAta readin1;<br />set readin;<br />length Tag $30;<br />If ID in (1,5,45,76) then tag =&#39;Incorrect&#39;;<br />run;<br />proc print;run;<br /><br />What&#39;s wrong in my code? <br />unable to show as incorrect in the output</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/1604352270147099884'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/1604352270147099884'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1588344630112#c1604352270147099884' title=''/><author><name>unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-6939909"/><gd:extendedProperty name="blogger.displayTime" value="May 1, 2020 at 7:50 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-6635141564279696805</id><published>2019-06-15T11:33:50.290-07:00</published><updated>2019-06-15T11:33:50.290-07:00</updated><title type='text'>It says if ID is less than or equals to 75 or less...</title><content type='html'>It says if ID is less than or equals to 75 or less than 75.<br />It means if ID is between 75 and 100 then tag as New.</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/6635141564279696805'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/6635141564279696805'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1560623630290#c6635141564279696805' title=''/><author><name>Chithari Ravi</name><uri>https://www.blogger.com/profile/14936309635501710509</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-2009504606"/><gd:extendedProperty name="blogger.displayTime" value="June 15, 2019 at 11:33 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-8107575463036622461</id><published>2019-05-14T00:51:20.515-07:00</published><updated>2019-05-14T00:51:20.515-07:00</updated><title type='text'>Hi. It shows me LE instead GE in below code

Data ...</title><content type='html'>Hi. It shows me LE instead GE in below code<br /><br />Data readin1;<br />Set readin;<br />length TAG $20;<br />IF ID &lt; 75 THEN TAG =&quot;Old&quot;;<br />ELSE IF 75 &lt;= ID &lt; 100 THEN TAG = &quot;New&quot;; <br />ELSE IF ID &gt;= 100 THEN TAG =&quot;Unchecked&quot;;<br />run; <br /><br />Can you please help me explaning 2nd statement<br /><br />ELSE IF 75 &lt;= ID &lt; 100 THEN TAG = &quot;New&quot;; </content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/8107575463036622461'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/8107575463036622461'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1557820280515#c8107575463036622461' title=''/><author><name>Kunal</name><uri>https://www.blogger.com/profile/04788709958629000658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1766926499"/><gd:extendedProperty name="blogger.displayTime" value="May 14, 2019 at 12:51 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-5353502356753234842</id><published>2018-04-25T15:42:46.641-07:00</published><updated>2018-04-25T15:42:46.641-07:00</updated><title type='text'>Are you from a non-technical background?</title><content type='html'>Are you from a non-technical background?</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/5353502356753234842'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/5353502356753234842'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1524696166641#c5353502356753234842' title=''/><link rel='related' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/618547380781653009'/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-6939909"/><gd:extendedProperty name="blogger.displayTime" value="April 25, 2018 at 3:42 PM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-618547380781653009</id><published>2016-05-24T15:09:45.768-07:00</published><updated>2016-05-24T15:09:45.768-07:00</updated><title type='text'>Please can you explain us details about if/then/el...</title><content type='html'>Please can you explain us details about if/then/else.How behind the scene it works. I try to get the clue but still I am not clear.For example putting if only without else how it works ? putting else if how it works ? At end only else how it works ? Putting only if without then how it works? How it works with do loop and array ? Basically while I am trying to understand Sas certified question (Mostly program with if/then/else/do statement and question is how many observations)it making me a lot confuse.</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/618547380781653009'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4640041282634841542/comments/default/618547380781653009'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html?showComment=1464127785768#c618547380781653009' title=''/><author><name>Suman</name><uri>https://www.blogger.com/profile/09451214907584466972</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2013/09/sas-if-then-else-statements.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4640041282634841542' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4640041282634841542' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1542112623"/><gd:extendedProperty name="blogger.displayTime" value="May 24, 2016 at 3:09 PM"/></entry></feed>