SAS Packages Framework, version 20211111

**SAS Packages Framework**, version 20211111:

- The `packages` fileref can point to multiple directories now, e.g. `filename packages ("/dir/nr/one" "/dir/nr/two");`
- New macro `%extendPackagesFileref()` added,
- Help updated,

- Packages regenerated with new version of SPF:
   - DFA,
   - GSM,
   - MacroArray,
   - BasePlus,
   - dynMacroArray,
   - SQLinDS.
This commit is contained in:
yabwon
2021-11-10 20:21:07 +01:00
parent 98e822bde2
commit 7fa70d5ad4
17 changed files with 461 additions and 183 deletions

View File

@@ -8,7 +8,8 @@
* [the `listPackages` macro](#listpackages)
* [the `verifyPackage` macro](#verifypackage)
* [the `previewPackage` macro](#previewPackage)
* [the `generatePackage` macro](#generatepackage)
* [the `generatePackage` macro](#generatepackage)
* [the `extendPackagesFileref` macro](#extendpackagesfileref)
* [Some more examples](#some-more-examples)
---
@@ -20,7 +21,7 @@ A **SAS package** is an automatically generated, single, stand alone *zip* file
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 **`20210528`**.
In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20211111`**.
**To get started with SAS Packages** try this [**`Getting Started with SAS Packages`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf "Getting Started with SAS Packages") presentation (see the `./SPF/Documentation` directory).
@@ -38,7 +39,7 @@ After assigning the directory do not change them when using the SPF since it may
## This is short help information for the `installPackage` macro <a name="installpackage"></a>
--------------------------------------------------------------------------------------------
Macro to install SAS packages, version `20210528`
Macro to install SAS packages, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -48,6 +49,9 @@ After assigning the directory do not change them when using the SPF since it may
in the packages folder. The process of installation is equivalent with
manual downloading the package zip file into the packages folder.
In case the packages fileref is a multi-directory one the first directory
will be selected as a destination.
--------------------------------------------------------------------------------------------
### Parameters:
@@ -104,7 +108,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `helpPackage` macro <a name="helppackage"></a>
-------------------------------------------------------------------------------
Macro to get help about SAS packages, version `20210528`
Macro to get help about SAS packages, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -174,7 +178,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `loadPackage` macro <a name="loadpackage"></a>
-------------------------------------------------------------------------------
Macro to *load* SAS packages, version `20210528`
Macro to *load* SAS packages, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -247,7 +251,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `loadPackageS` macro <a name="loadpackages"></a>
-------------------------------------------------------------------------------
Macro wrapper for the loadPackage macro, version `20210528`
Macro wrapper for the loadPackage macro, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -296,7 +300,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `unloadPackage` macro <a name="unloadpackage"></a>
-------------------------------------------------------------------------------
Macro to unload SAS packages, version `20210528`
Macro to unload SAS packages, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -361,7 +365,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `listPackages` macro <a name="listpackages"></a>
-----------------------------------------------------------------------------------------
Macro to list available SAS packages, version `20210528`
Macro to list available SAS packages, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -402,7 +406,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `verifyPackage` macro <a name="verifypackage"></a>
-------------------------------------------------------------------------------
Macro to verify SAS package with it hash digest, version `20210528`
Macro to verify SAS package with it hash digest, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -455,7 +459,7 @@ filename packages "C:/SAS_PACKAGES"; %* set-up a directory for packages;
## This is short help information for the `previewPackage` macro <a name="previewpackage"></a>
-------------------------------------------------------------------------------
Macro to get previwe of a SAS packages, version `20210528`
Macro to get previwe of a SAS packages, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -522,7 +526,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `generatePackage` macro <a name="generatepackage"></a>
-------------------------------------------------------------------------------
Macro to generate SAS packages, version `20210528`
Macro to generate SAS packages, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -553,6 +557,8 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
- `packages=` Location of other packages for testing
if there are dependencies in loading the package.
Has to be a single directory, if more than one are
provided than only the first is used.
- `testResults=` Location where tests results should be stored,
if null (the default) then the session WORK is used.
@@ -693,6 +699,45 @@ All files have to have `.sas` extension. Other files are ignored.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------------------------------------------------------------------------------
## This is short help information for the `extendPackagesFileref` macro <a name="extendpackagesfileref"></a>
-----------------------------------------------------------------------------------------
Macro to list directories pointed by 'packages' fileref, version `20211111`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
data, etc.) wrapped up together and embedded inside the zip.
The `%extendPackagesFileref()` macro lists directories pointed by
the packages fileref. It allows to add new dierctories to packages folder list.
### Parameters:
1. `packages` *Optional.* A valid fileref name, when empty the "packages" is used
When used as: `%extendPackagesFileref(HELP)` it displays this help information.
------------------------------------------------------------------------------------------
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more.
### Example ###################################################################
Enabling the SAS Package Framework
from the local directory and adding
new directory.
Assume that the `SPFinit.sas` file
is located in one of "C:/SAS_PK1" or "C:/SAS_PK2" folders.
Run the following code in your SAS session:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
filename packages ("C:/SAS_PK1" "C:/SAS_PK2"); %* setup a directory for packages;
%include packages(SPFinit.sas); %* enable the framework;
filename packages ("D:/NEW_DIR" %extendPackagesFileref()); %* add new directory;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------------------------------------------------------------