mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2026-01-07 07:00:05 +00:00
32 lines
755 B
SAS
32 lines
755 B
SAS
/*** HELP START ***/
|
|
|
|
/* >>> %dsSQL_Inner() macro: <<<
|
|
*
|
|
* Internal macro called by dsSQL() function.
|
|
* The macro generates a uniqualy named sql view on the fly
|
|
* which is stored in DSSQL library.
|
|
*
|
|
* Recommended for SAS 9.3 and higher.
|
|
* Based on paper:
|
|
* "Use the Full Power of SAS in Your Function-Style Macros"
|
|
* by Mike Rhoads, Westat, Rockville, MD
|
|
* https://support.sas.com/resources/papers/proceedings12/004-2012.pdf
|
|
*
|
|
**/
|
|
|
|
/*** HELP END ***/
|
|
|
|
/* inner macro */
|
|
%MACRO dsSQL_Inner() / SECURE;
|
|
%local query;
|
|
%let query = %superq(query_arg);
|
|
%let query = %sysfunc(dequote(&query));
|
|
|
|
%let viewname = dsSQL.dsSQLtmpview&UNIQUE_INDEX_2.;
|
|
proc sql;
|
|
create view &viewname as
|
|
&query
|
|
;
|
|
quit;
|
|
%MEND dsSQL_Inner;
|