CORE
mp_lib2cards.sas
Go to the documentation of this file.
1 
23 %macro mp_lib2cards(lib=
24  ,outloc=%sysfunc(pathname(work)) /* without trailing slash */
25  ,maxobs=max);
26 
27 /* FIRST create the cards files */
28 %local x ds memlist;
29 proc sql noprint;
30 select distinct lowcase(memname)
31  into: memlist
32  separated by ' '
33  from dictionary.tables
34  where upcase(libname)="%upcase(&lib)";
35 %do x=1 %to %sysfunc(countw(&memlist));
36  %let ds=%scan(&memlist,&x);
37  %mp_ds2cards(base_ds=&lib..&ds
38  ,cards_file="&outloc/&ds..sas"
39  ,maxobs=&maxobs)
40 %end;
41 
42 %mend;