<?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: Data Step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489534#M127857</link>
    <description>&lt;P&gt;Even after giving the length, I'm receiving the output as follows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
length name average_talk_time_answered_calls Average_ACW_Time_Answered_Calls $200;
name='Van der Haeghen, Wendy (D003983)';output;
Average_Talk_Time_Answered_Calls='116,3953488';output;
name='Van der Haeghen, Wendy (D003983)';output;
Average_Talk_Time_Answered_Calls='86,66666667';output;
name='Verhaeghe, John (D002902)';output;
Average_ACW_Time_Answered_Calls='290,4883721';output;
name='Verhaeghe, John (D002902)';output;
Average_ACW_Time_Answered_Calls='2,333333333';output;
;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="696"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="224"&gt;name&lt;/TD&gt;
&lt;TD width="212"&gt;average_talk_time_answered_calls&lt;/TD&gt;
&lt;TD width="260"&gt;Average_ACW_Time_Answered_Calls&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;116,3953488&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;116,3953488&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;290,4883721&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;290,4883721&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;2,333333333&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Desired Output:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="722"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="265"&gt;Name&lt;/TD&gt;
&lt;TD width="225"&gt;Average Talk Time Answered Calls&lt;/TD&gt;
&lt;TD width="232"&gt;Average ACW Time Answered Calls&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;116,3953488&lt;/TD&gt;
&lt;TD&gt;290,4883721&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;2,333333333&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Fri, 24 Aug 2018 10:05:20 GMT</pubDate>
    <dc:creator>Babloo</dc:creator>
    <dc:date>2018-08-24T10:05:20Z</dc:date>
    <item>
      <title>Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489527#M127851</link>
      <description>&lt;P&gt;I ran the code as follows but I'm not receiving the output as I mentioned in the screenshot below. Appreciate if someone of you guide me here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
name='Van der Haeghen, Wendy (D003983)';output;
Average_Talk_Time_Answered_Calls='116,3953488';output;
name='Van der Haeghen, Wendy (D003983)';output;
Average_Talk_Time_Answered_Calls='86,66666667';output;
name='Verhaeghe, John (D002902)';output;
Average_ACW_Time_Answered_Calls='290,4883721';output;
name='Verhaeghe, John (D002902)';output;
Average_ACW_Time_AnsweredCalls='2,333333333';output;
;
run; 

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Disired Output:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="722"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="265"&gt;Name&lt;/TD&gt;
&lt;TD width="225"&gt;Average Talk Time Answered Calls&lt;/TD&gt;
&lt;TD width="232"&gt;Average ACW Time Answered Calls&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;116,3953488&lt;/TD&gt;
&lt;TD&gt;290,4883721&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;2,333333333&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 24 Aug 2018 09:28:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489527#M127851</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-08-24T09:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489529#M127853</link>
      <description>&lt;P&gt;Can I suggest you run through the training videos provided by SAS:&lt;BR /&gt;&lt;A href="https://video.sas.com/" target="_blank"&gt;https://video.sas.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;A fair few of your questions would be answered by the training given there.&amp;nbsp; In this instance you will note that if a character variable is not explicitly given a length, then it will default to 8 characters or the length of the first assigned character string.&amp;nbsp; In this case your variables have not been given a length, and hence they default to the length of the first character string.&amp;nbsp; Add&lt;/P&gt;
&lt;PRE&gt;length name average_talk_time_answered_calls $200;&lt;/PRE&gt;
&lt;P&gt;After the data statement to explictly set them both to 200 characters long.&lt;/P&gt;
&lt;P&gt;Also there is a typo:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;Average_ACW_Time_AnsweredCalls&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'2,333333333'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;output&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;No underscore before calls.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 09:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489529#M127853</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-24T09:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489534#M127857</link>
      <description>&lt;P&gt;Even after giving the length, I'm receiving the output as follows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
