Files
SAS_PACKAGES/SQLinDS/001_macro/dssql_inner.sas
yabwon af60e31b56 version 20200511
Help info added
2020-05-11 10:54:44 +02:00

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;