Sas 2 -lesson 6.3.6 practice level1 --> Using Putlog statement

12 views
Skip to first unread message

Thirumagal manivannan

unread,
Aug 21, 2014, 4:56:36 PM8/21/14
to anova...@googlegroups.com
Hi Vikas,
Sas 2 -lesson 6.3.6 level1
 I got same result for with Putlog statement and without putlog statement.
with put log statement code;
data customers;
set orion2.order_summary;
by customer_ID;
if first.Customer_ID=1 then Totsales=0;
putlog Totsales=sale_Amt=;
Total_sales+sale_Amt;
putlog Total_sales=;
if last.Customer_ID=1;
keep Customer_ID Total_sales;
run;
proc print data=customers;
run;
According to the solution
I am not able to view the Total_sales is accumulating the value of Sale_Amt.
------------------------------------------------------------------------
without putlog statement
data customers;
set orion2.order_summary;
by customer_ID;
if first.Customer_ID=1 then Total_sales=0;
putlog Totsales=sale_Amt=;
Total_sales+sale_Amt;
putlog Total_sales=;
if last.Customer_ID=1;
keep Customer_ID Total_sales;
run;
proc print data=customers;
run;

Jennifer SUN

unread,
Aug 22, 2014, 9:50:41 AM8/22/14
to
HI Thiru,

please be consistent on your variable names! please correct Totsales to Total_sales, your problem will be solved.

Anova Groups

unread,
Aug 22, 2014, 10:04:55 AM8/22/14
to anova...@googlegroups.com
Attention to details. Also give your error message, and what steps you performed to solve the issue.

Thirumagal manivannan

unread,
Aug 22, 2014, 4:02:43 PM8/22/14
to anova...@googlegroups.com
Hi Vikas,
I have entered the code in the solution-3rd part.
Correct code is in the 4th part.
I have entered the question for  3rd part of the solution.
Please look in to  my attached screen shot
Regards
Thiru
putlog statement displayed in solution section..docx
Reply all
Reply to author
Forward
0 new messages