BookmarkSubscribeRSS Feed
yabwon
Amethyst | Level 16

Hey SAS-C,

Just FYI.

Bart

 

SAS Packages Framework, version 20251228

As usual available at: https://github.com/yabwon/SAS_PACKAGES

This release introduces two new parameters to the %generatePackage() macro.
By default, package's ZIP file is generated into the same location where the filesLocation value is pointing, those new parameters allow to alter the default behavior.

Those two new parameters give the developer flexibility in setting up package repository the way the developer finds it the most convenient.
For example, one approach is to use a single location (repository), with multiple sub-directories: one for source code, second for the latest zip file, and third for historical versions (see Example 1 below).
The other approach is to create two separate repositories, on repository for source code and the second repository for generated zip and historical versions (see Example 2 below).
Now the developer has options.

Parameters were added as a result of collaboration and discussion with Ken Nakamatsu (k-nkmt). Thanks Ken!
Code cleaning was also Ken's idea.

(This is not the last idea proposed by this gentleman, stay tuned!)


Changes and modifications:

A) Two new parameters were added to the %generatePackage() macro:

  • The buildLocation= parameter allows to alter the location where the ZIP file with the package is generated.
  • The archLocation= parameter (only if easyArch= is set to 1) alters the location where the "versioned" package ZIP file is stored.

B) The easyArch= option is now independent form the markdownDoc=, i.e., the "versioned" copy of the package can be created even when automated markdown is not generated.

C) Three technical sub-macros were extracted from the %generatePackage() macro. These macros are:
SPFint_gnPckg_tests, SPFint_gnPckg_markdown, and SPFint_gnPckg_arch. They encapsulate testing part of the package generation process, generation of (optional) markdown documentation, and (also optional) archiving process. Those macros are internal macros, are executable only inside %generatePackage(), do not accept any parameters, and use %generatePackage() macro's local macrovariables.

D) Minor "end-of-the-year" code housekeeping.

E) Documentation updated.

F) Article refreshed.


Examples:

Example 1. Redirect results of package generation to separate directories in a single location (repository):

%let path=/home/bart/mypackage;

%generatePackage(
   filesLocation=&path./source         /* take source files from here,      */
  ,buildLocation=&path./latestVersion  /* put mypackage.zip to there, and   */
  ,archLocation=&path./history         /* copy mypackage_1.2.3_.zip to here */
  ,easyArch=1
)
 

Example 2. Redirect results of package generation to separate directories in multiple locations (repositories):

%generatePackage(
   filesLocation=/home/bart/myPackageCode/source               /* take source files from here,      */
  ,buildLocation=/repositories/forGitHub/myPackage/            /* put mypackage.zip to there, and   */
  ,archLocation=/repositories/forGitHub/myPackage/history      /* copy mypackage_1.2.3_.zip to here */
  ,easyArch=1
)
 

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 40 views
  • 0 likes
  • 1 in conversation