length name average_talk_time_answered_calls Average_ACW_Time_Answered_Calls $200;
name='Van der Haeghen, Wendy (D003983)';output;
Average_Talk_Time_Answered_Calls='116,3953488';output;
name='Van der Haeghen, Wendy (D003983)';output;
Average_Talk_Time_Answered_Calls='86,66666667';output;
name='Verhaeghe, John (D002902)';output;
Average_ACW_Time_Answered_Calls='290,4883721';output;
name='Verhaeghe, John (D002902)';output;
Average_ACW_Time_Answered_Calls='2,333333333';output;
;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="696"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="224"&gt;name&lt;/TD&gt;
&lt;TD width="212"&gt;average_talk_time_answered_calls&lt;/TD&gt;
&lt;TD width="260"&gt;Average_ACW_Time_Answered_Calls&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;116,3953488&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;116,3953488&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;290,4883721&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;290,4883721&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;2,333333333&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Desired Output:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="722"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="265"&gt;Name&lt;/TD&gt;
&lt;TD width="225"&gt;Average Talk Time Answered Calls&lt;/TD&gt;
&lt;TD width="232"&gt;Average ACW Time Answered Calls&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Van der Haeghen, Wendy (D003983)&lt;/TD&gt;
&lt;TD&gt;116,3953488&lt;/TD&gt;
&lt;TD&gt;290,4883721&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Verhaeghe, John (D002902)&lt;/TD&gt;
&lt;TD&gt;86,66666667&lt;/TD&gt;
&lt;TD&gt;2,333333333&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 24 Aug 2018 10:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489534#M127857</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-08-24T10:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489535#M127858</link>
      <description>&lt;P&gt;You have told it to "output" after every assignment.&amp;nbsp; Put an output only when you want it to write an observation out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data test;
  length name average_talk_time_answered_calls 
  Average_ACW_Time_Answered_Calls $200;
  name='Van der Haeghen, Wendy (D003983)';
  Average_Talk_Time_Answered_Calls='116,3953488';output;
  name='Van der Haeghen, Wendy (D003983)';
  Average_Talk_Time_Answered_Calls='86,66666667';output; 
  name='Verhaeghe, John (D002902)';
  Average_ACW_Time_Answered_Calls='290,4883721';output;
  name='Verhaeghe, John (D002902)';
  Average_ACW_Time_Answered_Calls='2,333333333';output;
;
run; &lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Aug 2018 10:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489535#M127858</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-24T10:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489540#M127862</link>
      <description>&lt;P&gt;You are a PROC Star, and you've been around here for some time, as the +600 posts indicate. The answer to this extremely simple issue should be glaringly obvious to you by now.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 10:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489540#M127862</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-24T10:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489595#M127878</link>
      <description>&lt;P&gt;In case you need a little more guidance, here's the topic you need to research.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WIthin a DATA step, what does an OUTPUT statement do?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 13:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489595#M127878</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-24T13:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489603#M127880</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8409"&gt;@Babloo&lt;/a&gt;&amp;nbsp;, May i request you to phrase or frame your subject properly as opposed to "Data step". You could write something descriptive plz like &lt;EM&gt;&lt;STRONG&gt;"A datastep understanding issue or A data step conceptualization problem not leading to desired output?&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;This will get wider audience and the res-ponders more interested.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The videos suggested by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;are excellent plus if you find yourself lagging in understanding of essentials, I would like to recommend the book of author Ron cody&amp;nbsp; &amp;nbsp;&lt;A href="https://support.sas.com/en/books/authors/ron-cody.html&amp;nbsp;" target="_blank"&gt;https://support.sas.com/en/books/authors/ron-cody.html&amp;nbsp;&lt;/A&gt; Read slowly and&amp;nbsp; thoroughly&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And not the least,&amp;nbsp;&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_blank"&gt;Maxims of Maximally Efficient SAS Programmers&lt;/A&gt;&amp;nbsp; authored by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;will guide you on the affirmative. The idea is to pay serious and sincere attention to every maxim.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 14:04:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489603#M127880</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-24T14:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Data Step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489650#M127903</link>
      <description>&lt;P&gt;What is the reason for the Average_Talk_Time_Answered_Calls to be Character????&lt;/P&gt;
&lt;P&gt;It won't sort, graph or do almost any analysis in a likely meaningful form.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 15:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Step/m-p/489650#M127903</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-24T15:41:01Z</dc:date>
    </item>
  </channel>
</rss>

