diff --git a/SAS(r) packages - the way to share (a how to)- Paper 4725-2020.pdf b/SAS(r) packages - the way to share (a how to)- Paper 4725-2020.pdf index 83018b5..0aed2df 100644 Binary files a/SAS(r) packages - the way to share (a how to)- Paper 4725-2020.pdf and b/SAS(r) packages - the way to share (a how to)- Paper 4725-2020.pdf differ diff --git a/SQLinDS/001_macro/dssql_inner.sas b/SQLinDS/001_macro/dssql_inner.sas index 5066b71..7a7f896 100644 --- a/SQLinDS/001_macro/dssql_inner.sas +++ b/SQLinDS/001_macro/dssql_inner.sas @@ -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 diff --git a/SQLinDS/001_macro/sql.sas b/SQLinDS/001_macro/sql.sas index 07937d1..119a129 100644 --- a/SQLinDS/001_macro/sql.sas +++ b/SQLinDS/001_macro/sql.sas @@ -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-****************; diff --git a/SQLinDS/002_function/dssql.sas b/SQLinDS/002_function/dssql.sas index 9ff916c..d70594e 100644 --- a/SQLinDS/002_function/dssql.sas +++ b/SQLinDS/002_function/dssql.sas @@ -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); diff --git a/SQLinDS/description.sas b/SQLinDS/description.sas index 7ec7176..722e782 100644 --- a/SQLinDS/description.sas +++ b/SQLinDS/description.sas @@ -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** */ diff --git a/SQLinDS/generate_package_sqlinds.sas b/SQLinDS/generate_package_sqlinds.sas index 5122c55..8b08ce9 100644 --- a/SQLinDS/generate_package_sqlinds.sas +++ b/SQLinDS/generate_package_sqlinds.sas @@ -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); diff --git a/dfa.zip b/dfa.zip index 7069f71..f8fde6b 100644 Binary files a/dfa.zip and b/dfa.zip differ diff --git a/dynmacroarray.zip b/dynmacroarray.zip index 8fbb890..eecae5e 100644 Binary files a/dynmacroarray.zip and b/dynmacroarray.zip differ diff --git a/generatePackage.sas b/generatePackage.sas index 69dd7a5..6210291 100644 --- a/generatePackage.sas +++ b/generatePackage.sas @@ -36,11 +36,11 @@ */ /**#############################################################################**/ -/* Macros to generte SAS packages */ +/* Macros to generate SAS packages */ /* A SAS package is a zip file containing a group of SAS codes (macros, functions, datasteps generating data, etc.) wrapped up together and %INCLUDEed by - a single load.sas file (also embeaded inside the zip). + a single load.sas file (also embedded inside the zip). */ /*** HELP END ***/ @@ -92,7 +92,7 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 256; when(upcase(scan(_INFILE_, 1, ":")) = "REQUIRED") call symputX("packageRequired", scan(_INFILE_, 2, ":"),"L"); when(upcase(scan(_INFILE_, 1, ":")) = "REQPACKAGES") call symputX("packageReqPackages", scan(_INFILE_, 2, ":"),"L"); - /* stop at the begining of description */ + /* stop at the beginning of description */ when(upcase(scan(_INFILE_, 1, ":")) = "DESCRIPTION START") stop; otherwise; end; @@ -125,7 +125,7 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 256; %do; %put ERROR: Package name is more than 24 characters long.; %put ERROR- The name is used for functions%str(%') dataset name; - %put ERROR- and for formats%str(%') catalog name (with sufix).; + %put ERROR- and for formats%str(%') cataloge name (with suffix).; %put ERROR- The length is %sysfunc(lengthn(&packageName.)). Try something shorter.; %abort; %end; @@ -139,7 +139,7 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 256; %do; %put ERROR: Package name contains illegal symbols.; %put ERROR- The name is used for functions%str(%') dataset name; - %put ERROR- and for formats%str(%') catalog name.; + %put ERROR- and for formats%str(%') cataloge name.; %put ERROR- Only English letters, underscore(_), and digits are allowed.; %put ERROR- Try something else. Maybe: %qsysfunc(compress(&packageName.,,KDF)) will do?; %abort; @@ -181,7 +181,7 @@ filename &zipReferrence. ZIP "&filesLocation./%lowcase(&packageName.).zip"; */ /* Remember to prepare the description.sas file for you 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. The file should contain the following obligatory information: -------------------------------------------------------------------------------------------- @@ -210,7 +210,7 @@ DESCRIPTION END: Name of the 'type' of folder and files.sas inside must be in _low_ case letters. If order of loading is important, the 'sequential number' - can be used to order multiple types in the wey you wish. + can be used to order multiple types in the way you wish. The "tree structure" of the folder could be for example as follows: @@ -250,7 +250,7 @@ DESCRIPTION END: | | | +- | - +-006_format [if your codes depend eachother you can order them in folders, + +-006_format [if your codes depend each other you can order them in folders, | | e.g. code from 003_... will be executed before 006_...] | | | +-abc.sas [a file with a code creating format ABC, @@ -605,7 +605,7 @@ data _null_; isFunction + (upcase(type)=:'FUNCTION'); isFormat + (upcase(type)=:'FORMAT'); - /* add the link to the functions' dataset, only for the first occurence */ + /* add the link to the functions' dataset, only for the first occurrence */ if 1 = isFunction and (upcase(type)=:'FUNCTION') then do; put "options APPEND=(cmplib = work.%lowcase(&packageName.fcmp));"; @@ -613,7 +613,7 @@ data _null_; put '%put NOTE:[CMPLIB] %sysfunc(getoption(cmplib));' /; end; - /* add the link to the formats' catalog, only for the first occurence */ + /* add the link to the formats' catalog, only for the first occurrence */ if 1 = isFormat and (upcase(type)=:'FORMAT') then do; put "options INSERT=( fmtsearch = work.%lowcase(&packageName.format) );"; @@ -935,7 +935,7 @@ data _null_; put ' set WORK._last_ end = EOFDS nobs = NOBS; '; put ' length memberX $ 1024; '; put ' memberX = cats("_",folder,".",file); '; - /* inner datastep in call execute to read each embedaded file */ + /* inner datastep in call execute to read each embedded file */ put ' call execute("data _null_; ");'; put ' call execute("infile package(" || strip(memberX) || ") end = EOF; ");'; put ' call execute(" printer = 0; ");'; @@ -1028,6 +1028,10 @@ TODO: - dodac typ "iml", "ds2", "proto" -lista wymaganych komponentow potrzebnych do dziaƂania SASa (na bazie proc SETINIT) [v] + +-sparwdzanie domknietosci, parzystosci i wystepowania tagow HELP START - HELP END w plikach [ ] + +-weryfikacja nadpisywania makr [ ] */ /* diff --git a/listpackages.sas b/listpackages.sas index 75ab797..7d5c9ee 100644 --- a/listpackages.sas +++ b/listpackages.sas @@ -2,7 +2,7 @@ /**############################################################################**/ /* */ -/* Copyright Bartosz Jablonski, Jully 2019. */ +/* Copyright Bartosz Jablonski, July 2019. */ /* */ /* Code is free and open source. If you want - you can use it. */ /* I tested it the best I could */ @@ -36,11 +36,11 @@ */ /**#############################################################################**/ -/* Macros to list SAS packages in packsges' folder */ +/* Macros to list SAS packages in packages' folder */ /* A SAS package is a zip file containing a group of SAS codes (macros, functions, datasteps generating data, etc.) wrapped up together and %INCLUDEed by - a single load.sas file (also embeaded inside the zip). + a single load.sas file (also embedded inside the zip). */ /* * Example 1: diff --git a/loadpackage.sas b/loadpackage.sas index 888f1b4..72219c2 100644 --- a/loadpackage.sas +++ b/loadpackage.sas @@ -2,7 +2,7 @@ /**############################################################################**/ /* */ -/* Copyright Bartosz Jablonski, Jully 2019. */ +/* Copyright Bartosz Jablonski, July 2019. */ /* */ /* Code is free and open source. If you want - you can use it. */ /* I tested it the best I could */ @@ -40,11 +40,11 @@ /* A SAS package is a zip file containing a group of SAS codes (macros, functions, datasteps generating data, etc.) wrapped up together and %INCLUDEed by - a single load.sas file (also embeaded inside the zip). + a single load.sas file (also embedded inside the zip). */ /* TODO: -- makro for testing avaliable packages in the packages' folder [DONE] checkuot: %listPackages() +- macro for testing available packages in the packages' folder [DONE] checkout: %listPackages() */ /*** HELP END ***/ @@ -198,12 +198,12 @@ TODO: /* * Filenames references "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; * Example 1: * assuming that _THIS_FILE_ and the SQLinDS package (sqlinds.zip file) * are located in the "C:/SAS_PACKAGES/" folder - * coppy the following code into autoexec.sas + * copy the following code into autoexec.sas * or run it in your SAS session **/ /* diff --git a/macroarray.zip b/macroarray.zip index 1e50b56..116d8dd 100644 Binary files a/macroarray.zip and b/macroarray.zip differ diff --git a/sqlinds.zip b/sqlinds.zip index 5c7ec36..6be70de 100644 Binary files a/sqlinds.zip and b/sqlinds.zip differ