how we can call macros with in data step?

Answer Posted / net_ameen

Call Execute() is used to call Macro aswellas call macro variable eg: Call execute ('%macroname');
Call execute ('&macrovarname');

Call Symput() is used to create a Global macro variable from within a datastep.

Symget() is used to call a macro variable and assign its value to a datastep variable.

%include() is not a macro statement yet used to call either a macro, extn file containing codes or proc/datastep within a program to be executed together.

Resolve() is used to resolve macro variables created thru call symput within same datastep.

Hope this helps. If any argument pls post.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between proportion and average?

2729


What do the SAS log messages "numeric values have been converted to character" mean?

860


how are numeric and character missing values represented internally? : Sas programming

596


do you prefer proc report or proc tabulate? Why? : Sas programming

547


what is transformation in sas data integration? : Sas-di

525






Explain the difference between using drop = data set option in set and data statement?

660


For clinical entire study how many tables will create approx?

1500


what is the difference between unique key and primary key? : Sas-di

564


In ARRAY processing, what does the DIM function do?

679


To what type of programms have you used scratch macros?

2106


data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.

1765


What can you learn from the SAS log when debugging?

892


what is the use of proc sql? : Sas programming

565


For what purposes have you used sas macros? : sas-macro

519


What is program data vector (pdv) and what are its functions?

603