<?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: SAS syntax correct in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498218#M132343</link>
    <description>&lt;P&gt;Can you run your code and post the log?&lt;/P&gt;</description>
    <pubDate>Sun, 23 Sep 2018 11:50:38 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2018-09-23T11:50:38Z</dc:date>
    <item>
      <title>SAS syntax correct</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498215#M132340</link>
      <description>&lt;P&gt;Please kindly me help me with&amp;nbsp;SAS syntax correct for each line.&lt;/P&gt;&lt;P&gt;Like line1 with the lack of '%' before let statement.Thank you for your attention&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table acct_purc_stat_m nologging as
select acct,sum(txn_amt_rmb) purc_amt
from ccm_base_trans
where plus_minus_flag=1 and txn_type='01' and org='242'
and "1may2015:00:00:00"dt &amp;lt;=eff_date&amp;lt;="31may2015:00:00:00"dt
group by acct
order by acct;
run;

1.%let var=%str(sex age edu_degree mob actv_flag circ_flag credit_limit otb ar);
let var=%str(sex age edu_degree mob actv_flag circ_flag credit_limit otb ar);
2.
proc sort data=ccm_expd(keep &amp;amp;var. where=(circ_flag='1'))
3.
out = acct_act_m;
4.
class acct;
run;

data acct_base_inf;
5.
	merge acct_act_m(in=a) acct_purc_stat_m(in=b);
6.
	if a;
7.
	used_rate=ifc(credit_limit in (0,.),0,ar/credit_limit);
run;

proc freq data=acct_base_inf;
	by sex edu_degree actv_flag circ_flag/missing;
run;

proc univariate data=acct_base_ing missing;
	var age mob credit_limit otb ar used_rate;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 11:40:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498215#M132340</guid>
      <dc:creator>ccnky123</dc:creator>
      <dc:date>2018-09-23T11:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS syntax correct</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498218#M132343</link>
      <description>&lt;P&gt;Can you run your code and post the log?&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 11:50:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498218#M132343</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-09-23T11:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS syntax correct</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498222#M132347</link>
      <description>&lt;P&gt;You already know the answer for %LET.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For #2, when KEEP is used as a data set option inside parentheses, it requires an equal sign:&amp;nbsp; keep=&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For #3, nothing wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For #4, there is no such thing as a CLASS statement in PROC SORT.&amp;nbsp; It should become a BY statement instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For #5 through #7, it is highly likely that the program should add a BY statement after the MERGE statement:&amp;nbsp; by acct;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FREQ is allowed to use a BY statement.&amp;nbsp; But most likely the intent is to use a TABLES statement instead of a BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC UNIVARIATE does not allow the MISSING option on the PROC statement.&amp;nbsp; If you had a CLASS statement, the MISSING option could be part of that statement.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 12:42:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498222#M132347</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-23T12:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS syntax correct</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498225#M132350</link>
      <description>thank you for your time.I have already got the answer from syntax only</description>
      <pubDate>Sun, 23 Sep 2018 13:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-syntax-correct/m-p/498225#M132350</guid>
      <dc:creator>ccnky123</dc:creator>
      <dc:date>2018-09-23T13:08:14Z</dc:date>
    </item>
  </channel>
</rss>

