mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2026-01-07 15:10:04 +00:00
"Hello World" example tutorial
"Hello World" example tutorial.
This commit is contained in:
99
README.md
99
README.md
@@ -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.
|
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 **`20221107`**.
|
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 **`20221107`**.
|
||||||
|
|
||||||
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).
|
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,14 +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")
|
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)
|
Videos presenting the SPF and packages, from various conferences and meetups (the newer the better):
|
||||||
- [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)
|
- ["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)
|
||||||
- [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 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)
|
||||||
- [SAS Global Forum 2021 V.E.](https://www.youtube.com/watch?v=hqexaQtGw88 "SGF2021") (May 20th, 2021)
|
- ["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 Explore 2022](https://communities.sas.com/t5/SAS-Explore-Presentations/A-BasePlus-Package-for-SAS/ta-p/838246 "SASexplore") (September 27th-29th, 2022)
|
- ["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") (September 27th-29th 2022, ~28 minutes, technical presentation with details about the BasePlus package)
|
||||||
|
- ["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, ~28 minutes, general overview but with a bit obsolete technical details)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -34,53 +44,94 @@ A **SASware Ballot Idea** for adding *SAS Packages Framework* macros into Base S
|
|||||||
---
|
---
|
||||||
|
|
||||||
### The User:
|
### 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:
|
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.
|
- \[Optional\] Manually download the `<packageName>.zip` file into the local packages folder.
|
||||||
- and Execute:
|
- and Execute:
|
||||||
|
|
||||||
```sas
|
```sas
|
||||||
filename packages "<directory/containing/packages/>"; /* setup directory for packages */
|
filename packages "<directory/containing/packages/>"; /* setup directory for packages */
|
||||||
%include packages(SPFinit.sas); /* enable the framework */
|
%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 */
|
%helpPackage(packageName) /* get help about the package */
|
||||||
%loadPackage(packageName) /* load the package content into the SAS session */
|
%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
|
```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";
|
filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas";
|
||||||
%include SPFinit; /* enable the framework */
|
%include SPFinit; /* enable the framework */
|
||||||
|
|
||||||
%installPackage(packageName) /* install the package */
|
%installPackage(packageName) /* install a package */
|
||||||
%helpPackage(packageName) /* get help about the package */
|
%helpPackage(packageName) /* get help about the package */
|
||||||
%loadPackage(packageName) /* load the package content into the SAS session */
|
%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:
|
### The Developer:
|
||||||
|
|
||||||
To create your own package:
|
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 [**`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")
|
- 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.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### 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**\[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**\[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**.
|
**Update**\[November 11th, 2021\]**:** `%extendPackagesFileref()` **macro is available**.
|
||||||
@@ -109,9 +160,9 @@ If you find the SPF useful **share info** about it or **give it a [star](https:/
|
|||||||
|
|
||||||
## Available packages:
|
## 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:
|
Packages:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user