SAS Packages Framework version 20260126

SAS Packages Framework version 20260126

Changes:
- A utility function and a utility macro is now added to every package generated with %generatePackage() macro.
- Documentation updated.

Packages regenerated:
- BasePlus: F*91A5AD4709A418704315EF37DDCF954522D4FB42808D406B3ED4DA560F6864C6
- DFA: F*643FBE2B7AE1425FC0240139813B93AE2C6BCFFDF6A0CFAEBEC11F83D3548E57
- GSM: F*7A4FEC410DEB921613A33F154FBBE332D7EC4C4DAC1351A4E611D986489EE848
- macroArray: F*9DA64CA9A745E1DB7176F7AF4459BB014F61F71626473ABF6471A32689E14FF1
- SQLinDS: F*CEAA4C90515F6E8AACBFFD55ABA6544E399EDBE0A7081107B62DCEE6F5430A1D
- bpUTiL: F*D03FD84D518F0CF4E0042BFEA864D9118D7FF97265DC49019425878BDBA31FE8
- evExpress: F*A8A4B0389A765D4D22FDD7AF42C542C2AC537F0D81FFB2B65605C60B1E9CB1B4
This commit is contained in:
Bart Jablonski
2026-01-26 17:21:32 +01:00
parent 3520e4b948
commit dcb012883f
36 changed files with 748 additions and 383 deletions

View File

