mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2025-12-11 11:14:35 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a824b4d8b | ||
|
|
ba4b5f8c32 | ||
|
|
15e7d48adf | ||
|
|
a5b4f117cc | ||
|
|
b3ea02b7b0 | ||
|
|
e4dfc6a863 | ||
|
|
7d083e879c | ||
|
|
35e6ff8d5e | ||
|
|
5bd013c925 | ||
|
|
2ad317db01 | ||
|
|
6c38872ee2 | ||
|
|
d35ac328cc | ||
|
|
e3a813b257 | ||
|
|
67bd3abd58 | ||
|
|
1968330049 |
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 - 2022 Bartosz Jablonski
|
||||
Copyright (c) 2019 - 2022 Bartosz Jablonski
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
128
README.md
128
README.md
@@ -1,4 +1,4 @@
|
||||
# SAS_PACKAGES - a SAS Packages Framework and Repository
|
||||
# SAS_PACKAGES - a SAS Packages Framework
|
||||
|
||||
---
|
||||
|
||||
@@ -8,7 +8,13 @@ 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 **`20221001`**.
|
||||
In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages.
|
||||
|
||||
---
|
||||
|
||||
### Current version:
|
||||
|
||||
**The latest version** of SPF is **`20221121`**.
|
||||
|
||||
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).
|
||||
|
||||
@@ -16,13 +22,18 @@ The documentation and more advance reading would be the [**`SAS(r) packages - th
|
||||
|
||||
Short description of the SAS Packages Framework macros can be found [here](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md "Short description of the SAS Packages Framework macros")
|
||||
|
||||
**Videos** (the newer the better):
|
||||
### Recordings and Presentations:
|
||||
|
||||
- [SAS Global Forum 2020 V.E.](https://www.youtube.com/watch?v=qCkb-bx0Dv8&t=0s "SGF2020") (April 2020)
|
||||
- [Sasensei International Dojo](https://www.youtube.com/watch?v=BFhdUBQgjYQ&t=0s "SID no. 1") (April 2020)
|
||||
- [SAS dla Administratorów i Praktyków 2020](https://www.youtube.com/watch?v=mXuep2k48Z8&feature=youtu.be&t=0s "SASAiP2020") (October 2020, in Polish)
|
||||
- [Boston Area SAS Users Group webinar](https://www.basug.org/videos?wix-vod-video-id=78067e61413d43d3a6951974b3bc3014&wix-vod-comp-id=comp-klv807gt "BASUG") (November 2020)
|
||||
- [SAS Global Forum 2021 V.E.](https://www.youtube.com/watch?v=hqexaQtGw88 "SGF2021") (May 20th, 2021)
|
||||
Videos presenting the SPF and packages, from various conferences and meetups (the newer the better):
|
||||
|
||||
- ["SAS Packages: The Way to Share" - SAS Global Forum 2020 V.E.](https://www.youtube.com/watch?v=qCkb-bx0Dv8&t=0s "SGF2020") (April 2020, ~20 minutes, general overview but with a bit obsolete technical details)
|
||||
- ["SAS Packages: The Way to Share" - SaSensei International Dojo No. 1](https://www.youtube.com/watch?v=BFhdUBQgjYQ&t=0s "SID no. 1") (April 2020, ~28 minutes, general overview but with a bit obsolete technical details)
|
||||
- ["Co nowego z pakietami SAS?" - SAS dla Administratorów i Praktyków 2020](https://www.youtube.com/watch?v=mXuep2k48Z8&feature=youtu.be&t=0s "SASAiP2020") (October 2020, in Polish, ~41 minutes, general overview and technical details how to use SPF)
|
||||
- ["SAS Packages - The Way to Share" - Boston Area SAS Users Group webinar](https://www.basug.org/videos?wix-vod-video-id=78067e61413d43d3a6951974b3bc3014&wix-vod-comp-id=comp-klv807gt "BASUG") (November 2020, ~59 minutes, general overview and technical details how to use SPF)
|
||||
- ["My First SAS Package: A How-To" - SAS Global Forum 2021 V.E.](https://www.youtube.com/watch?v=hqexaQtGw88 "SGF2021") (May 20th 2021, ~59 minutes, technical workshop on how to create a package)
|
||||
- ["Kod SASowy ukryty na widoku" - SAS dla Administratorów i Praktyków 2021](https://www.youtube.com/watch?v=LtaWPe2sgRY&t=1s) (November 24th 2021, in Polish, ~34 minutes, technical presentation with details about the GSM package)
|
||||
- ["A BasePlus Package for SAS" - SAS Explore 2022](https://communities.sas.com/t5/SAS-Explore-Presentations/A-BasePlus-Package-for-SAS/ta-p/838246 "SASexplore2022 communities.sas.com") (September 27th-29th 2022, ~28 minutes, technical presentation with details about the BasePlus package), alternative video at YouTube is [here](https://www.youtube.com/watch?v=-Poxkx5WfOQ "SASexplore2022 TouTube")
|
||||
- ["SAS Packages - State of the Union" - SaSensei International Dojo No. 13](https://www.youtube.com/watch?v=1GEldZYQjj0&t=0s "SID no. 13") (November 10th 2022, ~50 minutes, general overview with the latest technical details)
|
||||
|
||||
---
|
||||
|
||||
@@ -33,53 +44,98 @@ A **SASware Ballot Idea** for adding *SAS Packages Framework* macros into Base S
|
||||
---
|
||||
|
||||
### The User:
|
||||
To use a package:
|
||||
- Create a folder for your packages, under Windows OS family, e.g. `C:/SAS_PACKAGES` or under Linux/UNIX OS family, e.g. `/home/<username>/SAS_PACKAGES`.
|
||||
|
||||
The first step to use a package with the SAS Packages Framework:
|
||||
|
||||
- Create a folder for your packages, under Windows OS family e.g., `C:/SAS_PACKAGES` or under Linux/UNIX OS family e.g., `/home/<username>/SAS_PACKAGES`.
|
||||
|
||||
and then either:
|
||||
|
||||
- Download the `SPFinit.sas` file (the SAS Packages Framework) into the local packages folder.
|
||||
- Manually download the `SPFinit.sas` file (the SAS Packages Framework) into the local packages folder.
|
||||
- \[Optional\] Manually download the `<packageName>.zip` file into the local packages folder.
|
||||
- and Execute:
|
||||
|
||||
```sas
|
||||
filename packages "<directory/containing/packages/>"; /* setup directory for packages */
|
||||
%include packages(SPFinit.sas); /* enable the framework */
|
||||
filename packages "<directory/containing/packages/>"; /* setup directory for packages */
|
||||
%include packages(SPFinit.sas); /* enable the framework */
|
||||
|
||||
/* %installPackage(packageName) */ /* install the package, unless you downloaded it manually */
|
||||
/* %installPackage(packageName) */ /* install the package, unless you downloaded it manually */
|
||||
|
||||
%helpPackage(packageName) /* get help about the package */
|
||||
%loadPackage(packageName) /* load the package content into the SAS session */
|
||||
%helpPackage(packageName) /* get help about the package */
|
||||
%loadPackage(packageName) /* load the package content into the SAS session */
|
||||
```
|
||||
|
||||
or if you need it just for "one time" only Execute:
|
||||
or if you need it just for "one time" only:
|
||||
|
||||
- Execute:
|
||||
|
||||
```sas
|
||||
filename packages "%sysfunc(pathname(work))"; /* setup temporary directory for packages in the WORK */
|
||||
filename packages "%sysfunc(pathname(work))"; /* setup WORK as temporary directory for packages */
|
||||
filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas";
|
||||
%include SPFinit; /* enable the framework */
|
||||
|
||||
%installPackage(packageName) /* install the package */
|
||||
%installPackage(packageName) /* install a package */
|
||||
%helpPackage(packageName) /* get help about the package */
|
||||
%loadPackage(packageName) /* load the package content into the SAS session */
|
||||
```
|
||||
|
||||
[**Workshop video for the User**](https://youtu.be/qX_-HJ76g8Y) \[May 6th, 2020\] [a bit outdated but gives the idea how it works]
|
||||
or do it pragmatically:
|
||||
|
||||
- Enable the framework [first time only]:
|
||||
|
||||
```sas
|
||||
filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas";
|
||||
%include SPFinit; /* enable the framework */
|
||||
```
|
||||
|
||||
- Install the framework on your machine in the folder you created:
|
||||
|
||||
```sas
|
||||
filename packages "<directory/containing/packages/>";
|
||||
%installPackage(SPFinit) /* install the framework */
|
||||
```
|
||||
|
||||
- And from now on run it like this:
|
||||
|
||||
```sas
|
||||
filename packages "<directory/containing/packages/>";
|
||||
%include packages(SPFinit.sas);
|
||||
|
||||
%installPackage(packageName) /* install a package */
|
||||
%helpPackage(packageName) /* get help about the package */
|
||||
%loadPackage(packageName) /* load the package content into the SAS session */
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
[**Workshop video for the User**](https://youtu.be/qX_-HJ76g8Y) \[May 6th, 2020\] [~86 minutes, a bit outdated (installPackage macro was not there yet) but gives the idea how it works especially load, help, unload, ICEload, and other details]
|
||||
|
||||
---
|
||||
|
||||
### The Developer:
|
||||
|
||||
To create your own package:
|
||||
|
||||
- Download (and use) the `SPFinit.sas` file (the SAS Packages Framework), the part of the framework required for *testing* is there too.
|
||||
|
||||
- See this ["Hello World" example tutorial.](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/HelloWorldPackage.md "Hello World")
|
||||
|
||||
- Read the [**`SAS Packages - The Way to Share (a How-To) - Paper 4725-2020 - extended version`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/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 to learn more details.
|
||||
|
||||
- Read the **`My First SAS Package: A How-To - Paper 1079-2021`** article available at communities.sas.com [**`here`**](https://communities.sas.com/t5/SAS-Global-Forum-Proceedings/My-First-SAS-Package-A-How-To/ta-p/726319 "My First SAS Package: A How-To") or locally [**`here`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/Paper_1079-2021/My%20First%20SAS%20Package%20-%20a%20How%20To.pdf "My First SAS Package: A How-To")
|
||||
- Download and use the `SPFinit.sas` file (the SAS Packages Framework), the part of the framework required for *testing* is there too.
|
||||
|
||||
The SAS Packages Framework [(short) documetation](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md) to quickly see macros options and parametera.
|
||||
|
||||
---
|
||||
|
||||
#### If you have any questions, suggestions, or ideas do not hesitate to contact me!
|
||||
### If you have any questions, suggestions, or ideas do not hesitate to contact me!
|
||||
|
||||
---
|
||||
|
||||
### Updates worth mentioning:
|
||||
|
||||
**Update**\[November 21st, 2022\]**:** ` %loadPackage()` **macro allows Cherry Picking of content (see [here]())**.
|
||||
|
||||
**Update**\[September 30th, 2022\]**:** **New dedicated repository:** *SASPAC - the SAS Packages Archive* **is available as new location for packages storage**. Location of SASPAC is: [`https://github.com/SASPAC`](https://github.com/SASPAC)
|
||||
|
||||
**Update**\[November 11th, 2021\]**:** `%extendPackagesFileref()` **macro is available**.
|
||||
@@ -108,19 +164,19 @@ If you find the SPF useful **share info** about it or **give it a [star](https:/
|
||||
|
||||
## Available packages:
|
||||
|
||||
For "backward compatibility"/historical point of view the following packages are available under the `./packages` directory.
|
||||
**(!)** For "backward compatibility"/historical point of view the following packages are available under the `./packages` directory.
|
||||
|
||||
Since *September 2022* the default location for packages is **SASPAC - the SAS Packages Archive** located under: [`https://github.com/SASPAC`](https://github.com/SASPAC) where each package is stored as a separate repository with historical versions too.
|
||||
**(!)** Since *September 2022* the default location for packages is **SASPAC - the SAS Packages Archive** located under: [`https://github.com/SASPAC`](https://github.com/SASPAC) where each package is stored as a separate repository with historical versions too.
|
||||
|
||||
Packages:
|
||||
|
||||
- **SQLinDS**\[2.2\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
|
||||
- **SQLinDS**\[2.2.2\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
|
||||
```sas
|
||||
data class;
|
||||
set %SQL(select * from sashelp.class order by age);
|
||||
run;
|
||||
```
|
||||
SHA256 digest for SQLinDS: 96D0EFE02DF1AE0D7D875A10CAF7EF63CDEF85DD0CF9418934BEFAF0C067D453
|
||||
SHA256 digest for SQLinDS: 085F0B8BD4A59343E2913FF9635EA6E551ADD54E9678C35F5096D4A0A895B9C5
|
||||
|
||||
[Documentation for SQLinDS](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/sqlinds.md "Documentation for SQLinDS")
|
||||
|
||||
@@ -130,13 +186,13 @@ SHA256 digest for MacroCore: A23C29529F3CE7D0C8BEE9545C5D22D5B5594907547374A5135
|
||||
|
||||
[Documentation for MacroCore](https://core.sasjs.io "Documentation for MacroCore")
|
||||
|
||||
- **DFA** (Dynamic Function Arrays)\[0.5\], 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.
|
||||
- **DFA** (Dynamic Function Arrays)\[0.5.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: 5BFFCE78439E1CDDCBB15C95CD287AA4195BF64BB17DDB8FE374EC3535B4F491
|
||||
SHA256 digest for DFA: 3F618EDAC8B4F4BE6C19D606E6BCC58121A16BA1383D2EE64C680B4B7FA9C96A
|
||||
|
||||
[Documentation for DFA](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/dfa.md "Documentation for DFA")
|
||||
|
||||
- **macroArray**\[1.0\], implementation of an array concept in a macrolanguage, e.g.
|
||||
- **macroArray**\[1.0.2\], implementation of an array concept in a macrolanguage, e.g.
|
||||
```sas
|
||||
%array(ABC[17] (111:127), macarray=Y);
|
||||
|
||||
@@ -155,12 +211,12 @@ SHA256 digest for DFA: 5BFFCE78439E1CDDCBB15C95CD287AA4195BF64BB17DDB8FE374EC353
|
||||
which = 1:H:2
|
||||
);
|
||||
```
|
||||
SHA256 digest for macroArray: ED12BC96F8A4E9E7C4D651EC1E15479DB9B55D98B274B63C507ED842081F7AB7
|
||||
SHA256 digest for macroArray: DA57FFE85F49201FD61A53411D19E97FB5A6AC3C34E34FDF4B913545699551FF
|
||||
|
||||
[Documentation for macroArray](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/macroarray.md "Documentation for macroArray")
|
||||
|
||||
|
||||
- **BasePlus**\[1.17\] adds a bunch of functionalities I am missing in BASE SAS, such as:
|
||||
- **BasePlus**\[1.17.2\] adds a bunch of functionalities I am missing in BASE SAS, such as:
|
||||
```sas
|
||||
call arrMissToRight(myArray);
|
||||
call arrFillMiss(17, myArray);
|
||||
@@ -178,21 +234,21 @@ format x bool.;
|
||||
|
||||
%zipLibrary(sashelp,libOut=work)
|
||||
```
|
||||
SHA256 digest for BasePlus: 56B260350FEB7D5118F581B9EFD1B9CE1F0298DCB9A4C000A7654E2FF3F0298C
|
||||
SHA256 digest for BasePlus: EBA9EDB3D50D854288970CC0E965DA6AD5B057F6E6433EEBEC4A02B9A25CF6E2
|
||||
|
||||
[Documentation for BasePlus](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md "Documentation for BasePlus")
|
||||
|
||||
- **GSM** (Generate Secure Macros)\[0.20\], package allows
|
||||
- **GSM** (Generate Secure Macros)\[0.20.2\], package allows
|
||||
to create secured macros stored in SAS Proc FCMP functions.
|
||||
The dataset with functions can be shared between different operating systems
|
||||
and allows to generate macros on site without showing their code.
|
||||
|
||||
SHA256 digest for GSM: 2AEBC150FBA99A4AAB0265A21C57E89200BFD96B633B898F32743D1C8831A159
|
||||
SHA256 digest for GSM: E47C94B536B661DEE390F5C3EA1684DD1A246106F4FBBDAFA57F5E34D4BB16D5
|
||||
|
||||
[Documentation for GSM](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/gsm.md "Documentation for GSM")
|
||||
|
||||
- **dynMacroArray**\[0.2\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA). Development of this package is currently on hold.
|
||||
- **dynMacroArray**\[0.2.2\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA). Development of this package is currently on hold.
|
||||
|
||||
SHA256 digest for dynMacroArray: D7E0B8F85C05EBF8622204E0D2F3E990D48D0A9B3911051C3AD44DC98954DDCF
|
||||
SHA256 digest for dynMacroArray: DD0BF1768DA05EBB5F8C6E7409A0929E28DF11CB499F75B433D9648855AACAE4
|
||||
|
||||
### ======
|
||||
|
||||
Binary file not shown.
147
SPF/Documentation/HelloWorldPackage.md
Normal file
147
SPF/Documentation/HelloWorldPackage.md
Normal file
@@ -0,0 +1,147 @@
|
||||
|
||||
## The "Hello World" Package
|
||||
|
||||
---
|
||||
|
||||
This is a "Hello World" example on how to build your first package with help of the SAS Packages Framework.
|
||||
|
||||
We will generate a `HelloWorld` package.
|
||||
|
||||
Follow the step by step instruction below.
|
||||
|
||||
---
|
||||
|
||||
`Step 1.` Create a folder for the framework e.g.,
|
||||
`/home/<myUserName>/SASpackages` or `C:/SASpackages`
|
||||
|
||||
`Step 2.` Run the following code to install The SAS Packages Framework
|
||||
in the folder you created in the `Step 1.`
|
||||
|
||||
```sas
|
||||
filename packages "<put/folder/from/the/step/one/here>";
|
||||
filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas";
|
||||
%include SPFinit;
|
||||
%installPackage(SPFinit)
|
||||
```
|
||||
|
||||
Check out the *log* to verify if the `Step 2.` was successful.
|
||||
If it was - then continue.
|
||||
|
||||
|
||||
`Step 3.` Create a folder for the content of the package we will generate e.g.,
|
||||
`/home/<myUserName>/HelloWorldPackage` or `C:/HelloWorldPackage`
|
||||
|
||||
`Step 4.` Inside the directory from the `Step 3.` create two sub-folders: `01_formats`
|
||||
and `02_macros`. Remember to use *lower case letters* only!
|
||||
|
||||
`Step 5.` Inside the `01_formats` folder create a `helloworldformat.sas` file.
|
||||
Remember to use lower case letters in the file name. Copy-paste below code
|
||||
into that file:
|
||||
|
||||
```sas
|
||||
/*** HELP START ***//*
|
||||
This is a help info for the HelloWorldFormat. format
|
||||
*//*** HELP END ***/
|
||||
|
||||
value HelloWorldFormat
|
||||
1 = " Hello"
|
||||
2 = " SAS"
|
||||
3 = " Packages"
|
||||
4 = " World"
|
||||
other = "!"
|
||||
;
|
||||
```
|
||||
|
||||
`Step 6.` Inside the `02_macros` folder create a `helloworldmacro.sas` file.
|
||||
Remember to use lower case letters in the file name. Copy-paste below code
|
||||
into that file:
|
||||
```sas
|
||||
/*** HELP START ***//*
|
||||
This is a help info for the helloWorldMacro() macro
|
||||
*//*** HELP END ***/
|
||||
|
||||
%macro HelloWorldMacro(n);
|
||||
data _null_;
|
||||
do i = 1 to &n.;
|
||||
put i HelloWorldFormat. @;
|
||||
end;
|
||||
run;
|
||||
%mend HelloWorldMacro;
|
||||
```
|
||||
|
||||
|
||||
`Step 7.` Inside the directory from the `Step 3.` create a `description.sas` file.
|
||||
Remember to use lower case letters in the file name. Copy-paste below text
|
||||
into that file, adjust lines 5 and 6:
|
||||
```txt
|
||||
Type: Package
|
||||
Package: helloWorld
|
||||
Title: My Hello World SAS package.
|
||||
Version: 1.0
|
||||
Author: <myFirstname> <myLastname> (my@mail.com)
|
||||
Maintainer: <myFirstname> <myLastname> (my@mail.com)
|
||||
License: MIT
|
||||
Encoding: UTF8
|
||||
|
||||
Required: "Base SAS Software"
|
||||
|
||||
DESCRIPTION START:
|
||||
## My "Hello World" SAS package ##
|
||||
|
||||
The "Hello World" is my first SAS package and
|
||||
for sure it will not be the last package one!
|
||||
DESCRIPTION END:
|
||||
```
|
||||
|
||||
`Step 8.` Execute the following code and check the log
|
||||
to read the `%generatePackage()` macro help info.
|
||||
|
||||
```sas
|
||||
%generatePackage()
|
||||
```
|
||||
|
||||
`Step 9.` Execute the following code using the folder
|
||||
from the `Step 3.` and check the log to see how
|
||||
the process of package generation went.
|
||||
|
||||
```sas
|
||||
%generatePackage(
|
||||
filesLocation=<put/folder/from/the/step/three/here>
|
||||
)
|
||||
```
|
||||
|
||||
`Step 10.` See the information in the output window and in the log.
|
||||
The `WARNING:[License] No license.sas file provided, default (MIT) licence file will be generated.` can be ignored.
|
||||
|
||||
`Step 11.` Check the directory from the `Step 3.` and look for the `helloworld.zip` package file.
|
||||
|
||||
---
|
||||
|
||||
`Step 12.` Start a new SAS session, run the following code, and investigate the log:
|
||||
|
||||
```sas
|
||||
filename packages ("<put/folder/from/the/step/one/here>" "<put/folder/from/the/step/three/here>");
|
||||
%include packages(SPFinit.sas);
|
||||
|
||||
%loadPackage(HelloWorld)
|
||||
|
||||
%HelloWorldMacro(7)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Congratulations!! You've just created your first HelloWorld package.
|
||||
|
||||
Now you are ready to do smome more advanced work.
|
||||
|
||||
- Read the **`My First SAS Package: A How-To - Paper 1079-2021`** article, available at communities.sas.com [**`here`**](https://communities.sas.com/t5/SAS-Global-Forum-Proceedings/My-First-SAS-Package-A-How-To/ta-p/726319 "My First SAS Package: A How-To + Video") (video included) or locally [**`here`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/Paper_1079-2021/My%20First%20SAS%20Package%20-%20a%20How%20To.pdf "My First SAS Package: A How-To"), describing the proces of a package creation with more advanced example and technical details.
|
||||
|
||||
- Go to "bare metal" and read the [**`SAS Packages - The Way to Share (a How-To) - Paper 4725-2020 - extended version`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/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") - an article which contains all technical details on how the SAS Packages Framework works and how to use it (both as a develope and as a user).
|
||||
|
||||
---
|
||||
|
||||
The SAS Packages Framework [(short) documetation](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md) to quickly see macros options and parametera.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
when empty the "packages" value is used */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to list directories pointed by "packages" fileref, version 20221001. Run %extendPackagesFileref(HELP) for help info.'
|
||||
des = 'Macro to list directories pointed by "packages" fileref, version 20221121. Run %extendPackagesFileref(HELP) for help info.'
|
||||
;
|
||||
|
||||
%if %QUPCASE(&packages.) = HELP %then
|
||||
@@ -22,7 +22,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20221001
|
||||
%put ### This is short help information for the `extendPackagesFileref` macro #;
|
||||
%put #-----------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to list directories pointed by 'packages' fileref, version `20221001` #;
|
||||
%put # Macro to list directories pointed by 'packages' fileref, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to get help about SAS package, version 20221001. Run %helpPackage() for help info.'
|
||||
des = 'Macro to get help about SAS package, version 20221121. Run %helpPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -39,7 +39,7 @@ des = 'Macro to get help about SAS package, version 20221001. Run %helpPackage()
|
||||
%put ### This is short help information for the `helpPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to get help about SAS packages, version `20221001` #;
|
||||
%put # Macro to get help about SAS packages, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -169,7 +169,7 @@ TODO:
|
||||
- add MD5(&packageName.) value hash instead "package" word in filenames [DONE]
|
||||
*/
|
||||
|
||||
/* Macros to install SAS packages, version 20221001 */
|
||||
/* Macros to install SAS packages, version 20221121 */
|
||||
/* 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
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/secure
|
||||
minoperator
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to install SAS package, version 20221001. Run %%installPackage() for help info.'
|
||||
des = 'Macro to install SAS package, version 20221121. Run %%installPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
|
||||
%do;
|
||||
@@ -29,7 +29,7 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
%put ### This is short help information for the `installPackage` macro #;
|
||||
%put #--------------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to install SAS packages, version `20221001` #;
|
||||
%put # Macro to install SAS packages, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -73,6 +73,8 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
%put # - `version=` Indicates which historical version of a package to install. #;
|
||||
%put # Historical version are available only if `mirror=0` is set. #;
|
||||
%put # Default value is null which means "install the latest". #;
|
||||
%put # When there are multiple packages to install version #;
|
||||
%put # is scan sequentially. #;
|
||||
%put # #;
|
||||
%put # - `replace=` With default value of `1` it causes existing package file #;
|
||||
%put # to be replaced by new downloaded file. #;
|
||||
@@ -108,6 +110,23 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
%put %nrstr( %%loadPackage(SQLinDS) %%* load the package content into the SAS session; );
|
||||
%put %nrstr( %%unloadPackage(SQLinDS) %%* unload the package content from the SAS session; );
|
||||
%put ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
|
||||
%put #### Example #################################################################################;
|
||||
%put # #;
|
||||
%put # Enabling the SAS Package Framework #;
|
||||
%put # from the local directory and installing & loading #;
|
||||
%put # the multiple packages from the Internet. #;
|
||||
%put # #;
|
||||
%put # Assume that the `SPFinit.sas` file #;
|
||||
%put # is located in the "C:/SAS_PACKAGES/" folder. #;
|
||||
%put # #;
|
||||
%put # Run the following code in your SAS session: #;
|
||||
%put ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas;
|
||||
%put %nrstr( filename packages "C:/SAS_PACKAGES"; );
|
||||
%put %nrstr( %%include packages(SPFinit.sas); );
|
||||
%put ;
|
||||
%put %nrstr( %%installPackage(baseplus(1.17) macroarray(1.0) dfa(0.5) GSM) );
|
||||
%put %nrstr( %%loadPackageS(GSM, baseplus(1.17), macroarray(1.0), dfa(0.5)) );
|
||||
%put ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
|
||||
%put ##############################################################################################;
|
||||
%put ;
|
||||
options &options_tmp.;
|
||||
@@ -134,8 +153,11 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
|
||||
/* in case the 'packages' fileref is multi-directory the first directory will be selected as a destination */
|
||||
data _null_;
|
||||
/* get the firstPackagesPath */
|
||||
call symputX("firstPackagesPath", dequote(kscanx(pathname("packages"), 1, "()", "QS")) ,"L");
|
||||
if "(" =: pathname("packages") then
|
||||
/* get the firstPackagesPath */
|
||||
call symputX("firstPackagesPath", dequote(kscanx(pathname("packages"), 1, "()", "QS")), "L");
|
||||
else
|
||||
call symputX("firstPackagesPath", pathname("packages"), "L");
|
||||
run;
|
||||
|
||||
%if %superq(sourcePath)= %then
|
||||
@@ -168,14 +190,51 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
%mirrorEnd:
|
||||
%put INFO: Source path is &sourcePath.;
|
||||
%end;
|
||||
%else
|
||||
%do;
|
||||
%let mirror=-1;
|
||||
%let SPFinitMirror = &sourcePath.SPFinit.sas;
|
||||
%end;
|
||||
|
||||
%local i;
|
||||
%local i str;
|
||||
/* standardise list of packages */
|
||||
%let str = %qsysfunc(compress(%superq(packagesNames),[{(. _)}],kad));
|
||||
%let str = %qsysfunc(translate(%superq(str),[[]],{()}));
|
||||
%let str = %qsysfunc(transtrn(%superq(str),],%str(] )));
|
||||
%let str = %qsysfunc(compbl(%superq(str)));
|
||||
%let str = %qsysfunc(transtrn(%superq(str),%str([ ),[));
|
||||
%let str = %qsysfunc(transtrn(%superq(str),%str( [),[));
|
||||
%let str = %qsysfunc(transtrn(%superq(str),%str( ]),]));
|
||||
%let str = %unquote(&str.);
|
||||
%let packagesNames = %qsysfunc(translate(%superq(str),(),[]));
|
||||
|
||||
%if %length("%sysfunc(compress(%superq(str),[,k))") NE %length("%sysfunc(compress(%superq(str),],k))") %then
|
||||
%do;
|
||||
%put ERROR: Syntax error in list of packages!;
|
||||
%put ERROR- %superq(packagesNames);
|
||||
%goto packagesListError;
|
||||
%end;
|
||||
|
||||
%put ;
|
||||
%put INFO: Calling: &packagesNames.;
|
||||
|
||||
%do i = 1 %to %sysfunc(countw(&packagesNames., , S));
|
||||
/*-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-*/
|
||||
%local packageName packageSubDir;
|
||||
%let packageName = %scan(&packagesNames., &i., , S);
|
||||
|
||||
%local packageName packageSubDir vers versA versB;
|
||||
%put ;
|
||||
/*%put ### %scan(&packagesNames., &i., , S) ###;*/
|
||||
%let packageName = %scan(%scan(&packagesNames., &i., , S),1,{[()]});
|
||||
%let versA = %scan(%scan(&packagesNames., &i., , S),2,{[()]});
|
||||
%let versB = %scan(&version., &i., , S);
|
||||
%let vers=;
|
||||
%if %superq(versB) ne %then %let vers = &versB.;
|
||||
%if %superq(versA) ne %then %let vers = &versA.;
|
||||
%if -1 = &mirror %then /* ignore version when direct path is provided */
|
||||
%do;
|
||||
%let vers=;
|
||||
%end;
|
||||
%put ### &packageName.(&vers.) ###;
|
||||
|
||||
%put *** %lowcase(&packageName.) start *****************************************;
|
||||
%local in out _IOFileref_;
|
||||
data _null_; call symputX("_IOFileref_", put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); run;
|
||||
@@ -188,6 +247,11 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
%if %upcase(&packageName.) in (SPFINIT SASPACKAGEFRAMEWORK SASPACKAGESFRAMEWORK) %then
|
||||
%do;
|
||||
/* allows to install/download the framework file like any other package */
|
||||
%if %superq(mirror) in (0 1) AND (%superq(vers) ne) %then
|
||||
%do;
|
||||
%let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/&vers./SPF/SPFinit.sas;
|
||||
%end;
|
||||
|
||||
filename &in URL
|
||||
"&SPFinitMirror."
|
||||
recfm=N lrecl=1;
|
||||
@@ -200,11 +264,11 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
%if 0 = %superq(mirror) %then
|
||||
%do;
|
||||
%let packageSubDir = %lowcase(&packageName.)/raw/main/;
|
||||
|
||||
%if %superq(version) ne %then
|
||||
|
||||
%if %superq(vers) ne %then
|
||||
%do;
|
||||
/*%let packageSubDir = %lowcase(&packageName.)/main/hist/&version./;*/
|
||||
%let packageSubDir = %lowcase(&packageName.)/raw/&version./;
|
||||
%let packageSubDir = %lowcase(&packageName.)/raw/&vers./;
|
||||
%end;
|
||||
%end;
|
||||
filename &in URL "&sourcePath.&packageSubDir.%lowcase(&packageName.).zip"
|
||||
@@ -281,6 +345,8 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
/*-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-*/
|
||||
%end;
|
||||
|
||||
%packagesListError:
|
||||
|
||||
options ls = &ls_tmp. ps = &ps_tmp.
|
||||
¬es_tmp. &source_tmp.
|
||||
&stimer_tmp. &fullstimer_tmp.
|
||||
@@ -392,7 +458,7 @@ des = 'Macro to install SAS package, version 20221001. Run %%installPackage() fo
|
||||
|
||||
/* Macro to list SAS packages in packages folder.
|
||||
|
||||
Version 20221001
|
||||
Version 20221121
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*+listPackages+*/
|
||||
|
||||
%macro listPackages()/secure PARMBUFF
|
||||
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20221001.'
|
||||
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20221121.'
|
||||
;
|
||||
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
|
||||
%do;
|
||||
@@ -16,7 +16,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 `20221001` #;
|
||||
%put # Macro to list available SAS packages, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -166,7 +166,7 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
|
||||
/* Macro to generate SAS packages.
|
||||
|
||||
Version 20221001
|
||||
Version 20221121
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
|
||||
@@ -25,9 +25,14 @@
|
||||
and use loadPackage in the form:
|
||||
%loadPackage(PiPackage, zip=disk, options=)
|
||||
*/
|
||||
, cherryPick=* /* space separated list of selected elements of the package
|
||||
to be loaded into the session, default value "*" means
|
||||
"load all elements of the package"
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load SAS package, version 20221001. Run %loadPackage() for help info.'
|
||||
des = 'Macro to load SAS package, version 20221121. Run %loadPackage() for help info.'
|
||||
minoperator
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -42,7 +47,7 @@ des = 'Macro to load SAS package, version 20221001. Run %loadPackage() for help
|
||||
%put ### This is short help information for the `loadPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to *load* SAS packages, version `20221001` #;
|
||||
%put # Macro to *load* SAS packages, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -74,24 +79,29 @@ des = 'Macro to load SAS package, version 20221001. Run %loadPackage() for help
|
||||
%put # package is provided in required version, #;
|
||||
%put # default value: `.` #;
|
||||
%put # #;
|
||||
%put # - `lazyData=` *Optional.* A list of names of lazy datasets to be #;
|
||||
%put # loaded. If not null datasets from the list are loaded #;
|
||||
%put # instead of the package. #;
|
||||
%put # - `lazyData=` *Optional.* A space separated list of names of lazy #;
|
||||
%put # datasets to be loaded. If not null datasets from the #;
|
||||
%put # list are loaded instead of the package. #;
|
||||
%put # An asterisk (*) means *load all lazy datasets*. #;
|
||||
%put # #;
|
||||
%put # - `zip=` Standard package is zip (lowcase), #;
|
||||
%put # - `zip=` *Optional.* Standard package is zip (lowcase), #;
|
||||
%put # e.g. `%nrstr(%%loadPackage(PiPackage))`. #;
|
||||
%put # If the zip is not available use a folder. #;
|
||||
%put # Unpack data to "pipackage.disk" folder #;
|
||||
%put # and use loadPackage in the following form: #;
|
||||
%put # `%nrstr(%%loadPackage(PiPackage, zip=disk, options=))` #;
|
||||
%put # #;
|
||||
%put # - `cherryPick=` *Optional.* A space separated list of selected elements #;
|
||||
%put # of the package to be loaded into the SAS session. #;
|
||||
%put # Default value of an asterisk (*) means: #;
|
||||
%put # "load all elements of the package". #;
|
||||
%put # #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
|
||||
%put # to learn more. #;
|
||||
%put # #;
|
||||
%put ### Example #####################################################################;
|
||||
%put ### Example 1 ###################################################################;
|
||||
%put # #;
|
||||
%put # Enabling the SAS Package Framework #;
|
||||
%put # from the local directory and installing & loading #;
|
||||
@@ -110,6 +120,25 @@ des = 'Macro to load SAS package, version 20221001. Run %loadPackage() for help
|
||||
%put %nrstr( %%loadPackage(SQLinDS) %%* load the package content into the SAS session; );
|
||||
%put %nrstr( %%unloadPackage(SQLinDS) %%* unload the package content from the SAS session; );
|
||||
%put ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
|
||||
%put # #;
|
||||
%put ### Example 2 ###################################################################;
|
||||
%put # #;
|
||||
%put # Enabling the SAS Package Framework #;
|
||||
%put # from the local directory and installing & cherry picking #;
|
||||
%put # elements of the BasePlus package. #;
|
||||
%put # #;
|
||||
%put # Assume that the `SPFinit.sas` file #;
|
||||
%put # is located in the "C:/SAS_PACKAGES/" folder. #;
|
||||
%put # #;
|
||||
%put # Run the following code in your SAS session: #;
|
||||
%put ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas;
|
||||
%put %nrstr( filename packages "C:/SAS_PACKAGES"; %%* setup a directory for packages; );
|
||||
%put %nrstr( %%include packages(SPFinit.sas); %%* enable the framework; );
|
||||
%put ;
|
||||
%put %nrstr( %%installPackage(BasePlus) %%* install the package from the Internet; );
|
||||
%put %nrstr( %%loadPackage(BasePlus, cherryPick=getVars) %%* cherry pick the content; );
|
||||
%put ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
|
||||
%put # #;
|
||||
%put #################################################################################;
|
||||
%put ;
|
||||
options &options_tmp.;
|
||||
@@ -144,6 +173,19 @@ des = 'Macro to load SAS package, version 20221001. Run %loadPackage() for help
|
||||
end;
|
||||
if exists then call symputx("path", p, "L");
|
||||
run;
|
||||
|
||||
/* convert cherryPick to lower case if needed */
|
||||
%if NOT (%str(*) = %superq(cherryPick)) %then
|
||||
%do;
|
||||
data _null_;
|
||||
call symputX("cherryPick",lowcase(compbl(compress(symget("cherryPick"),". _","KDA"))),"L");
|
||||
run;
|
||||
%end;
|
||||
/* empty list is equivalent to "*" */
|
||||
%if %superq(cherryPick)= %then
|
||||
%do;
|
||||
%let cherryPick=*;
|
||||
%end;
|
||||
|
||||
filename &_PackageFileref_. &ZIP.
|
||||
/* put location of package myPackageFile.zip here */
|
||||
@@ -184,7 +226,11 @@ des = 'Macro to load SAS package, version 20221001. Run %loadPackage() for help
|
||||
;
|
||||
%if %bquote(&lazyData.) = %then
|
||||
%do;
|
||||
%local tempLoad_minoperator;
|
||||
%let tempLoad_minoperator = %sysfunc(getoption(minoperator));
|
||||
options minoperator; /* MinOperator option is required for cherryPicking to work */
|
||||
%include &_PackageFileref_.(load.sas) / &source2.;
|
||||
options &tempLoad_minoperator.;
|
||||
%end;
|
||||
%else
|
||||
%do;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load multiple SAS packages at one run, version 20221001. Run %loadPackages() for help info.'
|
||||
des = 'Macro to load multiple SAS packages at one run, version 20221121. Run %loadPackages() for help info.'
|
||||
parmbuff
|
||||
;
|
||||
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
|
||||
@@ -27,7 +27,7 @@ parmbuff
|
||||
%put ### This is short help information for the `loadPackageS` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro wrapper for the loadPackage macro, version `20221001` #;
|
||||
%put # Macro wrapper for the loadPackage macro, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -76,18 +76,28 @@ parmbuff
|
||||
%GOTO ENDofloadPackageS;
|
||||
%end;
|
||||
|
||||
%local lengthOfsyspbuff numberOfPackagesNames i packageElement packageName packageVersion;
|
||||
%local lengthOfsyspbuff numberOfPackagesNames i packageElement packageName packageVersion str;
|
||||
|
||||
%let lengthOfsyspbuff = %qsysfunc(length(&syspbuff.));
|
||||
%let packagesNames = %qsysfunc(compress(%qsubstr(&syspbuff., 2, %eval(&lengthOfsyspbuff.-2)), %str((._,)), KDA));
|
||||
%let numberOfPackagesNames = %qsysfunc(countw(&packagesNames., %str(,)));
|
||||
%let packagesNames = %qsysfunc(compress(%qsubstr(&syspbuff., 2, %eval(&lengthOfsyspbuff.-2)), {[(. _,)]}, KDA));
|
||||
|
||||
%let str = %qsysfunc(translate(%superq(packagesNames),[[ ]],{(,)}));
|
||||
%let str = %qsysfunc(transtrn(%superq(str),],%str(] )));
|
||||
%let str = %qsysfunc(compbl(%superq(str)));
|
||||
%let str = %qsysfunc(transtrn(%superq(str),%str([ ),[));
|
||||
%let str = %qsysfunc(transtrn(%superq(str),%str( [),[));
|
||||
%let str = %qsysfunc(transtrn(%superq(str),%str( ]),]));
|
||||
%let str = %qsysfunc(translate(%superq(str),(),[]));
|
||||
%let packagesNames = %unquote(&str.);
|
||||
|
||||
%let numberOfPackagesNames = %qsysfunc(countw(&packagesNames., %str( )));
|
||||
|
||||
%put NOTE: List of packages to be loaded contains &numberOfPackagesNames. element(s).;
|
||||
%put NOTE- The list is: &packagesNames..;
|
||||
%put NOTE- ;
|
||||
|
||||
%do i = 1 %to &numberOfPackagesNames.;
|
||||
%let packageElement = %qscan(&packagesNames., &i., %str(,) );
|
||||
%let packageElement = %qscan(&packagesNames., &i., %str( ) );
|
||||
%let packageName = %qscan(&packageElement., 1, %str(()));
|
||||
%let packageVersion = %qscan(&packageElement., 2, %str(()));
|
||||
%if %superq(packageVersion) = %then %let packageVersion = .;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to preview content of a SAS package, version 20221001. Run %previewPackage() for help info.'
|
||||
des = 'Macro to preview content of a SAS package, version 20221121. Run %previewPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -38,7 +38,7 @@ des = 'Macro to preview content of a SAS package, version 20221001. Run %preview
|
||||
%put ### This is short help information for the `previewPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to get previwe of a SAS packages, version `20221001` #;
|
||||
%put # Macro to get previwe of a SAS packages, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to unload SAS package, version 20221001. Run %unloadPackage() for help info.'
|
||||
des = 'Macro to unload SAS package, version 20221121. Run %unloadPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -35,7 +35,7 @@ des = 'Macro to unload SAS package, version 20221001. Run %unloadPackage() for h
|
||||
%put ### This is short help information for the `unloadPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to unload SAS packages, version `20221001` #;
|
||||
%put # Macro to unload SAS packages, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
hashing_file() function, SAS 9.4M6 */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to verify SAS package with the hash digest, version 20221001. Run %verifyPackage() for help info.'
|
||||
des = 'Macro to verify SAS package with the hash digest, version 20221121. Run %verifyPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -28,7 +28,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20221001. Run %
|
||||
%put ### This is short help information for the `verifyPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to verify SAS package with it hash digest, version `20221001` #;
|
||||
%put # Macro to verify SAS package with it hash digest, version `20221121` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
---
|
||||
|
||||
|
||||
## This is short SAS PAckages Framework help information <a name="helpinfo"></a>
|
||||
## This is short SAS Packages Framework help information <a name="helpinfo"></a>
|
||||
|
||||
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 **`20221001`**.
|
||||
In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20221121`**.
|
||||
|
||||
**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).
|
||||
|
||||
**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/main/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.
|
||||
*Note:* Filenames references `packages` and `package` are **reserved keywords.**
|
||||
The first one should be used to point local folder with packages and the framework.
|
||||
The second is used internally by macros.
|
||||
After assigning the directory do not change them when using the SPF since it may affect stability of the framework.
|
||||
@@ -39,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 `20221001`
|
||||
Macro to install SAS packages, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -82,6 +82,8 @@ After assigning the directory do not change them when using the SPF since it may
|
||||
- `version=` Indicates which historical version of a package to install.
|
||||
Historical version are available only if `mirror=0` is set.
|
||||
Default value is null which means "install the latest".
|
||||
When there are multiple packages to install version
|
||||
is scan sequentially.
|
||||
|
||||
- `replace=` With default value of `1` it causes existing package file
|
||||
to be replaced by new downloaded file.
|
||||
@@ -117,11 +119,29 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
|
||||
%unloadPackage(SQLinDS) %* unload the package content from the SAS session;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
### Example ################################################################################
|
||||
|
||||
Enabling the SAS Package Framework
|
||||
from the local directory and installing & loading
|
||||
the multiple packages from the Internet.
|
||||
|
||||
Assume that the `SPFinit.sas` file
|
||||
is located in the "C:/SAS_PACKAGES/" folder.
|
||||
|
||||
Run the following code in your SAS session:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
filename packages "C:/SAS_PACKAGES";
|
||||
%include packages(SPFinit.sas);
|
||||
|
||||
%installPackage(baseplus(1.17) macroarray(1.0) dfa(0.5) GSM)
|
||||
%loadPackageS(GSM, baseplus(1.17), macroarray(1.0), dfa(0.5))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
## This is short help information for the `helpPackage` macro <a name="helppackage"></a>
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Macro to get help about SAS packages, version `20221001`
|
||||
Macro to get help about SAS packages, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -191,7 +211,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 `20221001`
|
||||
Macro to *load* SAS packages, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -223,24 +243,29 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
|
||||
package is provided in required version,
|
||||
default value: `.`
|
||||
|
||||
- `lazyData=` *Optional.* A list of names of lazy datasets to be
|
||||
loaded. If not null datasets from the list are loaded
|
||||
instead of the package.
|
||||
- `lazyData=` *Optional.* A space separated list of names of lazy
|
||||
datasets to be loaded. If not null datasets from the
|
||||
list are loaded instead of the package.
|
||||
An asterisk (*) means *load all lazy datasets*.
|
||||
|
||||
- `zip=` Standard package is zip (lowcase),
|
||||
- `zip=` *Optional.* Standard package is zip (lowcase),
|
||||
e.g. `%loadPackage(PiPackage)`.
|
||||
If the zip is not available use a folder.
|
||||
Unpack data to "pipackage.disk" folder
|
||||
and use loadPackage in the following form:
|
||||
`%loadPackage(PiPackage, zip=disk, options=)`
|
||||
|
||||
- `cherryPick=` *Optional.* A space separated list of selected elements
|
||||
of the package to be loaded into the SAS session.
|
||||
Default value of an asterisk (*) means:
|
||||
"load all elements of the package".
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
|
||||
to learn more.
|
||||
|
||||
## Example ####################################################################
|
||||
## Example 1 ##################################################################
|
||||
|
||||
Enabling the SAS Package Framework
|
||||
from the local directory and installing & loading
|
||||
@@ -260,11 +285,30 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
|
||||
%unloadPackage(SQLinDS) %* unload the package content from the SAS session;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
## Example 2 ##################################################################
|
||||
|
||||
Enabling the SAS Package Framework
|
||||
from the local directory and installing & cherry picking
|
||||
elements of the BasePlus package.
|
||||
|
||||
Assume that the `SPFinit.sas` file
|
||||
is located in the "C:/SAS_PACKAGES/" folder.
|
||||
|
||||
Run the following code in your SAS session:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
|
||||
%include packages(SPFinit.sas); %* enable the framework;
|
||||
|
||||
%installPackage(BasePlus) %* install the package from the Internet;
|
||||
%loadPackage(BasePlus, cherryPick=getVars) %* cherry pick the content;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
## This is short help information for the `loadPackageS` macro <a name="loadpackages"></a>
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Macro wrapper for the loadPackage macro, version `20221001`
|
||||
Macro wrapper for the loadPackage macro, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -313,7 +357,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 `20221001`
|
||||
Macro to unload SAS packages, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -378,7 +422,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 `20221001`
|
||||
Macro to list available SAS packages, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -419,7 +463,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 `20221001`
|
||||
Macro to verify SAS package with it hash digest, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -473,7 +517,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 `20221001`
|
||||
Macro to get previwe of a SAS packages, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -540,7 +584,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 `20221001`
|
||||
Macro to generate SAS packages, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -606,7 +650,7 @@ The file should contain the following obligatory information:
|
||||
Type: Package
|
||||
Package: PackageName
|
||||
Title: A title/brief info for log note about your package.
|
||||
Version: X.Y
|
||||
Version: X.Y.Z
|
||||
Author: Firstname1 Lastname1 (xxxxxx1@yyyyy.com), Firstname2 Lastname2 (xxxxxx2@yyyyy.com)
|
||||
Maintainer: Firstname Lastname (xxxxxx@yyyyy.com)
|
||||
License: MIT
|
||||
@@ -630,6 +674,9 @@ Name of the `type` of folder and `files.sas` inside must be in the _low_ case le
|
||||
If order of loading is important, the sequential number
|
||||
can be used to order multiple types in the way you wish.
|
||||
|
||||
If folder name starts with `!` (e.g., `!ignore_me`) or *type* of the folder is "unknown" (e.g., not supported one)
|
||||
the content of such folder is ignored during package generation process.
|
||||
|
||||
The "tree structure" of the folder could be for example as follows:
|
||||
|
||||
All files have to have `.sas` extension. Other files are ignored.
|
||||
@@ -721,7 +768,7 @@ 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 `20221001`
|
||||
Macro to list directories pointed by 'packages' fileref, version `20221121`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
|
||||
798
SPF/SPFinit.sas
798
SPF/SPFinit.sas
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2019 - 2022 Bartosz Jablonski
|
||||
Copyright (c) 2019 - 2022 Bartosz Jablonski
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -10,7 +10,7 @@ Packages:
|
||||
|
||||
---
|
||||
|
||||
- **SQLinDS**\[2.2\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
|
||||
- **SQLinDS**\[2.2.2\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
|
||||
```sas
|
||||
data class;
|
||||
set %SQL(
|
||||
@@ -22,7 +22,7 @@ data class;
|
||||
WH = weight + height;
|
||||
run;
|
||||
```
|
||||
SHA256 digest for SQLinDS: 96D0EFE02DF1AE0D7D875A10CAF7EF63CDEF85DD0CF9418934BEFAF0C067D453
|
||||
SHA256 digest for SQLinDS: 085F0B8BD4A59343E2913FF9635EA6E551ADD54E9678C35F5096D4A0A895B9C5
|
||||
|
||||
[Documentation for SQLinDS](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/sqlinds.md "Documentation for SQLinDS")
|
||||
|
||||
@@ -36,7 +36,7 @@ SHA256 digest for MacroCore: A23C29529F3CE7D0C8BEE9545C5D22D5B5594907547374A5135
|
||||
|
||||
---
|
||||
|
||||
- **DFA** (Dynamic Function Arrays)\[0.5\], 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.
|
||||
- **DFA** (Dynamic Function Arrays)\[0.5.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.
|
||||
```sas
|
||||
%createDFArray(ArrDynamic, resizefactor=17);
|
||||
|
||||
@@ -63,13 +63,13 @@ data _null_;
|
||||
end;
|
||||
run;
|
||||
```
|
||||
SHA256 digest for DFA: 5BFFCE78439E1CDDCBB15C95CD287AA4195BF64BB17DDB8FE374EC3535B4F491
|
||||
SHA256 digest for DFA: 3F618EDAC8B4F4BE6C19D606E6BCC58121A16BA1383D2EE64C680B4B7FA9C96A
|
||||
|
||||
[Documentation for DFA](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/dfa.md "Documentation for DFA")
|
||||
|
||||
---
|
||||
|
||||
- **macroArray**\[1.0\], implementation of an array concept in a macro language, e.g.
|
||||
- **macroArray**\[1.0.2\], implementation of an array concept in a macro language, e.g.
|
||||
```sas
|
||||
%array(ABC[17] (111:127), macarray=Y);
|
||||
|
||||
@@ -88,13 +88,13 @@ SHA256 digest for DFA: 5BFFCE78439E1CDDCBB15C95CD287AA4195BF64BB17DDB8FE374EC353
|
||||
which = 1:H:2
|
||||
);
|
||||
```
|
||||
SHA256 digest for macroArray: ED12BC96F8A4E9E7C4D651EC1E15479DB9B55D98B274B63C507ED842081F7AB7
|
||||
SHA256 digest for macroArray: DA57FFE85F49201FD61A53411D19E97FB5A6AC3C34E34FDF4B913545699551FF
|
||||
|
||||
[Documentation for macroArray](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/macroarray.md "Documentation for macroArray")
|
||||
|
||||
---
|
||||
|
||||
- **BasePlus**\[1.17\] adds a bunch of functionalities I am missing in BASE SAS, such as:
|
||||
- **BasePlus**\[1.17.2\] adds a bunch of functionalities I am missing in BASE SAS, such as:
|
||||
```sas
|
||||
call arrMissToRight(myArray);
|
||||
call arrFillMiss(17, myArray);
|
||||
@@ -112,25 +112,25 @@ format x bool.;
|
||||
|
||||
%zipLibrary(sashelp,libOut=work)
|
||||
```
|
||||
SHA256 digest for BasePlus: 56B260350FEB7D5118F581B9EFD1B9CE1F0298DCB9A4C000A7654E2FF3F0298C
|
||||
SHA256 digest for BasePlus: EBA9EDB3D50D854288970CC0E965DA6AD5B057F6E6433EEBEC4A02B9A25CF6E2
|
||||
|
||||
[Documentation for BasePlus](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md "Documentation for BasePlus")
|
||||
|
||||
---
|
||||
|
||||
- **GSM** (Generate Secure Macros)\[0.20\], package allows
|
||||
- **GSM** (Generate Secure Macros)\[0.20.2\], package allows
|
||||
to create secured macros stored in SAS Proc FCMP functions.
|
||||
The dataset with functions can be shared between different operating systems
|
||||
and allows to generate macros on site without showing their code.
|
||||
|
||||
SHA256 digest for GSM: 2AEBC150FBA99A4AAB0265A21C57E89200BFD96B633B898F32743D1C8831A159
|
||||
SHA256 digest for GSM: E47C94B536B661DEE390F5C3EA1684DD1A246106F4FBBDAFA57F5E34D4BB16D5
|
||||
|
||||
[Documentation for GSM](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/gsm.md "Documentation for GSM")
|
||||
|
||||
---
|
||||
|
||||
- **dynMacroArray**\[0.2\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA). Development of this package is currently on hold.
|
||||
- **dynMacroArray**\[0.2.2\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA). Development of this package is currently on hold.
|
||||
|
||||
SHA256 digest for dynMacroArray: D7E0B8F85C05EBF8622204E0D2F3E990D48D0A9B3911051C3AD44DC98954DDCF
|
||||
SHA256 digest for dynMacroArray: DD0BF1768DA05EBB5F8C6E7409A0929E28DF11CB499F75B433D9648855AACAE4
|
||||
|
||||
---
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
/* 20221121 */
|
||||
BasePlus: EBA9EDB3D50D854288970CC0E965DA6AD5B057F6E6433EEBEC4A02B9A25CF6E2
|
||||
DFA: 3F618EDAC8B4F4BE6C19D606E6BCC58121A16BA1383D2EE64C680B4B7FA9C96A
|
||||
dynMacroArray: DD0BF1768DA05EBB5F8C6E7409A0929E28DF11CB499F75B433D9648855AACAE4
|
||||
GSM: E47C94B536B661DEE390F5C3EA1684DD1A246106F4FBBDAFA57F5E34D4BB16D5
|
||||
macroArray: DA57FFE85F49201FD61A53411D19E97FB5A6AC3C34E34FDF4B913545699551FF
|
||||
SQLinDS: 085F0B8BD4A59343E2913FF9635EA6E551ADD54E9678C35F5096D4A0A895B9C5
|
||||
|
||||
/* 20221112 */
|
||||
BasePlus: A80006D3C1409465E49F383D08F2F3AF1E33D6A67D71A8CAF29747ADC917E2E4
|
||||
DFA: 5A6FD2F6E962E6C191346A141FFAF354E35A546CA93146B55D7C6163BFB1BDD6
|
||||
dynMacroArray: C987C08615A53D7BD7AEC3911EADF436C676EAB3E233E7E422E42995B890E169
|
||||
GSM: 5D1925970C9590CD195C15B8641B01D7857E3B2546323DC77D09154BCCA40922
|
||||
macroArray: 371B92A5ABBE82C53F7D63BC5C0D1EBD4695603D3894D8A9A5D5777D1AB59B30
|
||||
SQLinDS: A070214517CC36590083FCF9D5F488AC6E746793E94B9AA55D09A419CF291B5B
|
||||
|
||||
/* 20220830 */
|
||||
BasePlus: 56B260350FEB7D5118F581B9EFD1B9CE1F0298DCB9A4C000A7654E2FF3F0298C
|
||||
DFA: 5BFFCE78439E1CDDCBB15C95CD287AA4195BF64BB17DDB8FE374EC3535B4F491
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
---
|
||||
|
||||
# The BasePlus package [ver. 1.17] <a name="baseplus-package"></a> ###############################################
|
||||
# The BasePlus package [ver. 1.17.2] <a name="baseplus-package"></a> ###############################################
|
||||
|
||||
The **BasePlus** package implements useful
|
||||
functions and functionalities I miss in the BASE SAS.
|
||||
@@ -77,6 +77,8 @@ Kudos to all who inspired me to generate this package:
|
||||
*Michal Ludwicki*,
|
||||
*Quentin McMullen*.
|
||||
|
||||
Recording from the SAS Explore 2022 conference: [A BasePlus Package for SAS](https://communities.sas.com/t5/SAS-Explore-Presentations/A-BasePlus-Package-for-SAS/ta-p/838246 "A BasePlus Package for SAS") (September 27th-29th, 2022).
|
||||
|
||||
---
|
||||
|
||||
### BASIC EXAMPLES AND USECASES: ####################################################
|
||||
@@ -271,10 +273,10 @@ Package contains:
|
||||
48. functions quicksorthashsddv
|
||||
49. functions quicksortlight
|
||||
|
||||
*SAS package generated by generatePackage, version 20220830*
|
||||
*SAS package generated by generatePackage, version 20221121*
|
||||
|
||||
The SHA256 hash digest for package BasePlus:
|
||||
`56B260350FEB7D5118F581B9EFD1B9CE1F0298DCB9A4C000A7654E2FF3F0298C`
|
||||
`EBA9EDB3D50D854288970CC0E965DA6AD5B057F6E6433EEBEC4A02B9A25CF6E2`
|
||||
|
||||
---
|
||||
# Content description ############################################################################################
|
||||
@@ -3934,7 +3936,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
## License ####################################################################
|
||||
|
||||
Copyright (c) 2020 Bartosz Jablonski
|
||||
Copyright (c) since 2020 Bartosz Jablonski
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
Binary file not shown.
@@ -18,7 +18,7 @@
|
||||
|
||||
---
|
||||
|
||||
# The DFA package [ver. 0.5] <a name="dfa-package"></a> ###############################################
|
||||
# The DFA package [ver. 0.5.2] <a name="dfa-package"></a> ###############################################
|
||||
|
||||
The **DFA** (a.k.a. *Dynamic Function Array*) package implements:
|
||||
- dynamic numeric and character arrays,
|
||||
@@ -52,10 +52,10 @@ Package contains:
|
||||
12. exec generatearrays
|
||||
13. clean generatearrays
|
||||
|
||||
*SAS package generated by generatePackage, version 20220830*
|
||||
*SAS package generated by generatePackage, version 20221121*
|
||||
|
||||
The SHA256 hash digest for package BasePlus:
|
||||
`5BFFCE78439E1CDDCBB15C95CD287AA4195BF64BB17DDB8FE374EC3535B4F491`
|
||||
`3F618EDAC8B4F4BE6C19D606E6BCC58121A16BA1383D2EE64C680B4B7FA9C96A`
|
||||
|
||||
---
|
||||
# Content description ############################################################################################
|
||||
|
||||
BIN
packages/dfa.zip
BIN
packages/dfa.zip
Binary file not shown.
Binary file not shown.
@@ -8,7 +8,7 @@
|
||||
---
|
||||
|
||||
|
||||
# The GSM package [ver. 0.20] <a name="gsm-package"></a> ###############################################
|
||||
# The GSM package [ver. 0.20.2] <a name="gsm-package"></a> ###############################################
|
||||
|
||||
The **GSM** (a.k.a. *Generate Secure Macros*) package allows
|
||||
to create secured macros stored in SAS Proc FCMP functions.
|
||||
@@ -91,10 +91,10 @@ Package contains:
|
||||
Required SAS Components:
|
||||
`Base SAS Software`
|
||||
|
||||
* SAS package generated by generatePackage, version 20220830 *
|
||||
* SAS package generated by generatePackage, version 20221121 *
|
||||
|
||||
The SHA256 hash digest for package GSM:
|
||||
`2AEBC150FBA99A4AAB0265A21C57E89200BFD96B633B898F32743D1C8831A159`
|
||||
`E47C94B536B661DEE390F5C3EA1684DD1A246106F4FBBDAFA57F5E34D4BB16D5`
|
||||
|
||||
|
||||
## >>> `%GSM()` macro: <<< <a name="gsm-macro"></a> #######################
|
||||
|
||||
BIN
packages/gsm.zip
BIN
packages/gsm.zip
Binary file not shown.
@@ -19,7 +19,7 @@
|
||||
|
||||
---
|
||||
|
||||
# The macroArray package [ver. 1.0] <a name="macroarray-package"></a> ###############################################
|
||||
# The macroArray package [ver. 1.0.2] <a name="macroarray-package"></a> ###############################################
|
||||
|
||||
The **macroArray** package implements a macro array facility:
|
||||
- `%array()`,
|
||||
@@ -75,10 +75,10 @@ Package contains:
|
||||
Required SAS Components:
|
||||
*Base SAS Software*
|
||||
|
||||
*SAS package generated by generatePackage, version 20220830.*
|
||||
*SAS package generated by generatePackage, version 20221121.*
|
||||
|
||||
The SHA256 hash digest for package macroArray:
|
||||
`ED12BC96F8A4E9E7C4D651EC1E15479DB9B55D98B274B63C507ED842081F7AB7`
|
||||
`DA57FFE85F49201FD61A53411D19E97FB5A6AC3C34E34FDF4B913545699551FF`
|
||||
|
||||
---
|
||||
# Content description ############################################################################################
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
- [The SQLinDS package [ver. 2.2]](#sqlinds-package)
|
||||
- [The SQLinDS package [ver. 2.2.2]](#sqlinds-package)
|
||||
- [Content description](#content-description)
|
||||
* [library `dsSQL`](#library-dssql)
|
||||
* [`%dsSQL_inner()` macro](#dssql-inner-macro)
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
---
|
||||
|
||||
# The SQLinDS package [ver. 2.2] <a name="sqlinds-package"></a> ###############################################
|
||||
# The SQLinDS package [ver. 2.2.2] <a name="sqlinds-package"></a> ###############################################
|
||||
|
||||
The **SQLinDS** package is an implementation of
|
||||
the *macro-function-sandwich* concept introduced in the
|
||||
@@ -46,10 +46,10 @@ Package contains:
|
||||
Required SAS Components:
|
||||
*Base SAS Software*
|
||||
|
||||
*SAS package generated by generatePackage, version 20220830*
|
||||
*SAS package generated by generatePackage, version 20221121*
|
||||
|
||||
The SHA256 hash digest for package SQLinDS:
|
||||
`96D0EFE02DF1AE0D7D875A10CAF7EF63CDEF85DD0CF9418934BEFAF0C067D453`
|
||||
`085F0B8BD4A59343E2913FF9635EA6E551ADD54E9678C35F5096D4A0A895B9C5`
|
||||
|
||||
---
|
||||
# Content description ############################################################################################
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user