Sunteți pe pagina 1din 2

%macro p;

proc print;
run;
%mend;
data demo;
input sid age;
cards;
100 24
200 45
;
%p(demo);
data dm;
input color$;
cards;
black
white
red
;
%p(dm);
types of macro variables
global
local
automatic
arguments or parameters
positional parameters
keyword
mixed
developing macro applications for various procedures and statements
macro quoting functions
macro expressions
macro functions
macro options
macro interface functions
stored macros
;;
%global name age;
%let name=sekhar;
%let age=30;
%put my macro variables are &name and &age;
%macro gmv;
%global name age;
%let name=sekhar;
%let age=30;
%put my macro variables are &name and &age;
%mend;
%gmv;

/*local*/
%macro lmv;
%local center drug;
%let center=appolo;
%let drug=col5mg;
%put &drug and &center;
%mend;
%lmv;
%let t=demographic information;
%let ds=demographic;
title &t;
data &ds;
set sashelp.class;
run;
proc print data=&ds;
run;
/*automatic macro variables*/
%put _automatic_;
%put _user_;
%put _all_;

S-ar putea să vă placă și