@@ -1,20 +1,40 @@
- [The GSM package](#gsm-package)
- [Content description](#content-description)
* [`%GSM()` macro](#gsm-macro)
* [`%GSMpck_makeFCMPcode()` macro](#gsmpck-makefcmpcode-macro)
* [License](#license)
# Documentation for the `GSM` package.
----------------------------------------------------------------
*Generate Secure Macros - to keep your code secret*
----------------------------------------------------------------
### Version information:
- Package: GSM
- Version: 0.22.2
- Generated: 2026-01-26T16:44:38
- Author(s): Bartosz Jablonski (yabwon@gmail.com)
- Maintainer(s): Bartosz Jablonski (yabwon@gmail.com)
- License: MIT
- File SHA256: `F*7A4FEC410DEB921613A33F154FBBE332D7EC4C4DAC1351A4E611D986489EE848` for this version
- Content SHA256: `C*99444DE5A473D3F92374ACE917E29E77C1F94BF77E06436695B06B85705606C7` for this version
---
# The `GSM` package, version: `0.22.2`;
---
# The GSM package [ver. 0.22.1] <a name="gsm-package"></a> ###############################################
# The GSM package [ver. 0.22.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.
The dataset with functions can be shared and allows to generate
macros without showing their code.
[Recording of presentation with "how it works" description (in Polish)](https://www.youtube.com/watch?v=LtaWPe2sgRY&t=1s "YouTube").
[The WUSS 2023 Conference article describing the idea](https://www.wuss.org/wuss-2023-conference-proceedings/ "Article about the idea GSM")
The GSM package is basically an automated version of the following:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
proc fcmp outlib = work.gsm.secure ENCRYPT;
@@ -42,10 +62,6 @@ run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See examples for more details.
[Recording of presentation with "how it works" description (in Polish)](https://www.youtube.com/watch?v=LtaWPe2sgRY&t=1s "YouTube").
[The WUSS 2023 Conference article describing the idea](https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-189.pdf "Article about the idea GSM")
*How to use it:*
- Copy all files with your secured macros code into a directory.
@@ -56,53 +72,74 @@ See examples for more details.
%GSM(<the path to directory>, cmplib=<name of the dataset>)
```
- Share generated `ZIP` file (unzip and run the code).
**Limitations:**
- Single macro file cannot be longer than 32760 bytes.
- Multiline text variable. Consider the following code text file:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%macro~test()/SECURE;~#@
data~test;~#@
a~=~"abc~#@
~#@
def";~#@
put~a~hex20.;~#@
run;~#@
%mend~test;~#@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
where `~` symbols the space character,
`#` symbols the carriage return (`0D`),
and `@` symbols the line feed (`0A`).
The code file is scanned and inserted into
the `resolve()` function argument in a "byte by byte"
fashion hence also the "end of line" characters are included.
As the result value of variable `a` will be:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%macro~test()/SECURE;~#@
data~test;~#@
a~=~"abc~#@
~#@
def";~#@
put~a~hex20.;~#@
run;~#@
%mend~test;~#@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
where `~` symbols the space character,
`#` symbols the carriage return (`0D`),
and `@` symbols the line feed (`0A`).
The code file is scanned and inserted into
the `resolve()` function argument in a "byte by byte"
fashion hence also the "end of line" characters are included.
As the result value of variable `a` will be:
`a = "abc~#@~#@def"`.
If you want to use the `GSM` package avoid
such "style" of coding in your macros.
`a = "abc~#@~#@def"`.
If you want to use the `GSM` package avoid
such "style" of coding in your macros.
---
Package contains:
1. macro gsm
2. macro gsmpck_makefcmpcode
---
---
Required SAS Components:
`Base SAS Software`
Package contains additional content, run: %loadPackageAddCnt(GSM) to load it
or look for the gsm_AdditionalContent directory in the Packages fileref
- Base SAS Software
---
---
Package contains additional content, run: `%loadPackageAddCnt(GSM)` to load it
or look for the `gsm_AdditionalContent` directory in the `packages` fileref
localization (only if additional content was deployed during the installation process).
*SAS package generated by generatePackage, version 20231111*
The SHA256 hash digest for package GSM:
`F*80197391195C3EC41BD436DF0C8802D3920E4D22B64009A7DE872FBDF8D4B86E`
---------------------------------------------------------------------
*SAS package generated by SAS Package Framework, version `20260126`,*
*under `WIN`(`X64_10PRO`) operating system,*
*using SAS release: `9.04.01M9P06042025`.*
---------------------------------------------------------------------
# The `GSM` package content
The `GSM` package consists of the following content:
1. [`%gsm()` macro ](#gsm-macro-1 )
2. [`%gsmpck_makefcmpcode()` macro ](#gsmpckmakefcmpcode-macro-2 )
3. [License note](#license)
---
## `%gsm()` macro <a name="gsm-macro-1"></a> ######
## >>> `%GSM()` macro: <<< <a name="gsm-macro"></a> #######################
@@ -111,20 +148,22 @@ the **GSM** (a.k.a. *Generate Secure Macros*) package.
It converts a list of macros provided by the user into
a data set of the Proc FCMP functions. The macros are stored
in functions are encrypted which allow to share them without
showing their code. *Important* thing is that macros provided
by the user *has* to be "secure", i.e. the `secure` option has to
be added to the macro definition. See the example:
as encrypted code which allow to share the macros
without showing their code.
*Important* thing is that macros provided by the user *has* to
be "secure", i.e. the `secure` option has to be added to the
macro definition and th emacro code has to be written properly.
See the example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%macro secretMacro(x) / SECURE; /* <- the secure option */
<... some code ...>
%macro secretMacro(x) / SECURE; %* <- the secure option *;
<... secure code ...>
%mend secretMacro;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As a result a zip file, containing dataset with functions and
code to be executed on site, is generated.
code to be executed on site, is generated.
Since encrypted code is stored in a SAS dataset it has
no limitation in sharing between operating systems (like catalogs have).
@@ -199,9 +238,11 @@ The basic syntax is the following, the `<...>` means optional parameters:
* `trim=` - *Deprecated*, the default value is `0`.
*Kept for backward compatibility.*
---
### Example: ###################################################################
Example 1. Prepare 2 files: `f1.sas` and `f2.sas` and use the `%GSM()` macro.
@@ -245,6 +286,11 @@ run;
%GSM(&path., cmplib=work.myMacros)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
## `%gsmpck_makefcmpcode()` macro <a name="gsmpckmakefcmpcode-macro-2"></a> ######
## >>> `%GSMpck_makeFCMPcode()` macro: <<< <a name="GSMpck-makeFCMPcode-macro"></a> #######################
The `%GSMpck_makeFCMPcode()` macro is an internal macro of
@@ -310,10 +356,15 @@ The basic syntax is the following, the `<...>` means optional parameters:
---
## License ####################################################################
Copyright (c) Bartosz Jablonski, since 2021
---
---
# License <a name="license"></a> ######
Copyright (c) Bartosz Jablonski, since 2021 onward
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -332,5 +383,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---