Skip to content

Commit

Permalink
SAS Packages Framework, version 20241102
Browse files Browse the repository at this point in the history
SAS Packages Framework, version 20241102

Changes:

In the `%loadPackage()`, the `%ICEloadPackage()`, and the `%loadPackageAddCnt()` macros version of a package can be provided with a comparison condition.

If the required version is provided with a comparison operator, e.g., `<=`, `=`, or `>`, then the operator is used to compare `required` and `provided` versions.

The following example:
```sas
%loadPackage(myPackage
  ,requiredVersion=1.2.2=
)
```
will force to load the package only if the required version is exactly equal to the provided one.

Comparison is done in form "`req. comparison prov.`".

Documentation and HoW-materials updated.
  • Loading branch information
yabwon committed Nov 2, 2024
1 parent 092419a commit a24aee5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Share your code with SAS Packages - a Hands-on-Workshop.md
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,13 @@ ERROR: Package myPackage will not be loaded!
Verify installed version of the package.
```
If the required version is provided with a comparison operator, e.g., `<=`, `=`, or `>`, then the operator is used to compare `required` and `provided` versions, as the following example
```sas
%loadPackage(myPackage
,requiredVersion=1.2.2=
)
```
will force to load the package only if the required version is exactly equal to the provided one. Comparison is done in form "`req. comparison prov.`".

(3) The next one is "Cherry Picking". Sometimes a package can contain a lot off "stuff", e.g., 123 macros, 42 functions, 17 formats and 2 datasets. Loading all of that into your SAS session when you need only two of those functions for your work seems to be a waste of resources. This is the use case when the "cherry picking" can be a solution. When you know the names of particular elements you want to load (reading help notes works well here) e.g., `fastfunction` and `furiousformat`, all you need to run is:
```sas
Expand Down

0 comments on commit a24aee5

Please sign in to comment.