<?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: Take the Program Debugging Challenge [how to improve your question] in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494003#M130097</link>
    <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/229133"&gt;@sathwik&lt;/a&gt;,&lt;/P&gt;&lt;BR /&gt; &lt;P&gt;Your question requires more details before experts can help.&amp;nbsp;Can you revise your question to include more information?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Review this checklist:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Specify a meaningful subject line for your topic.&amp;nbsp; Avoid generic subjects like "need help," "SAS query," or "urgent."&lt;/LI&gt;
&lt;LI&gt;When appropriate, provide sample data in text or DATA step format.&amp;nbsp; See &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;this article for one method&lt;/A&gt;&amp;nbsp;you can use.&lt;/LI&gt;
&lt;LI&gt;If you're encountering an error in SAS, include the SAS log or a screenshot of the error condition.&amp;nbsp;Use the&amp;nbsp;&lt;STRONG&gt;Photos&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;button to include the image in your message.&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" style="width: 279px;"&gt;&lt;IMG src="https://kntur85557.i.lithium.com/t5/image/serverpage/image-id/16608i91A52F817EAC9A69/image-dimensions/279x150?v=1.0" width="279" height="150" alt="use_buttons.png" title="use_buttons.png" /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;It also helps to include an example (table or picture) of the result that you're trying to achieve.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To edit your original message, select the "blue gear" icon at the top of the message and select&amp;nbsp;&lt;STRONG&gt;Edit Message&lt;/STRONG&gt;.&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;From there you can adjust the title and add more details to the body of the message.&amp;nbsp; Or, simply reply to this message with any additional information you can supply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" style="width: 229px;"&gt;&lt;IMG src="https://kntur85557.i.lithium.com/t5/image/serverpage/image-id/16605iAC020BC79315B045/image-size/large?v=1.0&amp;amp;px=600" alt="edit_post.png" title="edit_post.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;SAS experts are eager to help -- help&amp;nbsp;&lt;EM&gt;them&lt;/EM&gt; by providing as much detail as you can.&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style:italic;font-size:smaller;"&gt;This prewritten response was triggered for you by fellow SAS Support Communities member &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;.</description>
    <pubDate>Mon, 10 Sep 2018 05:08:47 GMT</pubDate>
    <dc:creator>Community_Guide</dc:creator>
    <dc:date>2018-09-10T05:08:47Z</dc:date>
    <item>
      <title>How to reduce the program by using " IF " condition any tips</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494001#M130096</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Example;
	length Name $15;
	input Name $;

	if Name = 'Madhu' then do i = 1 to 5;
	Designee = 'Jr_Associate';
	Department = 'QA';
	output;
end;
	if Name = 'Sathwik' then do i = 1 to 5;
	Designee = 'Jr_Associate';
	Department = 'PB';
	output;
end;
	if Name = 'Mohan' then do i = 1 to 5;
	Designee = 'Manager';
	Department = 'PB';
	output;
end;
	if Name = 'Raja' then do i = 1 to 5;
	Designee = 'Manager';
	Department = 'QA';
	output;
end;
	if Name = 'Kiran' then do i = 1 to 5;
	Designee = 'Manager';
	Department = 'BA';
	output;
end;
	if Name = 'Sainath' then do i = 1 to 5;
	Designee = 'Manager';
	Department = 'CL';
	output;
end;
	drop i;
	cards;
		Madhu 
		Sathwik
		Mohan 
		Raja
		Kiran
		Sainath
		;

run;

Proc print data=Example;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Sep 2018 05:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494001#M130096</guid>
      <dc:creator>sathwik</dc:creator>
      <dc:date>2018-09-10T05:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Take the Program Debugging Challenge [how to improve your question]</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494003#M130097</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/229133"&gt;@sathwik&lt;/a&gt;,&lt;/P&gt;&lt;BR /&gt; &lt;P&gt;Your question requires more details before experts can help.&amp;nbsp;Can you revise your question to include more information?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Review this checklist:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Specify a meaningful subject line for your topic.&amp;nbsp; Avoid generic subjects like "need help," "SAS query," or "urgent."&lt;/LI&gt;
