<?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: need to find title  and output of the follwing code- thanks in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/need-to-find-title-and-output-of-the-follwing-code-thanks/m-p/254132#M48427</link>
    <description>Thanks rw9, I m trying to learn.</description>
    <pubDate>Thu, 03 Mar 2016 11:37:51 GMT</pubDate>
    <dc:creator>chann1313</dc:creator>
    <dc:date>2016-03-03T11:37:51Z</dc:date>
    <item>
      <title>need to find title  and output of the follwing code- thanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-find-title-and-output-of-the-follwing-code-thanks/m-p/253645#M48298</link>
      <description>&lt;DIV class="lp_chat_line lp_chat_visitor lp_chat_repeating_source"&gt;&lt;DIV class="outer_lp_chat_message"&gt;&lt;DIV class="lp_chat_message"&gt;data txns; do amt = 40000, 42000, 48000;&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;output;&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;end;&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;run;&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;data process;&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;set txns; if amt &amp;gt;= 50000 then do;&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;%let title_suffix = NOTE: Large Transaction Amounts!!;&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;large_tran_flag = 'Y';&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;end;&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;run; title "Transaction Report &amp;amp;title_suffix";&lt;/DIV&gt;&lt;DIV class="lp_chat_message"&gt;proc print data = process:&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lp_chat_line lp_chat_visitor lp_chat_repeating_source"&gt;&lt;DIV class="lp_chat_by"&gt;run;&lt;/DIV&gt;&lt;DIV class="lp_chat_by"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lp_chat_by"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lp_chat_by"&gt;another one :&lt;/DIV&gt;&lt;DIV class="lp_chat_by"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lp_chat_by"&gt;Given the following array, how would you total the values&lt;/DIV&gt;&lt;DIV class="lp_chat_by"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lp_chat_by"&gt;array abc(&lt;SPAN class="pg-3ff3"&gt;5&lt;/SPAN&gt;) ( &lt;SPAN class="pg-3ff3"&gt;12 5 . 17 20);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Mar 2016 00:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-find-title-and-output-of-the-follwing-code-thanks/m-p/253645#M48298</guid>
      <dc:creator>chann1313</dc:creator>
      <dc:date>2016-03-02T00:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: need to find title  and output of the follwing code- thanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-find-title-and-output-of-the-follwing-code-thanks/m-p/253723#M48306</link>
      <description>&lt;P&gt;Sorry, your first question doesn't make sense, then title can be found on the row indicated by the arrow 3 in the below code plus the text from the macro variable indicated by arrow 2&amp;nbsp;(note I have updated your to follow some good programmnig practice rules such as indentation and keeping one code line on one line for readbility). &amp;nbsp;Do note that the %let is not condition in this code, macro code is separate from datastep code. &amp;nbsp;Output is marked by arrow 1:&lt;/P&gt;
&lt;PRE&gt;data txns; 
  do amt=40000, 42000, 48000;
    output;     &amp;lt;--1
  end;
run;

%let title_suffix=NOTE: Large Transaction Amounts!!;  &amp;lt;--2

data process;
  set txns;
  if amt &amp;gt;= 50000 then do;
    large_tran_flag = 'Y';
  end;
run;

title "Transaction Report &amp;amp;title_suffix";    &amp;lt;--3
proc print data=process:
run;&lt;/PRE&gt;
&lt;P&gt;For your second question - which should be in a separate post - you can use the of array syntax to simplfy your code:&lt;/P&gt;
&lt;PRE&gt;data want;
  array abc(5) (12 5 . 17 20);
  result=sum(of abc{*});
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Mar 2016 09:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-find-title-and-output-of-the-follwing-code-thanks/m-p/253723#M48306</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-02T09:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: need to find title  and output of the follwing code- thanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-find-title-and-output-of-the-follwing-code-thanks/m-p/254132#M48427</link>
      <description>Thanks rw9, I m trying to learn.</description>
      <pubDate>Thu, 03 Mar 2016 11:37:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-find-title-and-output-of-the-follwing-code-thanks/m-p/254132#M48427</guid>
      <dc:creator>chann1313</dc:creator>
      <dc:date>2016-03-03T11:37:51Z</dc:date>
    </item>
  </channel>
</rss>

