lesson 3 practice 3.7 level 1, please explain this code to me...I am not sure how and where is &name related to &idnum in this code?

15 views
Skip to first unread message

Kashmira Parekh

unread,
Oct 10, 2014, 4:01:47 PM10/10/14
to anova...@googlegroups.com










Orders Taken by Employee 121044: Abbott, Ray

Order_ID Order_Type Order_Date Delivery_Date
1231468750 1 25SEP2003 30SEP2003
1238367238 1 31JAN2006 31JAN2006
1238686430 1 12MAR2006 12MAR2006
1240903120 1 14DEC2006 14DEC2006
title;
footnote;

%let idnum=121044;
data _null_;
    set orion.employee_addresses;
    where employee_ID=&idnum;
    call symputx ('name',employee_name);
run;

proc print data=orion3.orders  noobs;
    var order_ID order_type order_date delivery_date;
    where employee_ID=&idnum;
    title "Orders Taken by Employee &idnum: &name";
run;













Orders Taken by Employee 121044: Abbott, Ray

Order_ID Order_Type Order_Date Delivery_Date
1231468750 1 25SEP2003 30SEP2003
1238367238 1 31JAN2006 31JAN2006
1238686430 1 12MAR2006 12MAR2006
1240903120 1 14DEC2006 14DEC2006

Orders Taken by Employee 121044: Abbott, Ray

Order_ID Order_Type Order_Date Delivery_Date
1231468750 1 25SEP2003 30SEP2003
1238367238 1 31JAN2006 31JAN2006
1238686430 1 12MAR2006 12MAR2006
1240903120 1 14DEC2006 14DEC2006


Nisarg

unread,
Oct 11, 2014, 9:30:34 AM10/11/14
to anova...@googlegroups.com
Hey Kashmira , 

CALLSYMPUT is a macro variable. In this code  
{call symputx ('name',employee_name) } we have created a macro 
variable "NAME" .

Check the link for MACRO in details: 


Kashmira Parekh

unread,
Oct 11, 2014, 7:33:01 PM10/11/14
to anova...@googlegroups.com
Thank you !! ill check the details out.
kashmira
Reply all
Reply to author
Forward
0 new messages