Hi all,
First of all, i want to apologize for my poor english.
I want to loop through a SAS data set and i don't know how.
I pass the id to the macro updateValueById, but this not work because it pass a bundle of id, i just want to update id by id.
There is my code:
%MACRO UpdateData;
DATA dataset;
INFILE "c:\employes.txt"
DLM = '09'X
MISSOVER
FIRSTOBS = 2
DSD;
LENGTH id 8
firstname $ 25
lastname $ 25
hire_date 8;
INPUT id
firstname
lastname
hire_date;
%UpdateValueById(id=Id);
RUN;
%MEND UpdateData;
%MACRO %UpdateValueById(Id);
proc sql;
update dataset
set name = 'toto'
where id = &Id;
quit;
%MEND UpdateValue;
Thank you all
... View more