%macro TestGet(MACROV,Data=lib.test);
%local dsid;
%let dsid=%sysfunc(OPEN(&Data(where=(NAME="&NAME"))));
%let dsid=%sysfunc(CLOSE(&dsid));
%mend TestGet;
________________________________________________
%macro hey;
%let service=%TestGet(can,data=lib.test);
%put &service;
%mend;
________________________________________________
My Dataset is:
id name
1 ali
2 veli
3 can
4 cin
I've written two pieces of macro procedures. First macro is to generalize of retrieving a data from a dataset. First parameter is the data to be looked up in the dataset,and the second is the dataset name. I've created a local macro variable to initialize the look-up data to that variable.
So in the second procedure, i am trying to get the look-up data in the dataset and try tp print it to the log.
But i am proably doing something wrong. Could you please help me.
Best Regards,
Can Akcan