diff --git a/README.md b/README.md
index a89265d..5df26e6 100644
--- a/README.md
+++ b/README.md
@@ -79,13 +79,13 @@ Currently the following packages are available (see the `./packages` directory):
set %SQL(select * from sashelp.class order by age);
run;
```
-SHA256 digest for SQLinDS: FCD7EE5B59E08CD1A2E31F6A5D94D7275C99AFFAACEA3D187F60A57CD0520FCD
+SHA256 digest for SQLinDS: 135DC50C0412B8CEAF6D5349B8A203C0ADB23D4F5C2680B6A35FD2E5482B6C49
[Documentation for SQLinDS](https://github.com/yabwon/SAS_PACKAGES/blob/master/packages/sqlinds.md "Documentation for SQLinDS")
- **DFA** (Dynamic Function Arrays)\[0.2\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples.
-SHA256 digest for DFA: CC19058354D4B51F0675A8414F18089CCC583AA45822CEFC79368F06D8715846
+SHA256 digest for DFA: E67A0863992722A5F535F56E14EF8D19A55F74FB374447BF11B5ED74029C29CB
- **macroArray**\[0.6\], implementation of an array concept in a macrolanguage, e.g.
@@ -107,7 +107,7 @@ SHA256 digest for DFA: CC19058354D4B51F0675A8414F18089CCC583AA45822CEFC79368F06D
which = 1:H:2
);
```
-SHA256 digest for macroArray: 022A7CD5F0C1E72032CC3426A8AC53D61A8766868B6B48195BC69F59007323B8
+SHA256 digest for macroArray: 42771AA7CD2A0608E1EE25F104F21CCCC296919910E4BCA7AD9AE46A291BB8D7
[Documentation for macroArray](https://github.com/yabwon/SAS_PACKAGES/blob/master/packages/macroarray.md "Documentation for macroArray")
@@ -126,12 +126,12 @@ format x bool.;
%put %getVars(sashelp.class, pattern = ght$, sep = +, varRange = _numeric_);
```
-SHA256 digest for BasePlus: 4E0C2A45CF8A5863C0D054568C712D10A296240877D604E77A778451A740874B
+SHA256 digest for BasePlus: BDEA8AA6EED9739284ABF8297BEC7EC0F12490D72EF9B685F477E99AFA734B82
[Documentation for BasePlus](https://github.com/yabwon/SAS_PACKAGES/blob/master/packages/baseplus.md "Documentation for BasePlus")
- **dynMacroArray**\[0.2\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA)
-SHA256 digest for dynMacroArray: 0854317DE7A97DCFE30411B37D909F04BBE12F1F9F7C45D39CBCD61641158F80
+SHA256 digest for dynMacroArray: 694AACE925B7F4E149C3B90383F56370ED76233D8F5040713D66C1F3A4E414FE
### ======
diff --git a/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf b/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf
index 3848f35..297f8c7 100644
Binary files a/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf and b/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf differ
diff --git a/SPF/Documentation/SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf b/SPF/Documentation/SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf
index 84b4c01..83f5f7b 100644
Binary files a/SPF/Documentation/SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf and b/SPF/Documentation/SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf differ
diff --git a/SPF/SPFinit.md b/SPF/SPFinit.md
index 77c6f5b..2831f64 100644
--- a/SPF/SPFinit.md
+++ b/SPF/SPFinit.md
@@ -1,32 +1,43 @@
-## This is short SAS PAckages Framework help information
+
+- [SAS PAckages Framework help](#helpinfo)
+ * [the `installPackage` macro](#installpackage)
+ * [the `helpPackage` macro](#helppackage)
+ * [the `loadPackage` macro](#loadpackage)
+ * [the `loadPackageS` macro](#loadpackages)
+ * [the `unloadPackage` macro](#unloadpackage)
+ * [the `listPackages` macro](#listpackages)
+ * [the `verifyPackage` macro](#verifypackage)
+ * [the `generatePackage` macro](#generatepackage)
+ * [Some more examples](#some-more-examples)
+
+---
+
+
+## This is short SAS PAckages Framework help information
A **SAS package** is an automatically generated, single, stand alone *zip* file containing organised and ordered code structures, created by the developer and extended with additional automatically generated "driving" files (i.e. description, metadata, load, unload, and help files).
The *purpose of a package* is to be a simple, and easy to access, code sharing medium, which will allow: on the one hand, to separate the code complex dependencies created by the developer from the user experience with the final product and, on the other hand, reduce developer's and user's unnecessary frustration related to a remote deployment process.
-In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20201014`**.
+In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20201018`**.
-To get started with SAS Packages try this [**`Getting Started with SAS Packages`**](https://github.com/yabwon/SAS_PACKAGES/blob/master/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf "Getting Started with SAS Packages") presentation (see the `./SPF/Documentation` directory).
+**To get started with SAS Packages** try this [**`Getting Started with SAS Packages`**](https://github.com/yabwon/SAS_PACKAGES/blob/master/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf "Getting Started with SAS Packages") presentation (see the `./SPF/Documentation` directory).
-The documentation and more advance reading would be the [**`SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf`**](https://github.com/yabwon/SAS_PACKAGES/blob/master/SPF/Documentation/SAS(r)%20packages%20-%20the%20way%20to%20share%20(a%20how%20to)-%20Paper%204725-2020%20-%20extended.pdf "SAS packages - the way to share") article (see the `./SPF/Documentation` directory).
+**The documentation and more advance reading** would be the [**`SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf`**](https://github.com/yabwon/SAS_PACKAGES/blob/master/SPF/Documentation/SAS(r)%20packages%20-%20the%20way%20to%20share%20(a%20how%20to)-%20Paper%204725-2020%20-%20extended.pdf "SAS packages - the way to share") article (see the `./SPF/Documentation` directory).
*Note:* Filenames references `packages` and `package` are reserved keywords.
-The first one should be used to point local folder with packages.
+The first one should be used to point local folder with packages and the framework.
The second is used internally by macros.
-Do not use them otherwise than, e.g.
-
-`filename packages "C:/SAS_PACKAGES";`
-
-since it may affect stability of the framework.
+After assigning the directory do not change them when using the SPF since it may affect stability of the framework.
--------------------------------------------------------------------------------------------
-## This is short help information for the `installPackage` macro
+## This is short help information for the `installPackage` macro
--------------------------------------------------------------------------------------------
- Macro to install SAS packages, version `20201010`
+ Macro to install SAS packages, version `20201018`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -48,12 +59,9 @@ since it may affect stability of the framework.
If the package name is *SPFinit* or *SASPackagesFramework*
then the framework itself is downloaded.
- - `sourcePath=` Location of the package, e.g. "www.some.web.page/"
- Mind the "/" at the end of the path!
- Current default location for packages is:
- `https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/master/packages/`
- Current default location for the framework is:
- `https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/master/SPF/`
+ - `sourcePath=` Location of the package, e.g. "www.some.web.page/" (mind the "/" at the end of the path!)
+ Current default location for packages is:
`https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/master/packages/`
+ Current default location for the framework is:
`https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/master/SPF/`
- `replace=` With default value of `1` it causes existing package file
to be replaceed by new downloaded file.
@@ -83,10 +91,10 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-## This is short help information for the `helpPackage` macro
+## This is short help information for the `helpPackage` macro
-------------------------------------------------------------------------------
- Macro to get help about SAS packages, version `20201010`
+ Macro to get help about SAS packages, version `20201018`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -153,10 +161,10 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-## This is short help information for the `loadPackage` macro
+## This is short help information for the `loadPackage` macro
-------------------------------------------------------------------------------
- Macro to *load* SAS packages, version `20201010`
+ Macro to *load* SAS packages, version `20201018`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -226,10 +234,10 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-## This is short help information for the `loadPackageS` macro
+## This is short help information for the `loadPackageS` macro
-------------------------------------------------------------------------------
- Macro wrapper for the loadPackage macro, version `20201010`
+ Macro wrapper for the loadPackage macro, version `20201018`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -275,10 +283,10 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
-## This is short help information for the `unloadPackage` macro
+## This is short help information for the `unloadPackage` macro
-------------------------------------------------------------------------------
- Macro to unload SAS packages, version `20201010`
+ Macro to unload SAS packages, version `20201018`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -340,10 +348,10 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-## This is short help information for the `listPackages` macro
+## This is short help information for the `listPackages` macro
-----------------------------------------------------------------------------------------
- Macro to list available SAS packages, version `20201010`
+ Macro to list available SAS packages, version `20201018`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -381,10 +389,10 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-### This is short help information for the `verifyPackage` macro
+## This is short help information for the `verifyPackage` macro
-------------------------------------------------------------------------------
- Macro to verify SAS package with it hash digest, version `20201010`
+ Macro to verify SAS package with it hash digest, version `20201018`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -434,10 +442,10 @@ filename packages "C:/SAS_PACKAGES"; %* set-up a directory for packages;
hash=HDA478ANJ3HKHRY327FGE88HF89VH89HFFFV73GCV98RF390VB4)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-## This is short help information for the `generatePackage` macro
+## This is short help information for the `generatePackage` macro
-------------------------------------------------------------------------------
- Macro to generate SAS packages, version `20201010`
+ Macro to generate SAS packages, version `20201018`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -467,6 +475,9 @@ filename packages "C:/SAS_PACKAGES"; %* set-up a directory for packages;
- `packages=` Location of other packages for testing
if there are dependencies in loading the package.
+- `testResults=` Location where tests results should be stored,
+ if null (the default) then the session WORK is used.
+
-------------------------------------------------------------------------------
Locate all files with code in base folder, i.e. at `filesLocation` directory.
@@ -588,7 +599,7 @@ The "tree structure" of the folder could be for example as follows:
-------------------------------------------------------------------------------
-## Some more examples #############################################################
+## Some more examples #############################################################
### Example 1. ###################################################################
Enabling the SAS Package Framework
diff --git a/SPF/SPFinit.sas b/SPF/SPFinit.sas
index 9ca10d1..d887758 100644
--- a/SPF/SPFinit.sas
+++ b/SPF/SPFinit.sas
@@ -42,7 +42,7 @@
- to unload, or
- to generate SAS packages.
- Version 20201014.
+ Version 20201018.
See examples below.
A SAS package is a zip file containing a group of files
@@ -81,7 +81,7 @@
*/
)/secure
/*** HELP END ***/
-des = 'Macro to load SAS package, version 20201014. Run %loadPackage() for help info.'
+des = 'Macro to load SAS package, version 20201018. Run %loadPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -96,7 +96,7 @@ des = 'Macro to load SAS package, version 20201014. Run %loadPackage() for help
%put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
- %put # Macro to *load* SAS packages, version `20201014` #;
+ %put # Macro to *load* SAS packages, version `20201018` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -250,7 +250,7 @@ des = 'Macro to load SAS package, version 20201014. Run %loadPackage() for help
*/
)/secure
/*** HELP END ***/
-des = 'Macro to unload SAS package, version 20201014. Run %unloadPackage() for help info.'
+des = 'Macro to unload SAS package, version 20201018. Run %unloadPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -265,7 +265,7 @@ des = 'Macro to unload SAS package, version 20201014. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
- %put # Macro to unload SAS packages, version `20201014` #;
+ %put # Macro to unload SAS packages, version `20201018` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -388,7 +388,7 @@ des = 'Macro to unload SAS package, version 20201014. Run %unloadPackage() for h
*/
)/secure
/*** HELP END ***/
-des = 'Macro to get help about SAS package, version 20201014. Run %helpPackage() for help info.'
+des = 'Macro to get help about SAS package, version 20201018. Run %helpPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -403,7 +403,7 @@ des = 'Macro to get help about SAS package, version 20201014. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
- %put # Macro to get help about SAS packages, version `20201014` #;
+ %put # Macro to get help about SAS packages, version `20201018` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -512,7 +512,7 @@ TODO:
- add MD5(&packageName.) value hash instead "package" word in filenames [DONE]
*/
-/* Macros to install SAS packages, version 20201014 */
+/* Macros to install SAS packages, version 20201018 */
/* A SAS package is a zip file containing a group of files
with SAS code (macros, functions, data steps generating
data, etc.) wrapped up together and %INCLUDEed by
@@ -528,7 +528,7 @@ TODO:
/secure
minoperator
/*** HELP END ***/
-des = 'Macro to install SAS package, version 20201014. Run %%installPackage() for help info.'
+des = 'Macro to install SAS package, version 20201018. Run %%installPackage() for help info.'
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do;
@@ -543,7 +543,7 @@ des = 'Macro to install SAS package, version 20201014. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;;
%put # #;
- %put # Macro to install SAS packages, version `20201014` #;
+ %put # Macro to install SAS packages, version `20201018` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -836,7 +836,7 @@ des = 'Macro to install SAS package, version 20201014. Run %%installPackage() fo
/* Macro to list SAS packages in packages folder.
- Version 20201014
+ Version 20201018
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -856,7 +856,7 @@ des = 'Macro to install SAS package, version 20201014. Run %%installPackage() fo
%macro listPackages()/PARMBUFF
-des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20201014.'
+des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20201018.'
;
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
%do;
@@ -871,7 +871,7 @@ des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HE
%put ### This is short help information for the `listPackages` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
- %put # Macro to list available SAS packages, version `20201014` #;
+ %put # Macro to list available SAS packages, version `20201018` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1002,7 +1002,7 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
/* Macro to generate SAS packages.
- Version 20201014
+ Version 20201018
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1023,10 +1023,11 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
default value Y means "execute tests" */
,packages= /* location of other packages if there are
dependencies in loading */
-)/secure
+,testResults= /* location where tests results should be stored,
+ if null (the default) the WORK is used */
+)/secure minoperator
/*** HELP END ***/
-des = 'Macro to generate SAS packages, version 20201014. Run %generatePackage() for help info.'
-minoperator
+des = 'Macro to generate SAS packages, version 20201018. Run %generatePackage() for help info.'
;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do;
@@ -1041,7 +1042,7 @@ minoperator
%put ### This is short help information for the `generatePackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
- %put # Macro to generate SAS packages, version `20201014` #;
+ %put # Macro to generate SAS packages, version `20201018` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1071,6 +1072,9 @@ minoperator
%put # - `packages=` Location of other packages for testing #;
%put # if there are dependencies in loading the package. #;
%put # #;
+ %put # - `testResults=` Location where tests results should be stored, #;
+ %put # if null (the default) then the session WORK is used. #;
+ %put # #;
%put #-------------------------------------------------------------------------------#;
%put #################################################################################;
%put ;
@@ -1931,7 +1935,7 @@ data _null_;
put "filename &_PackageFileref_. list;" /;
put ' %put NOTE- ;';
- put ' %put NOTE: ' @; put "Lazy data for package &packageName., version &packageVersion., license &packageLicense.; ";
+ put ' %put NOTE: ' @; put "Data for package &packageName., version &packageVersion., license &packageLicense.; ";
put ' %put NOTE: ' @; put "*** &packageTitle. ***; ";
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Author(s): &packageAuthor.; ";
@@ -1956,12 +1960,21 @@ data _null_;
put ' call execute(''%nrstr(%include' " &_PackageFileref_.(_" folder +(-1) "." file +(-1) ') / nosource2;)'');';
put 'end;';
end;
+ /* use lazyData to reload data type */
+ if ( upcase(type) =: 'DATA' ) then
+ do;
+ put 'if findw(lazyData, "' fileshort +(-1) '") then';
+ put 'do;';
+ put ' put "NOTE- Dataset ' fileshort 'from the file ""' file +(-1) '"" will be loaded";';
+ put ' call execute(''%nrstr(%include' " &_PackageFileref_.(_" folder +(-1) "." file +(-1) ') / nosource2;)'');';
+ put 'end;';
+ end;
end;
put 'run;';
put '%put NOTE- ;';
- put '%put NOTE: '"Lazy data for package &packageName., version &packageVersion., license &packageLicense.;";
+ put '%put NOTE: '"Data for package &packageName., version &packageVersion., license &packageLicense.;";
put '%put NOTE- *** END ***;' /;
put "/* lazydata.sas end */" /;
stop;
@@ -2255,7 +2268,7 @@ data _null_;
set &filesWithCodes. end = EOFDS nobs = NOBS curobs = CUROBS;
if upcase(type) in: ('TEST') then continue; /* exclude tests */
- put 'put @5 "' CUROBS +(-1) ')" @10 "' type '" @21 "' fileshort '";';
+ put 'put @5 "' CUROBS +(-1) '." @10 "' type '" @21 "' fileshort '";';
end;
%if %bquote(&packageRequired.) ne %then
@@ -2280,7 +2293,7 @@ data _null_;
put ' end ; ';
%end;
- put 'put "***"; put "* SAS package generated by generatePackage, version 20201014 *"; put "***";';
+ put 'put "***"; put "* SAS package generated by generatePackage, version 20201018 *"; put "***";';
put 'run; ' /;
@@ -2317,8 +2330,8 @@ data _null_;
if upcase(type) in: ('TEST') then continue; /* exclude tests */
select;
- when (upcase(type) in ("DATA" "LAZYDATA")) fileshort2 = fileshort;
- when (upcase(type) = "MACRO" ) fileshort2 = cats('''%', fileshort, '()''');
+ when (upcase(type) in ("DATA" "LAZYDATA")) fileshort2 = cats("'", fileshort, "'" );
+ when (upcase(type) = "MACRO" ) fileshort2 = cats('''%', fileshort, "()'");
when (upcase(type) =: "FUNCTION" ) fileshort2 = cats("'", fileshort, "()'" );
when (upcase(type) =: "IMLMODULE" ) fileshort2 = cats("'", fileshort, "()'" );
when (upcase(type) =: "PROTO" ) fileshort2 = cats("'", fileshort, "()'" );
@@ -2342,29 +2355,31 @@ data _null_;
'put; put '' *> No help info found. Try %helpPackage(packageName,*) to display all.''; put; stop; ' /
'end; ';
put ' do until(EOFDS); ';
- put ' set WORK._last_ end = EOFDS nobs = NOBS; ';
- put ' length memberX $ 1024; ';
- put ' memberX = cats("_",folder,".",file); ';
+ put ' set WORK._last_ end = EOFDS nobs = NOBS; ';
+ put ' length memberX $ 1024; ';
+ put ' memberX = cats("_",folder,".",file); ';
/* inner data step in call execute to read each embedded file */
- put ' call execute("data _null_; ");';
- put " call execute('infile &_PackageFileref_.(' || strip(memberX) || ') end = EOF; ');";
- put ' call execute(" printer = 0; ");';
- put ' call execute(" do until(EOF); ");';
- put ' call execute(" input; ");';
- put ' call execute(" if upcase(strip(_infile_)) ';
- put ' = ''/*** HELP END ***/'' then printer = 0; ");';
- put ' call execute(" if printer then put ""| "" _infile_; ");';
- put ' call execute(" if upcase(strip(_infile_)) ';
- put ' = ''/*** HELP START ***/'' then printer = 1; ");';
- put ' call execute(" end; ");';
- put ' call execute(" put "" "" / "" ""; ");';
- put ' call execute(" stop; ");';
- put ' call execute("run; ");';
- put ' if lowcase(type) =: "data" then ';
- put ' do; ';
- put ' call execute("title ""Dataset " || strip(fileshort) || " from package &packageName. ""; ");';
- put ' call execute("proc contents data = " || strip(fileshort) || "; run; title; ");';
- put ' end; ';
+ put ' call execute("data _null_; ");';
+ put " call execute('infile &_PackageFileref_.(' || strip(memberX) || ') end = EOF; ');";
+ put ' call execute(" printer = 0; ");';
+ put ' call execute(" do until(EOF); ");';
+ put ' call execute(" input; ");';
+ put ' call execute(" if upcase(strip(_infile_)) ';
+ put ' = ''/*** HELP END ***/'' then printer = 0; ");';
+ put ' call execute(" if printer then put ""| "" _infile_; ");';
+ put ' call execute(" if upcase(strip(_infile_)) ';
+ put ' = ''/*** HELP START ***/'' then printer = 1; ");';
+ put ' call execute(" end; ");';
+ put ' call execute(" put "" "" / "" ""; ");';
+ put ' call execute(" stop; ");';
+ put ' call execute("run; ");';
+ put ' if lowcase(type) in ("data" "lazydata") then ';
+ put ' do; ';
+ put ' call execute("title ""Dataset " || strip(fileshort) || " from package &packageName. ""; ");';
+ put ' if exist(fileshort) then call execute("proc contents data = " || strip(fileshort) || "; run; ");';
+ put ' else call execute("data _null_; put ""| Dataset " || strip(fileshort) || " does not exist.""; run;");';
+ put ' call execute("title; ");';
+ put ' end; ';
/**/
put " end; ";
put " stop; ";
@@ -2486,13 +2501,25 @@ filename sasroot;
%let SASWORK=%sysfunc(GETOPTION(work));
%put *&SASWORK.*;
-options DLCREATEDIR; /* turns-on creation of subdirectories */
-/* temporary location for tests results */
-libname TEST "&SASWORK./test_%lowcase(%sysfunc(datetime(),b8601dt19.))";
-libname TESTWORK "%sysfunc(pathname(TEST))/work";
-%local dirForTest;
- %let dirForTest = %sysfunc(pathname(TEST));
-
+options DLCREATEDIR; /* turns-on creation of subdirectories by libname */
+/* temporary location for tests results is WORK unless developer provide &testResults. */
+%local testPackageTimesamp;
+%let testPackageTimesamp = %lowcase(&packageName._%sysfunc(datetime(),b8601dt15.));
+%if %qsysfunc(fileexist(%bquote(&testResults.))) %then
+ %do;
+ libname TEST "&testResults./test_&testPackageTimesamp.";
+ %end;
+%else
+ %do;
+ libname TEST "&SASWORK./test_&testPackageTimesamp.";
+ %end;
+/* test work points to the SAS session work */
+libname TESTWORK "&SASWORK./testwork_&testPackageTimesamp.";
+%local dirForTest dirForTestWork;
+ %let dirForTest = %sysfunc(pathname(TEST));
+ %let dirForTestWork = %sysfunc(pathname(TESTWORK));
+ %put &=dirForTest.;
+ %put &=dirForTestWork.;
/* remember location of sessions current directory */
filename currdir ".";
@@ -2514,6 +2541,12 @@ filename currdir list;
%put NOTE: changing current folder to:;
%put *%sysfunc(DLGCDIR(&dirForTest.))*;
+
+/* turn off the note about quoted string length */
+%local quotelenmax_tmp;
+%let quotelenmax_tmp = %sysfunc(getoption(quotelenmax));
+options NOquotelenmax;
+
/* the first test is for loading package, testing help and unloading */
/*-1-*/
data _null_;
@@ -2529,6 +2562,8 @@ data _null_;
/* load */
put '%loadpackage'"(&packageName.,";
put " path=&filesLocation.)" /;
+ put '%loadpackage'"(&packageName.,";
+ put " path=&filesLocation., lazyData=*)" /;
/* help */
put '%helpPackage'"(&packageName.,";
@@ -2552,6 +2587,8 @@ setup for testing session:
-work - location for work
-noterminal - for batch execution mode
-rsasuser - to avoid the "Unable to copy SASUSER registry to WORK registry." warning
+ -linesize - MAX
+ -pagesize - MAX
*/
systask kill sas0 wait;
%local sasstat0 TEST_0 TESTRC_0;;
@@ -2562,9 +2599,9 @@ systask command
-print ""&dirForTest./&TEST_0..lst""
-log ""&dirForTest./&TEST_0..log""
-config ""&SASROOT./sasv9.cfg""
- -work ""&dirForTest./work""
+ -work ""&dirForTestWork.""
-noterminal
- -rsasuser"
+ -rsasuser -linesize MAX -pagesize MAX"
taskname=sas0
status=sasstat0
WAIT
@@ -2639,7 +2676,9 @@ data _null_;
put '%include packages(loadpackage.sas);' /; /* for older versions when the SPFinit.sas did not exist */
put '%loadpackage'"(&packageName.,";
- put " path=&filesLocation.) " /;
+ put " path=&filesLocation.)" /;
+ put '%loadpackage'"(&packageName.,";
+ put " path=&filesLocation., lazyData=*)" /;
run;
%local t;
@@ -2652,7 +2691,7 @@ systask command
-print ""&dirForTest./&&TEST_&t...lst""
-log ""&dirForTest./&&TEST_&t...log""
-config ""&SASROOT./sasv9.cfg""
- -work ""&dirForTest./work""
+ -work ""&dirForTestWork.""
-autoexec ""&dirForTest./autoexec.sas""
-noterminal
-rsasuser"
@@ -2722,6 +2761,9 @@ title;
%put *%sysfunc(DLGCDIR(%sysfunc(pathname(currdir))))*;
filename CURRDIR clear;
+/* turn on the original value of the note about quoted string length */
+options "elenmax_tmp.;
+
/* if you do not want any test to be executed */
%NOTESTING:
@@ -2808,7 +2850,7 @@ TODO: (in Polish)
*/
)/secure
/*** HELP END ***/
-des = 'Macro to load multiple SAS packages at one run, version 20201014. Run %loadPackages() for help info.'
+des = 'Macro to load multiple SAS packages at one run, version 20201018. Run %loadPackages() for help info.'
parmbuff
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
@@ -2824,7 +2866,7 @@ parmbuff
%put ### This is short help information for the `loadPackageS` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
- %put # Macro wrapper for the loadPackage macro, version `20201014` #;
+ %put # Macro wrapper for the loadPackage macro, version `20201018` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -2908,7 +2950,7 @@ parmbuff
hashing_file() function, SAS 9.4M6 */
)/secure
/*** HELP END ***/
-des = 'Macro to verify SAS package with the hash digest, version 20201014. Run %verifyPackage() for help info.'
+des = 'Macro to verify SAS package with the hash digest, version 20201018. Run %verifyPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -2923,7 +2965,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20201014. Run %
%put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
- %put # Macro to verify SAS package with it hash digest, version `20201014` #;
+ %put # Macro to verify SAS package with it hash digest, version `20201018` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
diff --git a/packages/README.md b/packages/README.md
index fa33917..30808e7 100644
--- a/packages/README.md
+++ b/packages/README.md
@@ -18,7 +18,7 @@ data class;
WH = weight + height;
run;
```
-SHA256 digest for SQLinDS: FCD7EE5B59E08CD1A2E31F6A5D94D7275C99AFFAACEA3D187F60A57CD0520FCD
+SHA256 digest for SQLinDS: 135DC50C0412B8CEAF6D5349B8A203C0ADB23D4F5C2680B6A35FD2E5482B6C49
[Documentation for SQLinDS](https://github.com/yabwon/SAS_PACKAGES/blob/master/packages/sqlinds.md "Documentation for SQLinDS")
@@ -51,7 +51,7 @@ data _null_;
end;
run;
```
-SHA256 digest for DFA: CC19058354D4B51F0675A8414F18089CCC583AA45822CEFC79368F06D8715846
+SHA256 digest for DFA: E67A0863992722A5F535F56E14EF8D19A55F74FB374447BF11B5ED74029C29CB
---
@@ -74,7 +74,7 @@ SHA256 digest for DFA: CC19058354D4B51F0675A8414F18089CCC583AA45822CEFC79368F06D
which = 1:H:2
);
```
-SHA256 digest for macroArray: 022A7CD5F0C1E72032CC3426A8AC53D61A8766868B6B48195BC69F59007323B8
+SHA256 digest for macroArray: 42771AA7CD2A0608E1EE25F104F21CCCC296919910E4BCA7AD9AE46A291BB8D7
[Documentation for macroArray](https://github.com/yabwon/SAS_PACKAGES/blob/master/packages/macroarray.md "Documentation for macroArray")
@@ -94,7 +94,7 @@ format x bool.;
%put %getVars(sashelp.class, pattern = ght$, sep = +, varRange = _numeric_);
```
-SHA256 digest for BasePlus: 4E0C2A45CF8A5863C0D054568C712D10A296240877D604E77A778451A740874B
+SHA256 digest for BasePlus: BDEA8AA6EED9739284ABF8297BEC7EC0F12490D72EF9B685F477E99AFA734B82
[Documentation for BasePlus](https://github.com/yabwon/SAS_PACKAGES/blob/master/packages/baseplus.md "Documentation for BasePlus")
@@ -102,6 +102,6 @@ SHA256 digest for BasePlus: 4E0C2A45CF8A5863C0D054568C712D10A296240877D604E77A77
- **dynMacroArray**\[0.2\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA)
-SHA256 digest for dynMacroArray: 0854317DE7A97DCFE30411B37D909F04BBE12F1F9F7C45D39CBCD61641158F80
+SHA256 digest for dynMacroArray: 694AACE925B7F4E149C3B90383F56370ED76233D8F5040713D66C1F3A4E414FE
---
diff --git a/packages/SHA256_for_packages.txt b/packages/SHA256_for_packages.txt
index e5516a4..12fa74b 100644
--- a/packages/SHA256_for_packages.txt
+++ b/packages/SHA256_for_packages.txt
@@ -1,3 +1,10 @@
+/* 20201018 */
+BasePlus: BDEA8AA6EED9739284ABF8297BEC7EC0F12490D72EF9B685F477E99AFA734B82
+DFA: E67A0863992722A5F535F56E14EF8D19A55F74FB374447BF11B5ED74029C29CB
+dynMacroArray: 694AACE925B7F4E149C3B90383F56370ED76233D8F5040713D66C1F3A4E414FE
+macroArray: 42771AA7CD2A0608E1EE25F104F21CCCC296919910E4BCA7AD9AE46A291BB8D7
+SQLinDS: 135DC50C0412B8CEAF6D5349B8A203C0ADB23D4F5C2680B6A35FD2E5482B6C49
+
/* 20201017 */
macroArray: 022A7CD5F0C1E72032CC3426A8AC53D61A8766868B6B48195BC69F59007323B8
diff --git a/packages/baseplus.md b/packages/baseplus.md
index 70088b3..d894235 100644
--- a/packages/baseplus.md
+++ b/packages/baseplus.md
@@ -186,7 +186,7 @@ Package contains:
*SAS package generated by generatePackage, version 20201001*
The SHA256 hash digest for package BasePlus:
-`4E0C2A45CF8A5863C0D054568C712D10A296240877D604E77A778451A740874B`
+`BDEA8AA6EED9739284ABF8297BEC7EC0F12490D72EF9B685F477E99AFA734B82`
---
# Content description ############################################################################################
diff --git a/packages/baseplus.zip b/packages/baseplus.zip
index a708b8c..5264567 100644
Binary files a/packages/baseplus.zip and b/packages/baseplus.zip differ
diff --git a/packages/dfa.zip b/packages/dfa.zip
index 94a8309..825dc8f 100644
Binary files a/packages/dfa.zip and b/packages/dfa.zip differ
diff --git a/packages/dynmacroarray.zip b/packages/dynmacroarray.zip
index 6454344..3967caf 100644
Binary files a/packages/dynmacroarray.zip and b/packages/dynmacroarray.zip differ
diff --git a/packages/macroarray.md b/packages/macroarray.md
index 6357c5c..f48bb31 100644
--- a/packages/macroarray.md
+++ b/packages/macroarray.md
@@ -63,7 +63,7 @@ Required SAS Components:
*SAS package generated by generatePackage, version 20200911*
The SHA256 hash digest for package macroArray:
-`022A7CD5F0C1E72032CC3426A8AC53D61A8766868B6B48195BC69F59007323B8`
+`42771AA7CD2A0608E1EE25F104F21CCCC296919910E4BCA7AD9AE46A291BB8D7`
---
# Content description ############################################################################################
diff --git a/packages/macroarray.zip b/packages/macroarray.zip
index cf0a03f..a31c92a 100644
Binary files a/packages/macroarray.zip and b/packages/macroarray.zip differ
diff --git a/packages/sqlinds.md b/packages/sqlinds.md
index 1b45ab0..7aec467 100644
--- a/packages/sqlinds.md
+++ b/packages/sqlinds.md
@@ -49,7 +49,7 @@ Required SAS Components:
*SAS package generated by generatePackage, version 20200911*
The SHA256 hash digest for package SQLinDS:
-`FCD7EE5B59E08CD1A2E31F6A5D94D7275C99AFFAACEA3D187F60A57CD0520FCD`
+`135DC50C0412B8CEAF6D5349B8A203C0ADB23D4F5C2680B6A35FD2E5482B6C49`
---
# Content description ############################################################################################
diff --git a/packages/sqlinds.zip b/packages/sqlinds.zip
index 0edcf25..37f3a50 100644
Binary files a/packages/sqlinds.zip and b/packages/sqlinds.zip differ