&lt;LI&gt;When appropriate, provide sample data in text or DATA step format.&amp;nbsp; See &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;this article for one method&lt;/A&gt;&amp;nbsp;you can use.&lt;/LI&gt;
&lt;LI&gt;If you're encountering an error in SAS, include the SAS log or a screenshot of the error condition.&amp;nbsp;Use the&amp;nbsp;&lt;STRONG&gt;Photos&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;button to include the image in your message.&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" style="width: 279px;"&gt;&lt;IMG src="https://kntur85557.i.lithium.com/t5/image/serverpage/image-id/16608i91A52F817EAC9A69/image-dimensions/279x150?v=1.0" width="279" height="150" alt="use_buttons.png" title="use_buttons.png" /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;It also helps to include an example (table or picture) of the result that you're trying to achieve.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To edit your original message, select the "blue gear" icon at the top of the message and select&amp;nbsp;&lt;STRONG&gt;Edit Message&lt;/STRONG&gt;.&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;From there you can adjust the title and add more details to the body of the message.&amp;nbsp; Or, simply reply to this message with any additional information you can supply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" style="width: 229px;"&gt;&lt;IMG src="https://kntur85557.i.lithium.com/t5/image/serverpage/image-id/16605iAC020BC79315B045/image-size/large?v=1.0&amp;amp;px=600" alt="edit_post.png" title="edit_post.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;SAS experts are eager to help -- help&amp;nbsp;&lt;EM&gt;them&lt;/EM&gt; by providing as much detail as you can.&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style:italic;font-size:smaller;"&gt;This prewritten response was triggered for you by fellow SAS Support Communities member &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;.</description>
      <pubDate>Mon, 10 Sep 2018 05:08:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494003#M130097</guid>
      <dc:creator>Community_Guide</dc:creator>
      <dc:date>2018-09-10T05:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to reduce the program by using " IF " condition any tips</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494006#M130099</link>
      <description>&lt;P&gt;Please explain the issue you have with the code.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 05:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494006#M130099</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-09-10T05:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to reduce the program by using " IF " condition any tips</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494012#M130100</link>
      <description>In that program we use "IF" condition multiple times for data entry.&lt;BR /&gt;But we will reduce the program. By using "IF" condition single time is it possible.</description>
      <pubDate>Mon, 10 Sep 2018 06:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494012#M130100</guid>
      <dc:creator>sathwik</dc:creator>
      <dc:date>2018-09-10T06:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to reduce the program by using " IF " condition any tips</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494013#M130101</link>
      <description>&lt;P&gt;you are getting the zero observations because you are not using the exact string in the If statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the string, there are leading blanks which we need to keep for the code to work as below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data Example;
	length Name $15;
	input Name $;

	if Name = '		Madhu' then do i = 1 to 5;
	Designee = 'Jr_Associate';
	Department = 'QA';
	output;
end;
	if Name = '		Sathwik' then do i = 1 to 5;
	Designee = 'Jr_Associate';
	Department = 'PB';
	output;
end;
	if Name = '		Mohan' then do i = 1 to 5;
	Designee = 'Manager';
	Department = 'PB';
	output;
end;
	if Name = '		Raja' then do i = 1 to 5;
	Designee = 'Manager';
	Department = 'QA';
	output;
end;
	if Name = '		Kiran' then do i = 1 to 5;
	Designee = 'Manager';
	Department = 'BA';
	output;
end;
	if Name = '		Sainath' then do i = 1 to 5;
	Designee = 'Manager';
	Department = 'CL';
	output;
end;
	drop i;
	cards;
		Madhu 
		Sathwik
		Mohan 
		Raja
		Kiran
		Sainath
		;

run;

Proc print data=Example;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Sep 2018 06:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494013#M130101</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-09-10T06:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to reduce the program by using " IF " condition any tips</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494014#M130102</link>
      <description>ok&lt;BR /&gt;How to reduce this program</description>
      <pubDate>Mon, 10 Sep 2018 06:14:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494014#M130102</guid>
      <dc:creator>sathwik</dc:creator>
      <dc:date>2018-09-10T06:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to reduce the program by using " IF " condition any tips</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494015#M130103</link>
      <description>&lt;P&gt;Move data out of code. Put the additional columns into the datalines and include them in the input statement.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 06:18:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494015#M130103</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-10T06:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to reduce the program by using " IF " condition any tips</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494021#M130106</link>
      <description>&lt;P&gt;thank you all&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 07:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reduce-the-program-by-using-quot-IF-quot-condition-any/m-p/494021#M130106</guid>
      <dc:creator>sathwik</dc:creator>
      <dc:date>2018-09-10T07:00:36Z</dc:date>
    </item>
  </channel>
</rss>

