This commit is contained in:
yabwon
2019-10-28 20:03:38 +01:00
parent 39117ffb90
commit 48aad33e87
13 changed files with 31 additions and 27 deletions

View File

@@ -4,7 +4,7 @@
*
* Internal macro called by dsSQL() function.
*
* Recomnended for SAS 9.3 and higher.
* 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

View File

@@ -4,13 +4,13 @@
*
* Main macro which allows to use
* SQL's queries in the data step.
* Recomnended for SAS 9.3 and higher.
* 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
*
* EXAMPLE 1: simple sql querry
* EXAMPLE 1: simple sql query
data class_subset;
set %SQL(select name, sex, height from sashelp.class where age > 12);
@@ -39,7 +39,7 @@
%let SYSPBUFF = %substr(&SYSPBUFF, 2, %LENGTH(&SYSPBUFF) - 2); /* remove brackets */
%let SYSPBUFF = %superq(SYSPBUFF); /* macroquoting */
%let SYSPBUFF = %sysfunc(quote(&SYSPBUFF)); /* quotes */
%put NOTE-***the querry***; /* print out the querry in the log */
%put NOTE-***the query***; /* print out the query in the log */
%put NOTE-&SYSPBUFF.;
%put NOTE-****************;

View File

@@ -4,7 +4,7 @@
*
* Internal function called by %SQL() macro.
*
* Recomnended for SAS 9.3 and higher.
* 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
@@ -20,7 +20,7 @@ proc fcmp
;
function dsSQL(unique_index_2, query $) $ 41;
length
query query_arg $ 32000 /* max querry length */
query query_arg $ 32000 /* max query length */
viewname $ 41
;
query_arg = dequote(query);

View File

@@ -1,5 +1,5 @@
/* This is the description file for the package. */
/* The collon (:) is a field separator and is restricted */
/* The colon (:) is a field separator and is restricted */
/* in lines of the header part. */
/* **HEADER** */

View File

@@ -8,7 +8,7 @@ ods html;
/*
* filename reference "packages" and "package" are keywords;
* the first one should be used to point folder with packages;
* the second is used internaly by macros;
* the second is used internally by macros;
filename packages "C:\SAS_PACKAGES";
%include packages(loadpackage.sas);