Note: CALL SYMPUTX and CALL EXECUTE are both execution time call routines.
set one;
call symputx('mac',quote(strip(empl)));
call execute('%let list=&list &mac');
run;
Use %PUT statement to write the contents of &LIST to the SAS log.
%put &=list;
Log Output
LIST="12345" "67890" "45678"
Example 15: Delete a File on UNIX or Windows If
It Exists
Details
This example uses the %SYSEXEC statement to delete a file on the UNIX or the
Windows operating environment.
Program
%macro check(file);
%if %sysfunc(fileexist(&file)) ge 1 %then %do;
%if &sysscp=WIN %then %do;
options noxwait noxsync;
%sysexec del &file;
%end;
%else %do;
%sysexec rm &file;
%end;
%end;
%mend check;
%check(c: est.txt)
Program Description
Begin the macro definition with one parameter.
%macro check(file);
474 Appendix 5 SAS Macro Examples
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset