Skip to content

Commit

Permalink
SAS Packages Framework, version 20241014
Browse files Browse the repository at this point in the history
#SAS Packages Framework, version `20241014`

## Changes

---

The [%generatePackage()]{https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md#generatepackage} macro accepts two new code types:
- `DS2PCK` for Proc DS2 packages, and
- `DS2THR` for Proc DS2 threads.

Those two new types allow to add `PROC DS2` *threads* and *packages* to a SAS package.

---

The [%loadPackage()]{https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md#loadpackage} macro has new parameter:
- `DS2force` - when set to `1` an existing data set named the same as thread or package is overwritten by DS2 file.

While loading a package that contains `PRCO DS2` code, by default, if there already exist a SAS data set with the same name (which is not a DS2 thread or package file) a warning is issued in the log and the thread/package data set is not generated. To force overwrite, set the `DS2force=` parameter of the `%loadPackage()` macro to 1.

---

Minor updates and fixes:
- Proc `sql` "drop table" replaced with `fedsqsl`'s for data sets deletion.
- Proc `iml`, `fcmp`, and `proto` code blocks end with `quit;` statement.

---

[Documentation]{https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation} and [Hands-on-Workshops materials]{https://github.com/yabwon/HoW-SASPackages} updated.

---
  • Loading branch information
yabwon committed Oct 14, 2024
1 parent 0a01f39 commit c667bc6
Show file tree
Hide file tree
Showing 15 changed files with 396 additions and 114 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Don't forget to **STAR** (:star:) the repository! :-)

### Current version:

**The latest version** of SPF is **`20240927`**.
**The latest version** of SPF is **`20241014`**.

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).

Expand Down Expand Up @@ -163,6 +163,8 @@ The SAS Packages Framework [(short) documentation](https://github.com/yabwon/SAS

### Updates worth mentioning:

**Update**\[October 14th, 2024\]**:** `DS2PCK` and `DS2THR` **types for `PROC DS2` *threads* and *packages* added to the framework. (see [here](https://github.com/yabwon/SAS_PACKAGES/releases/tag/20241014 "PROC DS2"))**.

**Update**\[December 10th, 2023\]**:** `markdownDoc=` **parameter added to** `%generatePackage()` **macro, which allows to generate markdown file with documentation. Content is taken from the help information notes and the description. (see [here](https://github.com/yabwon/SAS_PACKAGES/releases/tag/20231210 "markdown documentation"))**.

**Update**\[November 11th, 2023\]**:** `KMFSNIP` **type for *key macro abbreviations* snippets added to the framework. (see [here](https://github.com/yabwon/SAS_PACKAGES/releases/tag/20231111 "KMF-abbreviations"))**.
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions SPF/Macros/extendpackagesfileref.sas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
when empty the "packages" value is used */
)/secure
/*** HELP END ***/
des = 'Macro to list directories pointed by "packages" fileref, version 20240927. Run %extendPackagesFileref(HELP) for help info.'
des = 'Macro to list directories pointed by "packages" fileref, version 20241014. Run %extendPackagesFileref(HELP) for help info.'
;

%if %QUPCASE(&packages.) = HELP %then
Expand All @@ -22,7 +22,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20240927
%put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20240927` #;
%put # Macro to list directories pointed by 'packages' fileref, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
181 changes: 154 additions & 27 deletions SPF/Macros/generatepackage.sas

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions SPF/Macros/helppackage.sas
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to get help about SAS package, version 20240927. Run %helpPackage() for help info.'
des = 'Macro to get help about SAS package, version 20241014. Run %helpPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
Expand All @@ -43,7 +43,7 @@ des = 'Macro to get help about SAS package, version 20240927. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get help about SAS packages, version `20240927` #;
%put # Macro to get help about SAS packages, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
6 changes: 3 additions & 3 deletions SPF/Macros/installpackage.sas
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*+installPackage+*/
/* Macros to install SAS packages, version 20240927 */
/* Macros to install SAS packages, version 20241014 */
/* 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
Expand All @@ -23,7 +23,7 @@
/secure
minoperator
/*** HELP END ***/
des = 'Macro to install SAS package, version 20240927. Run %%installPackage() for help info.'
des = 'Macro to install SAS package, version 20241014. Run %%installPackage() for help info.'
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do;
Expand All @@ -38,7 +38,7 @@ des = 'Macro to install SAS package, version 20240927. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to install SAS packages, version `20240927` #;
%put # Macro to install SAS packages, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
6 changes: 3 additions & 3 deletions SPF/Macros/listpackages.sas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Macro to list SAS packages in packages folder.
Version 20240927
Version 20241014
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
Expand All @@ -23,7 +23,7 @@

%macro listPackages()
/secure PARMBUFF
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20240927.'
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20241014.'
;
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
%do;
Expand All @@ -38,7 +38,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 `20240927` #;
%put # Macro to list available SAS packages, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
17 changes: 14 additions & 3 deletions SPF/Macros/loadpackage.sas
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
, loadAddCnt=0 /* should the additional content be loaded?
default is 0 - means No, 1 means Yes */
, suppressExec=0 /* indicates if loading of exec files
should be suppressed, 1=suppress
should be suppressed, 1=suppress */
, DS2force=0 /* indicates if PROC DS2 packages and threads
should be loaded if a data set exists, 0=do not load
*/
)/secure
/*** HELP END ***/
des = 'Macro to load SAS package, version 20240927. Run %loadPackage() for help info.'
des = 'Macro to load SAS package, version 20241014. Run %loadPackage() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
Expand All @@ -50,7 +52,7 @@ minoperator
%put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *load* SAS packages, version `20240927` #;
%put # Macro to *load* SAS packages, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down Expand Up @@ -110,6 +112,10 @@ minoperator
%put # should be suppressed, default value is `0`, #;
%put # when set to `1` `exec` files are *not* loaded #;
%put # #;
%put # - `DS2force=` *Optional.* Indicates if loading of `PROC DS2` packages #;
%put # or threads should overwrite existing SAS data sets. #;
%put # Default value of `0` means "do not overwrite". #;
%put # #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
Expand Down Expand Up @@ -212,6 +218,11 @@ minoperator
%let suppressExec = 0;
%end;

%if %superq(DS2force) NE 1 %then
%do;
%let DS2force = 0;
%end;

filename &_PackageFileref_. &ZIP.
/* put location of package myPackageFile.zip here */
"&path./%lowcase(&packageName.).&zip." %unquote(&options.)
Expand Down
4 changes: 2 additions & 2 deletions SPF/Macros/loadpackageaddcnt.sas
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
is provided in required version */
)/secure
/*** HELP END ***/
des = 'Macro to load additional content for a SAS package, version 20240927. Run %loadPackageAddCnt() for help info.'
des = 'Macro to load additional content for a SAS package, version 20241014. Run %loadPackageAddCnt() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
Expand All @@ -35,7 +35,7 @@ minoperator
%put ### This is short help information for the `loadPackageAddCnt` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *load* additional content for a SAS package, version `20240927` #;
%put # Macro to *load* additional content for a SAS package, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
4 changes: 2 additions & 2 deletions SPF/Macros/loadpackages.sas
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20240927. Run %loadPackages() for help info.'
des = 'Macro to load multiple SAS packages at one run, version 20241014. Run %loadPackages() for help info.'
parmbuff
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
Expand All @@ -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 `20240927` #;
%put # Macro wrapper for the loadPackage macro, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
4 changes: 2 additions & 2 deletions SPF/Macros/previewpackage.sas
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20240927. Run %previewPackage() for help info.'
des = 'Macro to preview content of a SAS package, version 20241014. Run %previewPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
Expand All @@ -38,7 +38,7 @@ des = 'Macro to preview content of a SAS package, version 20240927. Run %preview
%put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get preview of a SAS packages, version `20240927` #;
%put # Macro to get preview of a SAS packages, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
4 changes: 2 additions & 2 deletions SPF/Macros/unloadpackage.sas
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to unload SAS package, version 20240927. Run %unloadPackage() for help info.'
des = 'Macro to unload SAS package, version 20241014. Run %unloadPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
Expand All @@ -35,7 +35,7 @@ des = 'Macro to unload SAS package, version 20240927. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to unload SAS packages, version `20240927` #;
%put # Macro to unload SAS packages, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
4 changes: 2 additions & 2 deletions SPF/Macros/verifypackage.sas
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
hashing_file() function, SAS 9.4M6 */
)/secure
/*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20240927. Run %verifyPackage() for help info.'
des = 'Macro to verify SAS package with the hash digest, version 20241014. Run %verifyPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
Expand All @@ -28,7 +28,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20240927. Run %
%put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to verify SAS package with it hash digest, version `20240927` #;
%put # Macro to verify SAS package with it hash digest, version `20241014` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
Expand Down
Loading

0 comments on commit c667bc6

Please sign in to comment.