Compare commits

..

119 Commits

Author SHA1 Message Date
Bart Jablonski
8f939144ba Merge pull request #126 from yabwon/main
SAS Packages Framework, version 20260216
2026-02-16 20:52:08 +01:00
Bart Jablonski
d6da6d7232 SAS Packages Framework, version 20260216
SAS Packages Framework, version 20260216

BugFix:
- When package loading with `cherryPick=` is done the `<packageName>META` is created. This should not be the case. Release 20260216 fixes the issue.
2026-02-16 20:34:03 +01:00
Bart Jablonski
d24ae821f5 Merge pull request #125 from yabwon/main
SAS Packages Framework, version 20260205
2026-02-05 16:05:43 +01:00
Bart Jablonski
0a3226f4d0 SAS Packages Framework, version 20260205
SAS Packages Framework, version 20260205

Change:
- a fix in %verifyPackage() to handle SAS packages bundles with long names (above 32 characters)
2026-02-05 16:03:51 +01:00
Bart Jablonski
fcdb3709c4 DFA [0.5.9] and BasePlus [3.1.3]
DFA [0.5.9] and BasePlus [3.1.3]

SHA256 digest for DFA: F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08315DF0C49

SHA256 digest for BasePlus: F*B762F900EEFF7035880891D89416C0F973E4D377BCB75486283363A9BDADBA82
2026-02-02 14:06:24 +01:00
Bart Jablonski
d8f5b2ec91 The DFA package [ver. 0.5.9]
The DFA package [ver. 0.5.9]

Package regenerated with the latest version of the SPF.

- File SHA256: `F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08315DF0C49` for this version
- Content SHA256: `C*1818B4D524F779F2FB3A242D9E5BEEB592074A92D68135E18A660E594B214401` for this version
2026-02-02 14:05:18 +01:00
Bart Jablonski
75a1dcd287 The BasePlus package [ver. 3.1.3]
The BasePlus package [ver. 3.1.3]

Package regenerated with the latest version of the SPF.

- File SHA256: `F*B762F900EEFF7035880891D89416C0F973E4D377BCB75486283363A9BDADBA82` for this version
- Content SHA256: `C*1CB969446728CD3888BF7046E2463AA74F6A4B2634A0BD2EAD78ED6A526BA7F6` for this version
2026-02-02 14:04:26 +01:00
Bart Jablonski
3fbc55c01c SAS Packages Framework, version 20260202
SAS Packages Framework, version 20260202

Changes:

-If the `hash=` parameter is not provided the %verifyPackage() macro prints SHA256, SHA1, and MD5 hashes to the log now.
- Small fix in the %unbundlePackage() macro.
- Bunch general code simplifications.
- Documentation updated.
2026-02-02 13:06:45 +01:00
Bart Jablonski
1668cfe6e4 Merge pull request #124 from yabwon/main
SAS Packages Framework, version 20260125
2026-01-25 12:18:13 +01:00
Bart Jablonski
ff1be76f9d Merge pull request #123 from yabwon/main
SAS Packages Framework, version 20251231
2025-12-31 15:43:03 +01:00
Bart Jablonski
0f7babea91 Merge pull request #122 from yabwon/main
SAS Packages Framework, version 20251221
2025-12-21 22:06:53 +01:00
Bart Jablonski
3c29e9eb9c Merge pull request #121 from yabwon/main
SAS Packages Framework, version 20251221
2025-12-21 21:33:27 +01:00
Bart Jablonski
37419f1826 Merge pull request #119 from yabwon/main
SAS Packages Framework, version 20251126
2025-11-26 21:22:49 +01:00
Bart Jablonski
f61e68490a Merge pull request #118 from yabwon/main
SAS Packages Framework, version 20251122
2025-11-22 13:20:08 +01:00
Bart Jablonski
b8d5f286d2 Merge pull request #117 from yabwon/main
pull request
2025-11-21 11:15:45 +01:00
Bart Jablonski
8d8186fc78 Merge pull request #116 from yabwon/main
SAS Packages Framework, version 20251017
2025-10-19 21:54:35 +02:00
Bart Jablonski
1d83c65a9b Merge pull request #114 from yabwon/main
pull request
2025-09-09 22:46:31 +02:00
Bart Jablonski
e8d1269f6c Merge pull request #113 from yabwon/main
The BasePlus package [ver. 2.3.1]
2025-08-05 14:19:19 -04:00
Bart Jablonski
ba34a71ffe Merge pull request #112 from yabwon/main
SAS Packages Framework, version 20250729
2025-07-29 05:52:46 -04:00
Bart Jablonski
ff758fc2cc Merge pull request #111 from yabwon/main
SAS Packages Framework, version 20250728
2025-07-28 05:53:45 -04:00
Bart Jablonski
35b30ca45e Merge pull request #110 from yabwon/main
SAS Packages Framework, version 20250710
2025-07-10 08:04:33 -04:00
Bart Jablonski
bfdede5dd4 Merge pull request #109 from yabwon/main
update README.md
2025-06-11 13:32:59 -04:00
Bart Jablonski
856c73758f Merge pull request #108 from yabwon/main
SAS Packages Framework, version 20241207
2024-12-07 23:13:42 +01:00
Bart Jablonski
104c38ab2c Merge pull request #107 from yabwon/main
SAS Packages Framework, version 20241129
2024-11-29 17:08:10 +01:00
Bart Jablonski
9a7b81c2ad Merge pull request #106 from yabwon/main
SAS Packages Framework, version 20241102
2024-11-02 22:24:21 +01:00
Bart Jablonski
a56da0fa4f Merge pull request #105 from yabwon/main
SAS Packages Framework, version 20241027
2024-10-28 10:34:16 +01:00
Bart Jablonski
edeb1729b5 Merge pull request #104 from yabwon/main
SAS Packages Framework, version `20241014`
2024-10-14 21:44:37 +02:00
Bart Jablonski
9b2ec979e4 Merge pull request #103 from yabwon/main
SAS Packages Framework, version 20240927
2024-09-27 11:27:06 +02:00
Bart Jablonski
efda10b412 Merge pull request #102 from yabwon/main
The BasePlus package [ver. 2.0.1]
2024-07-24 08:11:27 +02:00
Bart Jablonski
78a79d1fc7 Merge pull request #101 from yabwon/main
The BasePlus package [ver. 2.0.0]
2024-07-23 22:17:14 +02:00
Bart Jablonski
e61a9689df Merge pull request #100 from yabwon/main
The BasePlus package [ver. 1.43.0]
2024-07-22 09:06:08 +02:00
Bart Jablonski
044019608f Merge pull request #99 from yabwon/main
The BasePlus package [ver. 1.42.1]
2024-07-19 10:30:22 +02:00
Bart Jablonski
fedf5b894d Merge pull request #98 from yabwon/main
SAS Packages Framework, version `20240711`
2024-07-11 14:59:42 +02:00
Bart Jablonski
3c30e7d17c Merge pull request #97 from yabwon/main
The BasePlus package [ver. 1.42.0]
2024-07-10 23:09:57 +02:00
Bart Jablonski
a99b75ffe9 Merge pull request #96 from yabwon/main
The BasePlus package [ver. 1.40.0]
2024-06-06 22:23:23 +02:00
Bart Jablonski
e7357877f0 Merge pull request #95 from yabwon/main
SAS Packages Framework, version `20240529`
2024-05-29 16:39:15 +02:00
Bart Jablonski
05946c92ce Merge pull request #94 from yabwon/main
SAS Packages Framework, version 20240423
2024-04-23 11:33:44 +02:00
Bart Jablonski
b3b36174af Merge pull request #93 from yabwon/main
SAS Packages Framework, version 20240415
2024-04-15 19:33:16 +02:00
Bart Jablonski
62fd354c6d SAS Packages Framework, version 20240415
SAS Packages Framework, version 20240415

Features:

- In the `%generatePackage()` macro, when `markdownDoc=` parameters is used, package files can be "excluded" from being used to produce documentation markdown file.

- Documentation updated.
2024-04-15 19:24:07 +02:00
Bart Jablonski
7f97b47a21 Merge pull request #92 from yabwon/main
The BasePlus package [ver. 1.38.0]
2024-03-12 14:48:52 +01:00
Bart Jablonski
340d13e56f Merge pull request #91 from yabwon/main
The BasePlus package [ver. 1.37.0]
2024-03-09 13:57:50 +01:00
Bart Jablonski
d68697ea77 Merge pull request #90 from yabwon/main
SAS Packages Framework, version 20231210
2023-12-12 11:54:30 +01:00
Bart Jablonski
9bb8354faa Merge pull request #88 from yabwon/main
The macroArray package [ver. 1.2.6]
2023-12-01 12:56:02 +01:00
Bart Jablonski
d0ff15fe80 Merge pull request #87 from yabwon/main
SAS Packages Framework, version `20231123`
2023-11-29 17:07:12 +01:00
Bart Jablonski
fe70185832 Merge pull request #86 from yabwon/main
The BasePlus package [ver. 1.35.0]
2023-11-14 14:45:52 +01:00
Bart Jablonski
83bef9fe30 Merge pull request #85 from yabwon/main
The BasePlus package [ver. 1.35.0]
2023-11-14 14:38:31 +01:00
Bart Jablonski
fd0a67de4e Merge pull request #84 from yabwon/main
SAS Packages Framework, version `20231107`
2023-11-07 12:41:48 +01:00
Bart Jablonski
60405c2226 Merge pull request #83 from yabwon/main
The BasePlus package [ver. 1.32.0]
2023-10-26 13:49:52 +02:00
Bart Jablonski
b6c554d994 Merge pull request #82 from yabwon/main
SAS Packages Framework version 20231024
2023-10-24 14:52:38 +02:00
Bart Jablonski
b7ce4778bb Merge pull request #81 from yabwon/main
SAS Packages Framework version 20231009
2023-10-09 18:06:42 +02:00
Bart Jablonski
956cfce026 Merge pull request #80 from yabwon/main
The BasePlus package [ver. 1.30.0]
2023-09-19 17:45:24 +02:00
Bart Jablonski
2c1a7eacc3 Merge pull request #79 from yabwon/main
The macroArray package [ver. 1.1.0]
2023-09-06 23:11:22 +02:00
Bart Jablonski
1a6f0c0013 Merge pull request #78 from yabwon/main
SAS Packages Framework, version `20230904`
2023-09-04 16:44:32 +02:00
Bart Jablonski
8a30b5a918 Merge pull request #77 from yabwon/main
The BasePlus package [ver. 1.29.0]
2023-08-24 11:33:19 +02:00
Bart Jablonski
b209d022b3 Merge pull request #76 from yabwon/main
The GSM package [ver. 0.21.0]
2023-07-27 11:15:52 +02:00
Bart Jablonski
680c021f72 Merge pull request #75 from yabwon/main
The BasePlus package [ver. 1.26.1]
2023-06-02 11:43:43 +02:00
Bart Jablonski
ad15aa0e3b Merge pull request #74 from yabwon/main
The BasePlus package [ver. 1.26.0]
2023-06-01 17:51:17 +02:00
Bart Jablonski
b78dac17e7 Merge pull request #73 from yabwon/main
The BasePlus package [ver. 1.26.0]
2023-06-01 17:05:47 +02:00
Bart Jablonski
974f617772 Merge pull request #72 from yabwon/main
The BasePlus package [ver. 1.24.2]
2023-05-26 11:19:27 +02:00
Bart Jablonski
5550b0d1de Merge pull request #71 from yabwon/main
SAS Packages Framework, version 20230520
2023-05-20 17:37:21 +02:00
Bart Jablonski
0979066509 Merge pull request #70 from yabwon/main
pull request
2023-05-03 23:06:54 +02:00
Bart Jablonski
344619d195 Merge pull request #69 from yabwon/main
The BasePlus package [ver. 1.20.0]
2023-04-17 14:58:51 +02:00
Bart Jablonski
a7c6a670bf Merge pull request #68 from yabwon/main
SAS Packages Framework, version 20230411
2023-04-11 18:41:16 +02:00
Bart Jablonski
01513d9cdb Merge pull request #67 from yabwon/main
Pull request
2023-04-02 18:37:25 +02:00
Bart Jablonski
62ad0c1045 Merge pull request #66 from yabwon/main
SAS Packages Framework, version 20230207
2023-02-07 18:09:36 +01:00
Bart Jablonski
be6d41ae7d Merge pull request #65 from yabwon/main
SAS Packages Framework, version 20230112
2023-01-12 17:30:31 +01:00
Bart Jablonski
c92edcbbd6 Merge pull request #64 from yabwon/main
SAS Packages Framework, version 20221215
2022-12-15 18:09:02 +01:00
Bart Jablonski
b6f9a65f5f Merge pull request #63 from yabwon/main
SAS Packages Framework, version 20221212
2022-12-12 23:45:30 +01:00
Bart Jablonski
d8451c08bc Merge pull request #62 from yabwon/main
SAS Packages Framework, version 20221125
2022-11-26 23:53:51 +01:00
Bart Jablonski
565d7d3f6e Merge pull request #61 from yabwon/main
SAS Packages Framework, version 20221121
2022-11-21 14:31:45 +01:00
Bart Jablonski
f2a72739c7 Merge pull request #60 from yabwon/main
Bunch of small updates
2022-11-13 20:20:30 +01:00
Bart Jablonski
394aaab3be Merge pull request #59 from yabwon/main
SAS Packages Framework, version 20221112
2022-11-12 17:31:22 +01:00
Bart Jablonski
88e97ecd7f Merge pull request #58 from yabwon/main
SAS Packages Framework, version 20221107
2022-11-07 10:48:49 +01:00
Bart Jablonski
ebcad71357 Merge pull request #57 from yabwon/main
SAS Packages Framework, ver. 20221022
2022-10-22 22:19:56 +02:00
Bart Jablonski
e9e3518b6a Merge pull request #56 from yabwon/main
SAS Packages Framework, version 20221002
2022-10-01 12:15:38 +02:00
Bart Jablonski
e17c325e5c Merge pull request #55 from yabwon/main
SAS Packages Framework, version 20221001
2022-10-01 01:11:49 +02:00
Bart Jablonski
6891d9d4c6 Merge pull request #54 from yabwon/main
**SAS Packages Framework**, version 20220930.
2022-09-30 20:42:38 +02:00
Bart Jablonski
1f093a749b Merge pull request #53 from yabwon/main
SAS Packages Framework, version 20220925, extension
2022-09-28 22:45:35 +02:00
Bart Jablonski
9331fa488d Merge pull request #52 from yabwon/main
SAS Packages Framework, version 20220925
2022-09-25 19:17:41 +02:00
Bart Jablonski
6194dcb2a0 Merge pull request #51 from yabwon/main
pull request
2022-08-30 19:18:39 +02:00
Bart Jablonski
bbd018bf61 Merge pull request #49 from yabwon/main
The SAS Packages Framework, version 20220830:
2022-08-30 19:07:19 +02:00
Bart Jablonski
f3b3b55dba Merge pull request #48 from yabwon/main
Innitiative to add SAS Packages Framework to SAS Base/Viya
2022-05-31 21:55:22 +02:00
Bart Jablonski
bd3a78adfd Merge pull request #47 from yabwon/main
The BasePlus package [ver. 1.17]
2022-05-11 23:48:25 +02:00
Bart Jablonski
6487d74aaf Merge pull request #46 from yabwon/main
The BasePlus package [ver. 1.16]
2022-05-09 19:07:45 +02:00
Bart Jablonski
4c734caeec Merge pull request #45 from yabwon/main
The BasePlus package [ver. 1.15]
2022-05-08 19:18:26 +02:00
Bart Jablonski
11400fe51d Merge pull request #44 from yabwon/main
**SAS Packages Framework**, version 20220420
2022-04-20 22:40:24 +02:00
Bart Jablonski
6e5d4c3872 Merge pull request #43 from yabwon/main
The GSM package [ver. 0.20]
2022-04-06 18:15:35 +02:00
Bart Jablonski
3ccf2490e1 Merge pull request #42 from yabwon/main
The GSM package [ver. 0.19]
2022-03-13 20:45:35 +01:00
Bart Jablonski
9273e80a16 Merge pull request #41 from yabwon/main
The GSM package [ver. 0.18]
2022-03-07 16:46:02 +01:00
Bart Jablonski
5cbe17b513 Merge pull request #40 from yabwon/main
pull request
2022-02-17 14:25:47 +01:00
Bart Jablonski
21a713ced7 Merge pull request #39 from yabwon/main
**SAS Packages Framework**, version 20220113
2022-01-13 17:01:35 +01:00
Bart Jablonski
0af4000d33 Merge pull request #38 from yabwon/main
BasePlus package [ver. 1.14]
2022-01-11 14:10:58 +01:00
Bart Jablonski
ae423c362b Merge pull request #37 from yabwon/main
BasePlus package [ver. 1.13]
2022-01-11 11:07:18 +01:00
Bart Jablonski
705a600534 Merge pull request #36 from yabwon/main
Package MacroArray, version 0.9
2021-12-28 18:34:13 +01:00
Bart Jablonski
2137c04534 Merge pull request #35 from yabwon/main
pull request
2021-12-16 10:41:37 +01:00
Bart Jablonski
49bcb64e51 Merge pull request #34 from yabwon/main
SAS Packages Framework, version 220211216
2021-12-16 10:19:42 +01:00
Bart Jablonski
8bdf820958 Merge pull request #31 from yabwon/main
Package BasePlus, version 1.12
2021-11-23 12:52:43 +01:00
Bart Jablonski
2045048ff3 Merge pull request #30 from yabwon/main
Package BasePlus, version 1.11
2021-11-19 17:09:53 +01:00
Bart Jablonski
f4007a22df Merge pull request #29 from yabwon/main
Package BasePlus, version 1.1
2021-11-14 16:14:43 +01:00
Bart Jablonski
96952896a2 Merge pull request #28 from yabwon/main
Package BasePlus, version 1.0
2021-11-13 22:55:51 +01:00
Bart Jablonski
f886a42b77 Merge pull request #27 from yabwon/main
pull request
2021-11-12 13:59:57 +01:00
Bart Jablonski
612e955983 Merge pull request #26 from yabwon/main
Package GSM, version 0.16
2021-11-12 11:14:29 +01:00
Bart Jablonski
907ad0865d Merge pull request #25 from yabwon/main
SAS Packages Framework, version 20211111
2021-11-10 20:25:29 +01:00
Bart Jablonski
9d37f157c7 Merge pull request #24 from yabwon/main
**GSM** (Generate Secure Macros) package, version 0.15
2021-11-05 13:50:47 +01:00
Bart Jablonski
f5159f9557 Merge pull request #23 from yabwon/main
BasePlus, version 0.994
2021-10-05 12:09:11 +02:00
Bart Jablonski
033961fba2 Merge pull request #22 from yabwon/main
pull request
2021-10-01 21:23:48 +02:00
Bart Jablonski
1e31a9cec4 Merge pull request #21 from yabwon/main
pull request
2021-08-18 23:02:20 +02:00
Bart Jablonski
9f8560aa61 Merge pull request #20 from yabwon/main
pull request
2021-07-19 13:02:42 +02:00
Bart Jablonski
4599a6e06d Merge pull request #19 from yabwon/main
**SAS Packages Framework**, version 20210528
2021-05-28 14:54:27 +02:00
Bart Jablonski
28c8afac49 Merge pull request #18 from yabwon/main
pull request
2021-05-20 15:43:02 +02:00
Bart Jablonski
aac8a3ca0a Merge pull request #17 from yabwon/main
pull request
2021-05-16 21:46:47 +02:00
yabwon
82bb81624f Merge branch 'master' of https://github.com/yabwon/SAS_PACKAGES 2021-03-30 22:44:25 +02:00
Bart Jablonski
9bccf5b9f5 Merge pull request #16 from yabwon/main
pull reques
2021-03-30 22:43:03 +02:00
yabwon
cad068d931 Final version of SGF2021 article
Final version of SGF2021 article
2021-03-30 22:39:17 +02:00
Bart Jablonski
b9c280d983 Merge pull request #15 from yabwon/main
*SAS Packages Framework*, version 20210204
2021-02-04 13:44:09 +01:00
Bart Jablonski
ca72c14569 Merge pull request #14 from yabwon/main
pull request
2021-02-03 21:21:59 +01:00
Bart Jablonski
aa84650b42 Merge pull request #13 from yabwon/main
pull request
2021-01-22 17:00:32 +01:00
Bart Jablonski
60354ce484 Merge pull request #12 from yabwon/main
pull request
2021-01-17 21:13:38 +01:00
Bart Jablonski
793d0c7d6a Merge pull request #11 from yabwon/main
pull request
2021-01-09 21:03:09 +01:00
30 changed files with 373 additions and 267 deletions

View File

@@ -17,7 +17,7 @@ Don't forget to give the repository a **STAR** and become [stargazer](https://gi
### Current version:
**The latest version** of the **SAS Packages Framework** is **`20260126`**.
**The latest version** of the **SAS Packages Framework** is **`20260216`**.
---

View File

@@ -8,7 +8,7 @@
,packagesRef=packages
,ods= /* data set for report file */
)/
des='Macro to create a bundle of SAS packages, version 20260126. Run %bundlePackages(HELP) for help info.'
des='Macro to create a bundle of SAS packages, version 20260216. Run %bundlePackages(HELP) for help info.'
secure minoperator
;
@@ -25,7 +25,7 @@ secure minoperator
%put ### This is short help information for the `bundlePackages` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *create bundles* of SAS packages, version `20260126` #;
%put # Macro to *create bundles* of SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -6,7 +6,7 @@
when empty the "packages" value is used */
)/secure
/*** HELP END ***/
des = 'Macro to list directories pointed by "packages" fileref, version 20260126. Run %extendPackagesFileref(HELP) for help info.'
des = 'Macro to list directories pointed by "packages" fileref, version 20260216. Run %extendPackagesFileref(HELP) for help info.'
;
%if %QUPCASE(&packages.) = HELP %then
@@ -22,7 +22,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20260126
%put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20260126` #;
%put # Macro to list directories pointed by 'packages' fileref, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -3,7 +3,7 @@
Macro to generate SAS packages.
Version 20260126
Version 20260216
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -53,7 +53,7 @@
when empty takes buildLocation */
)/ secure minoperator
/*** HELP END ***/
des = 'Macro to generate SAS packages, version 20260126. Run %generatePackage() for help info.'
des = 'Macro to generate SAS packages, version 20260216. Run %generatePackage() for help info.'
;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do;
@@ -68,7 +68,7 @@ des = 'Macro to generate SAS packages, version 20260126. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #;
%put #------------------------------------------------------------------------------------#;
%put # #;
%put # Macro to generate SAS packages, version `20260126` #;
%put # Macro to generate SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -444,10 +444,10 @@ options NOquotelenmax NOstimer NOfullstimer;
*/
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* test if version is a number */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
v = "&packageVersion.";
version = coalesce(input(scan(v,1,".","M"), ?? best32.),0)*1e8
+ coalesce(input(scan(v,2,".","M"), ?? best32.),0)*1e4
@@ -950,7 +950,7 @@ title6 "MD5 hashed fileref of package lowcase name: &_PackageFileref_.";
title&_titleNumber_. "Package ZIP file location is: &buildLocation.";
%end;
footnote1 "SAS Packages Framework, version 20260126";
footnote1 "SAS Packages Framework, version 20260216";
proc print
data = &filesWithCodes.(drop=base build folderRef fileRef rc folderid _abort_ fileId additionalContent)
@@ -1775,7 +1775,7 @@ data _null_;
%end;
put +(-1) '`.;'''
/ ' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"'
/ ' !! '' %put with the SAS Packages Framework version 20260126.;'''
/ ' !! '' %put with the SAS Packages Framework version 20260216.;'''
/ ' !! '' %put ****************************************************************************;'''
/ ' !! '' %GOTO theEndOfTheMacro;'''
/ ' !! '' %end;''' ;
@@ -1939,7 +1939,7 @@ data _null_;
%end;
put +(-1) '`.; '' !!' /
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !! ' /
''' %put with the SAS Packages Framework version 20260126.; '' !! ' /
''' %put with the SAS Packages Framework version 20260216.; '' !! ' /
''' %put ****************************************************************************; '' !! ' /
''' %GOTO theEndOfTheMacro; '' !! ' /
''' %end; '' !! ' /
@@ -2179,6 +2179,7 @@ data _null_;
packageRequired = quote(strip(packageRequired));
%end;
put '%if (%str(*)=%superq(cherryPick)) %then %do;'; /* cherryPick 4 ---*/
put "proc fcmp outlib = work.&packageName.fcmp.packagemeta ; "
/ " function &packageName.META(meta $) $ 32767;"
/ ' m = char(upcase(meta),1);'
@@ -2211,7 +2212,7 @@ data _null_;
/ '%if %superq(meta) = %then %return;'
/ '%do;%qsysfunc(strip(%qsysfunc(' "&packageName.META" '&syspbuff.)))%end;'
/ '%mend;' / /;
put '%end;'; /* cherryPick 4 ---*/
/*==========================================================================================*/
/* list cmplib for functions and fmtsearch for formats*/
@@ -2271,7 +2272,7 @@ data _null_;
put 'options NOTES;'
/ '%put NOTE- ;'
/ '%put NOTE: '"Loading package &packageName., version "'%'"&packageName.META(V), license &packageLicense.;"
/ '%put NOTE: '"Loading package &packageName., version &packageVersion., license &packageLicense.;"
/ '%put NOTE- *** END ***;' /;
put 'options &temp_noNotes_etc.;'
@@ -2810,7 +2811,7 @@ data _null_;
%end;
put 'put " " / @3 "---------------------------------------------------------------------" / " ";'
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20260126`*";'
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20260216`*";'
/ "put @3 '*under `&sysscp.`(`&sysscpl.`) operating system,*';"
/ "put @3 '*using SAS release: `&sysvlong4.`.*';"
/ 'put " " / @3 "---------------------------------------------------------------------";';

View File

@@ -28,7 +28,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to get help about SAS package, version 20260126. Run %helpPackage() for help info.'
des = 'Macro to get help about SAS package, version 20260216. Run %helpPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -43,7 +43,7 @@ des = 'Macro to get help about SAS package, version 20260126. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get help about SAS packages, version `20260126` #;
%put # Macro to get help about SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -133,18 +133,20 @@ des = 'Macro to get help about SAS package, version 20260126. Run %helpPackage()
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");

View File

@@ -1,5 +1,5 @@
/*+installPackage+*/
/* Macros to install SAS packages, version 20260126 */
/* Macros to install SAS packages, version 20260216 */
/* 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
@@ -26,7 +26,7 @@
/secure
minoperator
/*** HELP END ***/
des = 'Macro to install SAS package, version 20260126. Run %%installPackage() for help info.'
des = 'Macro to install SAS package, version 20260216. Run %%installPackage() for help info.'
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do;
@@ -41,7 +41,7 @@ des = 'Macro to install SAS package, version 20260126. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to install SAS packages, version `20260126` #;
%put # Macro to install SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -4,7 +4,7 @@
vERRb /* indicates if macro should be verbose and report errors */
)
/ minoperator PARMBUFF
des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFilerefOK(HELP) for help, version 20260126.'
des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFilerefOK(HELP) for help, version 20260216.'
;
/*** HELP END ***/
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
@@ -20,7 +20,7 @@ des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFile
%put ### This is short help information for the `isPackagesFilerefOK` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to check if the `packages` fileref is "correct", version `20260126` #;
%put # Macro to check if the `packages` fileref is "correct", version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -3,7 +3,7 @@
Macro to list SAS packages in packages folder.
Version 20260126
Version 20260216
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -25,7 +25,7 @@
listDataSet /* Name of a data set to save results */
, quiet = 0 /* Indicate if results should be printed in log */
)/secure parmbuff
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20260126.'
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20260216.'
;
%if (%QUPCASE(&listDataSet.) = HELP) %then
%do;
@@ -40,7 +40,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 `20260126` #;
%put # Macro to list available SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -250,7 +250,7 @@ run;
%if 0=&quiet. %then
%do;
%put %str( );
%put # Results ptovided in the &listDataSet. data set. #;
%put # Results provided in the &listDataSet. data set. #;
%put %str( );
%end;
%end;

View File

@@ -36,7 +36,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to load SAS package, version 20260126. Run %loadPackage() for help info.'
des = 'Macro to load SAS package, version 20260216. Run %loadPackage() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -52,7 +52,7 @@ minoperator
%put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *load* SAS packages, version `20260126` #;
%put # Macro to *load* SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -180,30 +180,34 @@ minoperator
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");
run;
/*run;*/ /* moved to line 272 */
/* convert cherryPick to lower case if needed */
%if NOT (%str(*) = %superq(cherryPick)) %then
%do;
data _null_;
/*data _null_;*/
call symputX("cherryPick",lowcase(compbl(compress(symget("cherryPick"),". _","KDA"))),"L");
run;
/*run;*/
%end;
run;
/* empty list is equivalent to "*" */
%if %superq(cherryPick)= %then
%do;

View File

@@ -19,7 +19,7 @@
is provided in required version */
)/secure
/*** HELP END ***/
des = 'Macro to load additional content for a SAS package, version 20260126. Run %loadPackageAddCnt() for help info.'
des = 'Macro to load additional content for a SAS package, version 20260216. Run %loadPackageAddCnt() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -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 `20260126` #;
%put # Macro to *load* additional content for a SAS package, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -116,20 +116,22 @@ minoperator
options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc;
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "A" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
call symputX("_TargetFileref_", "T" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
data _null_;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "A" !! put(MD5(strip(packageName)), hex7. -L), "L");
call symputX("_TargetFileref_", "T" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");

View File

@@ -11,7 +11,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20260126. Run %loadPackages() for help info.'
des = 'Macro to load multiple SAS packages at one run, version 20260216. Run %loadPackages() for help info.'
parmbuff
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
@@ -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 `20260126` #;
%put # Macro wrapper for the loadPackage macro, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -23,7 +23,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20260126. Run %previewPackage() for help info.'
des = 'Macro to preview content of a SAS package, version 20260216. Run %previewPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -38,7 +38,7 @@ des = 'Macro to preview content of a SAS package, version 20260126. Run %preview
%put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get preview of a SAS packages, version `20260126` #;
%put # Macro to get preview of a SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -119,18 +119,20 @@ des = 'Macro to preview content of a SAS package, version 20260126. Run %preview
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");

View File

@@ -15,7 +15,7 @@
,psMAX=MAX /* pageSise in case executed inside DoSubL() */
,ods= /* a data set for results, e.g., work.relocatePackageReport */
)
/ des = 'Utility macro that locally Copies or Moves Packages, version 20260126. Run %relocatePackage() for help info.'
/ des = 'Utility macro that locally Copies or Moves Packages, version 20260216. Run %relocatePackage() for help info.'
secure
minoperator
;
@@ -33,7 +33,7 @@
%put ### This is short help information for the `relocatePackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *locally copy or move* (relocate) SAS packages, version `20260126` #;
%put # Macro to *locally copy or move* (relocate) SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -5,7 +5,7 @@ SPFmacroName /* space separated list of names */
/
minoperator
secure
des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260126. Run %SasPackagesFrameworkNotes(HELP) for help info.'
des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260216. Run %SasPackagesFrameworkNotes(HELP) for help info.'
;
%local list N i element;
%let list=
@@ -51,7 +51,7 @@ SasPackagesFrameworkNotes
%put ### This is short help information for the `SasPackagesFrameworkNotes` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro prints help notes for SAS Packages Framework macros, version `20260126` #;
%put # Macro prints help notes for SAS Packages Framework macros, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -1,6 +1,6 @@
/*+SPFint_gnPckg_arch+*/
%macro SPFint_gnPckg_arch()/secure minoperator
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the archive version generation part of the process. Version 20260126.';
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the archive version generation part of the process. Version 20260216.';
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
%do;

View File

@@ -1,6 +1,6 @@
/*+SPFint_gnPckg_markdown+*/
%macro SPFint_gnPckg_markdown()/secure minoperator
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the markdown documentation part of the process. Version 20260126.';
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the markdown documentation part of the process. Version 20260216.';
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
%do;
@@ -112,7 +112,7 @@ data &filesWithCodes.markdown;
%end;
put " " / "---------------------------------------------------------------------" / " "
/ "*SAS package generated by SAS Package Framework, version `20260126`,*"
/ "*SAS package generated by SAS Package Framework, version `20260216`,*"
/ "*under `&sysscp.`(`&sysscpl.`) operating system,*"
/ "*using SAS release: `&sysvlong4.`.*"
/ " " / "---------------------------------------------------------------------" / " ";

View File

@@ -1,6 +1,6 @@
/*+SPFint_gnPckg_tests+*/
%macro SPFint_gnPckg_tests()/secure minoperator
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the test part of the process. Version 20260126.';
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the test part of the process. Version 20260216.';
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
%do;
@@ -85,6 +85,10 @@ run;
@n '%put >>>%'"&packageName."'META(P)<<<;'/
@n '%put >>>%'"&packageName."'META(S)<<<;'/;
/* verify */
put @n '%verifyPackage'"(&packageName.,";
put @n " path=&buildLocation.)" /;
/* help */
put @n '%helpPackage'"(&packageName.,";
put @n " path=&buildLocation.)" /;
@@ -317,6 +321,10 @@ data _null_;
'%put >>req packages>%'"&packageName."'META(P)<<<;'/
'%put >>req SAS >%'"&packageName."'META(S)<<<;'/;
/* verify */
put '%verifyPackage'"(&packageName.,";
put " path=&buildLocation.)" /;
/* help */
put '%helpPackage'"(&packageName.,"
/ " path=&buildLocation.)" /;

View File

@@ -8,7 +8,7 @@
,nobs=0 /* technical parameter */
)
/*** HELP END ***/
/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260126. Run %splitCodeForPackage() for help info.'
/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260216. Run %splitCodeForPackage() for help info.'
;
%if (%superq(codeFile) = ) OR (%qupcase(&codeFile.) = HELP) %then
%do;
@@ -24,7 +24,7 @@
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Utility macro to *split* single file with SAS package code into multiple #;
%put # files with separate snippets, version `20260126` #;
%put # files with separate snippets, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -400,7 +400,7 @@ options nomprint nosymbolgen nomlogic notes source ls=MAX ps=MAX msglevel=N ;
*/
if firstLine[j] then
do;
put '/* File generated with help of SAS Packages Framework, version 20260126. */';
put '/* File generated with help of SAS Packages Framework, version 20260216. */';
firstLine[j]=0;
end;
put _infile_;

View File

@@ -8,7 +8,7 @@
,ods= /* data set for report file */
,verify=0
)/
des='Macro to extract a bundle of SAS packages, version 20260126. Run %unbundlePackages(HELP) for help info.'
des='Macro to extract a bundle of SAS packages, version 20260216. Run %unbundlePackages(HELP) for help info.'
secure
minoperator
;
@@ -26,7 +26,7 @@ minoperator
%put ### This is short help information for the `unbundlePackages` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *extract* SAS packages from a bundle, version `20260126` #;
%put # Macro to *extract* SAS packages from a bundle, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -128,11 +128,10 @@ minoperator
%let datetime = %sysfunc(datetime());
%let reportFile = WORK.tmpbundlefile%sysfunc(int(&datetime.), b8601dt15.)_;
data _null_ ;
data _null_;
datetime=symgetn('datetime');
length packagesList $ 32767 bundleName $ 128;
bundleName = compress(symget('bundleName'),"_.","KAD"); /* bundle name is letters, digits, and underscore, up to 128 symbols */
if bundleName NE symget('bundleName') then /* warn about illegal characters */
@@ -140,12 +139,12 @@ if bundleName NE symget('bundleName') then /* warn about illegal characters */
put "ERROR: Bundle name contains illegal characters. Exiting";
stop;
end;
bundleName=lowcase(bundleName);
lbn = length(bundleName); /* to cover lengths < 7 & 11 */
/* if there is ".bundle.zip" extension added, remove it */
if substr(strip(reverse(bundleName)),1,11) = 'piz.eldnub.' then bundleName=scan(bundleName,-3,".");
if substr(strip(reverse(bundleName)),1,min(11,lbn)) = 'piz.eldnub.' then bundleName=scan(bundleName,-3,".");
else /* if there is ".bundle" extension added, remove it */
if substr(strip(reverse(bundleName)),1,7) = 'eldnub.' then bundleName=scan(bundleName,-2,".");
if substr(strip(reverse(bundleName)),1,min(7,lbn)) = 'eldnub.' then bundleName=scan(bundleName,-2,".");
put / "INFO: Bundle name is: " bundleName / ;
@@ -153,7 +152,6 @@ length packagesPath $ 32767 packagesRef $ 8;
packagesPath = dequote(symget('packagesPath'));
packagesRef = upcase(strip(symget('packagesRef')));
/* organize target path (location for packages) */
if " "=packagesPath then
do;
@@ -281,7 +279,6 @@ label package="Package name"
hash="SHA256 for the Package";
/*--------------------------------------------------*/
if 0=Q.NUM_ITEMS then /* ... if empty then exit */
do;
put "WARNING: No packages to unbundle. Exiting!";
@@ -320,7 +317,6 @@ put / "INFO: The " bundleName "bundle extraction ended.";
rc = doSubL(code2);
put / "INFO: The " bundleName "bundle verification ended.";
%end;
put " ";
rc=sleep(1,1);

View File

@@ -20,7 +20,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to unload SAS package, version 20260126. Run %unloadPackage() for help info.'
des = 'Macro to unload SAS package, version 20260216. Run %unloadPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -35,7 +35,7 @@ des = 'Macro to unload SAS package, version 20260126. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to unload SAS packages, version `20260126` #;
%put # Macro to unload SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -115,18 +115,20 @@ des = 'Macro to unload SAS package, version 20260126. Run %unloadPackage() for h
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");

View File

@@ -8,12 +8,12 @@
, path = %sysfunc(pathname(packages)) /* location of a package,
by default it looks for
location of "packages" fileref */
, hash = /* The SHA256 hash digest for
, hash = F* /* The SHA256 hash digest for
the package generated by
hashing_file() function, SAS 9.4M6 */
)/secure
/*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %verifyPackage() for help info.'
des = 'Macro to verify SAS package with the hash digest, version 20260216. Run %verifyPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -28,7 +28,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
%put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to verify SAS package with it hash digest, version `20260126` #;
%put # Macro to verify SAS package with it hash digest, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -48,7 +48,9 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
%put # If empty displays this help information. #;
%put # #;
%put # - `hash=` A value of the package `SHA256` hash. #;
%put # Provided by the user. #;
%put # Provided by the user. When the value is not provided #;
%put # then macro calculates `SHA256`, `SHA1`, and `MD5` #;
%put # digests and display then in the log. #;
%put # #;
%put # - `path=` Location of a package. By default it looks for #;
%put # location of the "packages" fileref, i.e. #;
@@ -76,7 +78,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
%put ;
%put %nrstr( %%installPackage(SQLinDS) %%* install the package from the Internet; );
%put %nrstr( %%verifyPackage%(SQLinDS, %%* verify the package with provided hash; );
%put %nrstr( hash=HDA478ANJ3HKHRY327FGE88HF89VH89HFFFV73GCV98RF390VB4%) );
%put %nrstr( hash=HDA478ANJ3HKHRY327FGE88HF89VH89HFFFV73GCV98RF390VB4%) );
%put ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
%put #################################################################################;
%put ;
@@ -97,19 +99,21 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc;
%local _PackageFileref_ checkExist;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
data _null_;
length packageName $ 140;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".zip")); /* check on zip files only! */
exists + fileexist(catx("/", p, cats(packageName,".zip"))); /* check on zip files only! */
if exists then leave;
end;
if exists then call symputx("path", p, "L");
@@ -142,31 +146,60 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
filename &_PackageFileref_. list;
data _null_;
length providedHash $ 128;
length providedHash $ 128 packageName $ 140;
providedHash = strip(symget("hash"));
select;
when ( 'F*' = upcase(substr(providedHash,1,2)) ) /* F = file digest */
SHA256 = 'F*' !! HASHING_FILE("SHA256", pathname("&_PackageFileref_.",'F'), 0);
when ( 'C*' = upcase(substr(providedHash,1,2)) ) /* C = content digest */
SHA256 = 'C*' !! HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
otherwise /* legacy approach, without C or F, digest value equivalent to C */
SHA256 = HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
end;
put "Provided Hash: " providedHash;
put "SHA256 digest: " SHA256;
put " ";
if upcase(SHA256) = upcase(providedHash) then
do;
put "NOTE: Package verification SUCCESSFUL.";
put "NOTE- Generated hash is EQUAL to the provided one.";
packageName = strip(symget("packageName"));
emptyHash = (providedHash = " " OR providedHash in ("F*" "f*" "C*" "c*"));
put 82*"-" / @2 packageName / 82*"-" /;
if NOT emptyHash then put "Provided Hash: " providedHash;
length method $ 8 digest $ 128;
/* calculate SHA256 */
method="SHA256";
LINK CalcualteHashDigest; /* go to Link 1 */
if NOT emptyHash then
do; /* step for veryfication */
if upcase(digest) = upcase(providedHash) then
do;
put "NOTE: Verification SUCCESSFUL."
/ "NOTE- Generated hash is EQUAL to the provided one." / ;
end;
else
do;
pos = 0;
do i = 1 to max(lengthn(digest),lengthn(providedHash)) while(pos=0);
if char(digest,i) NE char(providedHash,i) then pos = i;
end;
put "ERROR- " @(pos+15)"^"/"ERROR- " @(pos+15)"| diff @" pos/"ERROR- ";
put "ERROR: Verification FAILED!!"
/ "ERROR- Generated hash is DIFFERENT than the provided one."
/ "ERROR- Check if the ZIP is genuine." / ;
end;
end;
else
do;
put "ERROR: Package verification FAILED!!";
put "ERROR- Generated hash is DIFFERENT than the provided one.";
put "ERROR- Confirm if the package is genuine.";
do method = "SHA1", "MD5"; /* step for digest display, calcualte also SHA1 and MD5 */
LINK CalcualteHashDigest; /* go to Link 1 */
end;
put 82*"-" /;
stop;
return;
CalcualteHashDigest: /* Link 1 */
select;
when ( 'F*' = upcase(substr(providedHash,1,2)) ) /* F = file digest */
digest = 'F*' !! HASHING_FILE(method, pathname("&_PackageFileref_.",'F'), 0);
when ( 'C*' = upcase(substr(providedHash,1,2)) ) /* C = content digest */
digest = 'C*' !! HASHING_FILE(method, "&_PackageFileref_.", 4);
otherwise /* legacy approach, without C or F, digest value equivalent to C */
digest = HASHING_FILE(method, "&_PackageFileref_.", 4);
end;
put method "digest: " digest /;
return;
run;
%let HASHING_FILE_exist = 0;
%end;

View File

@@ -1,7 +1,7 @@
---
# SAS Packages Framework, version `20260126`
# SAS Packages Framework, version `20260216`
---
@@ -34,7 +34,7 @@ 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.
In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20260126`**.
In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20260216`**.
**To get started with SAS Packages** try this [**`Introduction to SAS Packages`**](https://youtube.com/playlist?list=PLeMzGEImIT5eV13IGXQIgWmTFCJt_cLZG&si=ElQm0_ifq76mvUbq "Introduction to SAS Packages video series") video series or [**`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).
@@ -57,7 +57,7 @@ them using the SPF can be found [**HERE**](https://github.com/yabwon/HoW-SASPack
## This is short help information for the `installPackage` macro <a name="installpackage"></a>
--------------------------------------------------------------------------------------------
Macro to install SAS packages, version `20260126`
Macro to install SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -185,7 +185,7 @@ filename packages "C:/SAS_PACKAGES";
## This is short help information for the `helpPackage` macro <a name="helppackage"></a>
-------------------------------------------------------------------------------
Macro to get help about SAS packages, version `20260126`
Macro to get help about SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -263,7 +263,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `loadPackage` macro <a name="loadpackage"></a>
-------------------------------------------------------------------------------
Macro to *load* SAS packages, version `20260126`
Macro to *load* SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -421,7 +421,7 @@ If created, those macros are automatically deleted when the `%unloadPackage()` m
## This is short help information for the `loadPackageS` macro <a name="loadpackages"></a>
-------------------------------------------------------------------------------
Macro wrapper for the loadPackage macro, version `20260126`
Macro wrapper for the loadPackage macro, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -472,7 +472,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `unloadPackage` macro <a name="unloadpackage"></a>
-------------------------------------------------------------------------------
Macro to unload SAS packages, version `20260126`
Macro to unload SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -539,7 +539,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `listPackages` macro <a name="listpackages"></a>
-----------------------------------------------------------------------------------------
Macro to list available SAS packages, version `20260126`
Macro to list available SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -588,7 +588,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `verifyPackage` macro <a name="verifypackage"></a>
-------------------------------------------------------------------------------
Macro to verify SAS package with it hash digest, version `20260126`
Macro to verify SAS package with it hash digest, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -609,7 +609,9 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
If empty displays this help information.
- `hash=` A value of the package `SHA256` hash.
Provided by the user.
Provided by the user. When the value is not provided
then macro calculates `SHA256`, `SHA1`, and `MD5`
digests and display then in the log.
- `path=` Location of a package. By default it looks for
location of the "packages" fileref, i.e.
@@ -636,13 +638,13 @@ filename packages "C:/SAS_PACKAGES"; %* set-up a directory for packages;
%installPackage(SQLinDS) %* install the package from the Internet;
%verifyPackage(SQLinDS, %* verify the package with provided hash;
hash=HDA478ANJ3HKHRY327FGE88HF89VH89HFFFV73GCV98RF390VB4)
hash=HDA478ANJ3HKHRY327FGE88HF89VH89HFFFV73GCV98RF390VB4)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## This is short help information for the `previewPackage` macro <a name="previewpackage"></a>
-------------------------------------------------------------------------------
Macro to get preview of a SAS packages, version `20260126`
Macro to get preview of a SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -711,7 +713,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `generatePackage` macro <a name="generatepackage"></a>
-------------------------------------------------------------------------------
Macro to generate SAS packages, version `20260126`
Macro to generate SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -944,7 +946,7 @@ All files have to have `.sas` extension. Other files are ignored.
## This is short help information for the `extendPackagesFileref` macro <a name="extendpackagesfileref"></a>
-----------------------------------------------------------------------------------------
Macro to list directories pointed by 'packages' fileref, version `20260126`
Macro to list directories pointed by 'packages' fileref, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -986,7 +988,7 @@ filename packages ("D:/NEW_DIR" %extendPackagesFileref()); %* add new directory;
## This is short help information for the `loadPackageAddCnt` macro <a name="loadpackageaddcnt"></a>
-------------------------------------------------------------------------------
Macro to load *additional content* for a SAS package, version `20260126`
Macro to load *additional content* for a SAS package, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1080,7 +1082,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
-------------------------------------------------------------------------------
Utility macro to *split* single file with SAS package code into multiple
files with separate snippets, version `20260126`
files with separate snippets, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1161,7 +1163,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `relocatePackage` macro <a name="relocatepackage"></a>
-------------------------------------------------------------------------------
Macro to *locally copy or move* (relocate) SAS packages, version `20260126`
Macro to *locally copy or move* (relocate) SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1273,7 +1275,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `isPackagesFilerefOK` macro <a name="ispackagesfilerefok"></a>
-----------------------------------------------------------------------------------------
Macro to check if the `packages` fileref is "correct", version `20260126`
Macro to check if the `packages` fileref is "correct", version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1324,7 +1326,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `SasPackagesFrameworkNotes` macro <a name="saspackagesframeworknotes"></a>
-------------------------------------------------------------------------------
Macro prints help notes for SAS Packages Framework macros, version `20260126`
Macro prints help notes for SAS Packages Framework macros, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1374,7 +1376,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `bundlePackages` macro <a name="bundlepackages"></a>
-------------------------------------------------------------------------------
Macro to *create bundles* of SAS packages, version `20260126`
Macro to *create bundles* of SAS packages, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1443,7 +1445,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `unbundlePackages` macro <a name="unbundlepackages"></a>
-------------------------------------------------------------------------------
Macro to *extract* SAS packages from a bundle, version `20260126`
Macro to *extract* SAS packages from a bundle, version `20260216`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating

View File

@@ -43,7 +43,7 @@
- to unload, or
- to generate SAS packages.
Version 20260126.
Version 20260216.
See examples below.
A SAS package is a zip file containing a group of files
@@ -101,7 +101,7 @@ Contributors:
*/
)/secure
/*** HELP END ***/
des = 'Macro to load SAS package, version 20260126. Run %loadPackage() for help info.'
des = 'Macro to load SAS package, version 20260216. Run %loadPackage() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -117,7 +117,7 @@ minoperator
%put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *load* SAS packages, version `20260126` #;
%put # Macro to *load* SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -245,30 +245,34 @@ minoperator
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");
run;
/*run;*/ /* moved to line 272 */
/* convert cherryPick to lower case if needed */
%if NOT (%str(*) = %superq(cherryPick)) %then
%do;
data _null_;
/*data _null_;*/
call symputX("cherryPick",lowcase(compbl(compress(symget("cherryPick"),". _","KDA"))),"L");
run;
/*run;*/
%end;
run;
/* empty list is equivalent to "*" */
%if %superq(cherryPick)= %then
%do;
@@ -394,7 +398,7 @@ minoperator
*/
)/secure
/*** HELP END ***/
des = 'Macro to unload SAS package, version 20260126. Run %unloadPackage() for help info.'
des = 'Macro to unload SAS package, version 20260216. Run %unloadPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -409,7 +413,7 @@ des = 'Macro to unload SAS package, version 20260126. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to unload SAS packages, version `20260126` #;
%put # Macro to unload SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -489,18 +493,20 @@ des = 'Macro to unload SAS package, version 20260126. Run %unloadPackage() for h
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");
@@ -562,7 +568,7 @@ des = 'Macro to unload SAS package, version 20260126. Run %unloadPackage() for h
*/
)/secure
/*** HELP END ***/
des = 'Macro to get help about SAS package, version 20260126. Run %helpPackage() for help info.'
des = 'Macro to get help about SAS package, version 20260216. Run %helpPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -577,7 +583,7 @@ des = 'Macro to get help about SAS package, version 20260126. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get help about SAS packages, version `20260126` #;
%put # Macro to get help about SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -667,18 +673,20 @@ des = 'Macro to get help about SAS package, version 20260126. Run %helpPackage()
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");
@@ -720,7 +728,7 @@ TODO:
*/
/*+installPackage+*/
/* Macros to install SAS packages, version 20260126 */
/* Macros to install SAS packages, version 20260216 */
/* 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
@@ -747,7 +755,7 @@ TODO:
/secure
minoperator
/*** HELP END ***/
des = 'Macro to install SAS package, version 20260126. Run %%installPackage() for help info.'
des = 'Macro to install SAS package, version 20260216. Run %%installPackage() for help info.'
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do;
@@ -762,7 +770,7 @@ des = 'Macro to install SAS package, version 20260126. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to install SAS packages, version `20260126` #;
%put # Macro to install SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1414,7 +1422,7 @@ des = 'Macro to install SAS package, version 20260126. Run %%installPackage() fo
Macro to list SAS packages in packages folder.
Version 20260126
Version 20260216
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1436,7 +1444,7 @@ des = 'Macro to install SAS package, version 20260126. Run %%installPackage() fo
listDataSet /* Name of a data set to save results */
, quiet = 0 /* Indicate if results should be printed in log */
)/secure parmbuff
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20260126.'
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20260216.'
;
%if (%QUPCASE(&listDataSet.) = HELP) %then
%do;
@@ -1451,7 +1459,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 `20260126` #;
%put # Macro to list available SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1661,7 +1669,7 @@ run;
%if 0=&quiet. %then
%do;
%put %str( );
%put # Results ptovided in the &listDataSet. data set. #;
%put # Results provided in the &listDataSet. data set. #;
%put %str( );
%end;
%end;
@@ -1677,7 +1685,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
Macro to generate SAS packages.
Version 20260126
Version 20260216
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1727,7 +1735,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
when empty takes buildLocation */
)/ secure minoperator
/*** HELP END ***/
des = 'Macro to generate SAS packages, version 20260126. Run %generatePackage() for help info.'
des = 'Macro to generate SAS packages, version 20260216. Run %generatePackage() for help info.'
;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do;
@@ -1742,7 +1750,7 @@ des = 'Macro to generate SAS packages, version 20260126. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #;
%put #------------------------------------------------------------------------------------#;
%put # #;
%put # Macro to generate SAS packages, version `20260126` #;
%put # Macro to generate SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -2118,10 +2126,10 @@ options NOquotelenmax NOstimer NOfullstimer;
*/
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* test if version is a number */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
v = "&packageVersion.";
version = coalesce(input(scan(v,1,".","M"), ?? best32.),0)*1e8
+ coalesce(input(scan(v,2,".","M"), ?? best32.),0)*1e4
@@ -2624,7 +2632,7 @@ title6 "MD5 hashed fileref of package lowcase name: &_PackageFileref_.";
title&_titleNumber_. "Package ZIP file location is: &buildLocation.";
%end;
footnote1 "SAS Packages Framework, version 20260126";
footnote1 "SAS Packages Framework, version 20260216";
proc print
data = &filesWithCodes.(drop=base build folderRef fileRef rc folderid _abort_ fileId additionalContent)
@@ -3449,7 +3457,7 @@ data _null_;
%end;
put +(-1) '`.;'''
/ ' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"'
/ ' !! '' %put with the SAS Packages Framework version 20260126.;'''
/ ' !! '' %put with the SAS Packages Framework version 20260216.;'''
/ ' !! '' %put ****************************************************************************;'''
/ ' !! '' %GOTO theEndOfTheMacro;'''
/ ' !! '' %end;''' ;
@@ -3613,7 +3621,7 @@ data _null_;
%end;
put +(-1) '`.; '' !!' /
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !! ' /
''' %put with the SAS Packages Framework version 20260126.; '' !! ' /
''' %put with the SAS Packages Framework version 20260216.; '' !! ' /
''' %put ****************************************************************************; '' !! ' /
''' %GOTO theEndOfTheMacro; '' !! ' /
''' %end; '' !! ' /
@@ -3853,6 +3861,7 @@ data _null_;
packageRequired = quote(strip(packageRequired));
%end;
put '%if (%str(*)=%superq(cherryPick)) %then %do;'; /* cherryPick 4 ---*/
put "proc fcmp outlib = work.&packageName.fcmp.packagemeta ; "
/ " function &packageName.META(meta $) $ 32767;"
/ ' m = char(upcase(meta),1);'
@@ -3885,7 +3894,7 @@ data _null_;
/ '%if %superq(meta) = %then %return;'
/ '%do;%qsysfunc(strip(%qsysfunc(' "&packageName.META" '&syspbuff.)))%end;'
/ '%mend;' / /;
put '%end;'; /* cherryPick 4 ---*/
/*==========================================================================================*/
/* list cmplib for functions and fmtsearch for formats*/
@@ -3945,7 +3954,7 @@ data _null_;
put 'options NOTES;'
/ '%put NOTE- ;'
/ '%put NOTE: '"Loading package &packageName., version "'%'"&packageName.META(V), license &packageLicense.;"
/ '%put NOTE: '"Loading package &packageName., version &packageVersion., license &packageLicense.;"
/ '%put NOTE- *** END ***;' /;
put 'options &temp_noNotes_etc.;'
@@ -4484,7 +4493,7 @@ data _null_;
%end;
put 'put " " / @3 "---------------------------------------------------------------------" / " ";'
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20260126`*";'
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20260216`*";'
/ "put @3 '*under `&sysscp.`(`&sysscpl.`) operating system,*';"
/ "put @3 '*using SAS release: `&sysvlong4.`.*';"
/ 'put " " / @3 "---------------------------------------------------------------------";';
@@ -4923,7 +4932,7 @@ options &qlenmax_fstimer_tmp.;
/*+SPFint_gnPckg_tests+*/
%macro SPFint_gnPckg_tests()/secure minoperator
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the test part of the process. Version 20260126.';
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the test part of the process. Version 20260216.';
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
%do;
@@ -5008,6 +5017,10 @@ run;
@n '%put >>>%'"&packageName."'META(P)<<<;'/
@n '%put >>>%'"&packageName."'META(S)<<<;'/;
/* verify */
put @n '%verifyPackage'"(&packageName.,";
put @n " path=&buildLocation.)" /;
/* help */
put @n '%helpPackage'"(&packageName.,";
put @n " path=&buildLocation.)" /;
@@ -5240,6 +5253,10 @@ data _null_;
'%put >>req packages>%'"&packageName."'META(P)<<<;'/
'%put >>req SAS >%'"&packageName."'META(S)<<<;'/;
/* verify */
put '%verifyPackage'"(&packageName.,";
put " path=&buildLocation.)" /;
/* help */
put '%helpPackage'"(&packageName.,"
/ " path=&buildLocation.)" /;
@@ -5597,7 +5614,7 @@ options &quotelenmax_tmp.;
/*+SPFint_gnPckg_markdown+*/
%macro SPFint_gnPckg_markdown()/secure minoperator
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the markdown documentation part of the process. Version 20260126.';
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the markdown documentation part of the process. Version 20260216.';
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
%do;
@@ -5709,7 +5726,7 @@ data &filesWithCodes.markdown;
%end;
put " " / "---------------------------------------------------------------------" / " "
/ "*SAS package generated by SAS Package Framework, version `20260126`,*"
/ "*SAS package generated by SAS Package Framework, version `20260216`,*"
/ "*under `&sysscp.`(`&sysscpl.`) operating system,*"
/ "*using SAS release: `&sysvlong4.`.*"
/ " " / "---------------------------------------------------------------------" / " ";
@@ -5850,7 +5867,7 @@ options &MarkDownOptionsTmp.;
/*+SPFint_gnPckg_arch+*/
%macro SPFint_gnPckg_arch()/secure minoperator
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the archive version generation part of the process. Version 20260126.';
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the archive version generation part of the process. Version 20260216.';
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
%do;
@@ -6017,7 +6034,7 @@ TODO: (in Polish)
*/
)/secure
/*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20260126. Run %loadPackages() for help info.'
des = 'Macro to load multiple SAS packages at one run, version 20260216. Run %loadPackages() for help info.'
parmbuff
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
@@ -6033,7 +6050,7 @@ parmbuff
%put ### This is short help information for the `loadPackageS` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro wrapper for the loadPackage macro, version `20260126` #;
%put # Macro wrapper for the loadPackage macro, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -6126,12 +6143,12 @@ parmbuff
, path = %sysfunc(pathname(packages)) /* location of a package,
by default it looks for
location of "packages" fileref */
, hash = /* The SHA256 hash digest for
, hash = F* /* The SHA256 hash digest for
the package generated by
hashing_file() function, SAS 9.4M6 */
)/secure
/*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %verifyPackage() for help info.'
des = 'Macro to verify SAS package with the hash digest, version 20260216. Run %verifyPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -6146,7 +6163,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
%put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to verify SAS package with it hash digest, version `20260126` #;
%put # Macro to verify SAS package with it hash digest, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -6166,7 +6183,9 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
%put # If empty displays this help information. #;
%put # #;
%put # - `hash=` A value of the package `SHA256` hash. #;
%put # Provided by the user. #;
%put # Provided by the user. When the value is not provided #;
%put # then macro calculates `SHA256`, `SHA1`, and `MD5` #;
%put # digests and display then in the log. #;
%put # #;
%put # - `path=` Location of a package. By default it looks for #;
%put # location of the "packages" fileref, i.e. #;
@@ -6194,7 +6213,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
%put ;
%put %nrstr( %%installPackage(SQLinDS) %%* install the package from the Internet; );
%put %nrstr( %%verifyPackage%(SQLinDS, %%* verify the package with provided hash; );
%put %nrstr( hash=HDA478ANJ3HKHRY327FGE88HF89VH89HFFFV73GCV98RF390VB4%) );
%put %nrstr( hash=HDA478ANJ3HKHRY327FGE88HF89VH89HFFFV73GCV98RF390VB4%) );
%put ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
%put #################################################################################;
%put ;
@@ -6215,19 +6234,21 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc;
%local _PackageFileref_ checkExist;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
data _null_;
length packageName $ 140;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".zip")); /* check on zip files only! */
exists + fileexist(catx("/", p, cats(packageName,".zip"))); /* check on zip files only! */
if exists then leave;
end;
if exists then call symputx("path", p, "L");
@@ -6260,31 +6281,60 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
filename &_PackageFileref_. list;
data _null_;
length providedHash $ 128;
length providedHash $ 128 packageName $ 140;
providedHash = strip(symget("hash"));
select;
when ( 'F*' = upcase(substr(providedHash,1,2)) ) /* F = file digest */
SHA256 = 'F*' !! HASHING_FILE("SHA256", pathname("&_PackageFileref_.",'F'), 0);
when ( 'C*' = upcase(substr(providedHash,1,2)) ) /* C = content digest */
SHA256 = 'C*' !! HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
otherwise /* legacy approach, without C or F, digest value equivalent to C */
SHA256 = HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
end;
put "Provided Hash: " providedHash;
put "SHA256 digest: " SHA256;
put " ";
if upcase(SHA256) = upcase(providedHash) then
do;
put "NOTE: Package verification SUCCESSFUL.";
put "NOTE- Generated hash is EQUAL to the provided one.";
packageName = strip(symget("packageName"));
emptyHash = (providedHash = " " OR providedHash in ("F*" "f*" "C*" "c*"));
put 82*"-" / @2 packageName / 82*"-" /;
if NOT emptyHash then put "Provided Hash: " providedHash;
length method $ 8 digest $ 128;
/* calculate SHA256 */
method="SHA256";
LINK CalcualteHashDigest; /* go to Link 1 */
if NOT emptyHash then
do; /* step for veryfication */
if upcase(digest) = upcase(providedHash) then
do;
put "NOTE: Verification SUCCESSFUL."
/ "NOTE- Generated hash is EQUAL to the provided one." / ;
end;
else
do;
pos = 0;
do i = 1 to max(lengthn(digest),lengthn(providedHash)) while(pos=0);
if char(digest,i) NE char(providedHash,i) then pos = i;
end;
put "ERROR- " @(pos+15)"^"/"ERROR- " @(pos+15)"| diff @" pos/"ERROR- ";
put "ERROR: Verification FAILED!!"
/ "ERROR- Generated hash is DIFFERENT than the provided one."
/ "ERROR- Check if the ZIP is genuine." / ;
end;
end;
else
do;
put "ERROR: Package verification FAILED!!";
put "ERROR- Generated hash is DIFFERENT than the provided one.";
put "ERROR- Confirm if the package is genuine.";
do method = "SHA1", "MD5"; /* step for digest display, calcualte also SHA1 and MD5 */
LINK CalcualteHashDigest; /* go to Link 1 */
end;
put 82*"-" /;
stop;
return;
CalcualteHashDigest: /* Link 1 */
select;
when ( 'F*' = upcase(substr(providedHash,1,2)) ) /* F = file digest */
digest = 'F*' !! HASHING_FILE(method, pathname("&_PackageFileref_.",'F'), 0);
when ( 'C*' = upcase(substr(providedHash,1,2)) ) /* C = content digest */
digest = 'C*' !! HASHING_FILE(method, "&_PackageFileref_.", 4);
otherwise /* legacy approach, without C or F, digest value equivalent to C */
digest = HASHING_FILE(method, "&_PackageFileref_.", 4);
end;
put method "digest: " digest /;
return;
run;
%let HASHING_FILE_exist = 0;
%end;
@@ -6329,7 +6379,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260126. Run %
*/
)/secure
/*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20260126. Run %previewPackage() for help info.'
des = 'Macro to preview content of a SAS package, version 20260216. Run %previewPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -6344,7 +6394,7 @@ des = 'Macro to preview content of a SAS package, version 20260126. Run %preview
%put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get preview of a SAS packages, version `20260126` #;
%put # Macro to get preview of a SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -6425,18 +6475,20 @@ des = 'Macro to preview content of a SAS package, version 20260126. Run %preview
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "P" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");
@@ -6476,7 +6528,7 @@ des = 'Macro to preview content of a SAS package, version 20260126. Run %preview
when empty the "packages" value is used */
)/secure
/*** HELP END ***/
des = 'Macro to list directories pointed by "packages" fileref, version 20260126. Run %extendPackagesFileref(HELP) for help info.'
des = 'Macro to list directories pointed by "packages" fileref, version 20260216. Run %extendPackagesFileref(HELP) for help info.'
;
%if %QUPCASE(&packages.) = HELP %then
@@ -6492,7 +6544,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20260126
%put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20260126` #;
%put # Macro to list directories pointed by 'packages' fileref, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -6594,7 +6646,7 @@ filename packages list;
is provided in required version */
)/secure
/*** HELP END ***/
des = 'Macro to load additional content for a SAS package, version 20260126. Run %loadPackageAddCnt() for help info.'
des = 'Macro to load additional content for a SAS package, version 20260216. Run %loadPackageAddCnt() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -6610,7 +6662,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 `20260126` #;
%put # Macro to *load* additional content for a SAS package, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -6691,20 +6743,22 @@ minoperator
options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc;
%local _PackageFileref_;
data _null_;
call symputX("_PackageFileref_", "A" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
call symputX("_TargetFileref_", "T" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
data _null_;
length packageName $ 32;
packageName = lowcase(symget("packageName"));
call symputX("_PackageFileref_", "A" !! put(MD5(strip(packageName)), hex7. -L), "L");
call symputX("_TargetFileref_", "T" !! put(MD5(strip(packageName)), hex7. -L), "L");
/*run;*/ /* <- comment out, because it can be 1 data step, not 2 */
/* when the packages reference is multi-directory search for the first one containing the package */
data _null_;
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
exists = 0;
length packages $ 32767 p $ 4096;
packages = resolve(symget("path"));
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
exists + fileexist(catx("/", p, cats(packageName,".&zip.")));
if exists then leave;
end;
if exists then call symputx("path", p, "L");
@@ -6979,7 +7033,7 @@ minoperator
,nobs=0 /* technical parameter */
)
/*** HELP END ***/
/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260126. Run %splitCodeForPackage() for help info.'
/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260216. Run %splitCodeForPackage() for help info.'
;
%if (%superq(codeFile) = ) OR (%qupcase(&codeFile.) = HELP) %then
%do;
@@ -6995,7 +7049,7 @@ minoperator
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Utility macro to *split* single file with SAS package code into multiple #;
%put # files with separate snippets, version `20260126` #;
%put # files with separate snippets, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -7371,7 +7425,7 @@ options nomprint nosymbolgen nomlogic notes source ls=MAX ps=MAX msglevel=N ;
*/
if firstLine[j] then
do;
put '/* File generated with help of SAS Packages Framework, version 20260126. */';
put '/* File generated with help of SAS Packages Framework, version 20260216. */';
firstLine[j]=0;
end;
put _infile_;
@@ -7404,7 +7458,7 @@ options &options_tmp2.;
,psMAX=MAX /* pageSise in case executed inside DoSubL() */
,ods= /* a data set for results, e.g., work.relocatePackageReport */
)
/ des = 'Utility macro that locally Copies or Moves Packages, version 20260126. Run %relocatePackage() for help info.'
/ des = 'Utility macro that locally Copies or Moves Packages, version 20260216. Run %relocatePackage() for help info.'
secure
minoperator
;
@@ -7422,7 +7476,7 @@ options &options_tmp2.;
%put ### This is short help information for the `relocatePackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *locally copy or move* (relocate) SAS packages, version `20260126` #;
%put # Macro to *locally copy or move* (relocate) SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -8080,7 +8134,7 @@ filename PACKAGES ("R:\testPackages2" "R:\testPackages1");
vERRb /* indicates if macro should be verbose and report errors */
)
/ minoperator PARMBUFF
des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFilerefOK(HELP) for help, version 20260126.'
des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFilerefOK(HELP) for help, version 20260216.'
;
/*** HELP END ***/
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
@@ -8096,7 +8150,7 @@ des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFile
%put ### This is short help information for the `isPackagesFilerefOK` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to check if the `packages` fileref is "correct", version `20260126` #;
%put # Macro to check if the `packages` fileref is "correct", version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -8230,7 +8284,7 @@ SPFmacroName /* space separated list of names */
/
minoperator
secure
des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260126. Run %SasPackagesFrameworkNotes(HELP) for help info.'
des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260216. Run %SasPackagesFrameworkNotes(HELP) for help info.'
;
%local list N i element;
%let list=
@@ -8276,7 +8330,7 @@ SasPackagesFrameworkNotes
%put ### This is short help information for the `SasPackagesFrameworkNotes` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro prints help notes for SAS Packages Framework macros, version `20260126` #;
%put # Macro prints help notes for SAS Packages Framework macros, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -8399,7 +8453,7 @@ options mlogic symbolgen;
,packagesRef=packages
,ods= /* data set for report file */
)/
des='Macro to create a bundle of SAS packages, version 20260126. Run %bundlePackages(HELP) for help info.'
des='Macro to create a bundle of SAS packages, version 20260216. Run %bundlePackages(HELP) for help info.'
secure minoperator
;
@@ -8416,7 +8470,7 @@ secure minoperator
%put ### This is short help information for the `bundlePackages` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *create bundles* of SAS packages, version `20260126` #;
%put # Macro to *create bundles* of SAS packages, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -8901,7 +8955,7 @@ filename p2 "R:/dontexist";
,ods= /* data set for report file */
,verify=0
)/
des='Macro to extract a bundle of SAS packages, version 20260126. Run %unbundlePackages(HELP) for help info.'
des='Macro to extract a bundle of SAS packages, version 20260216. Run %unbundlePackages(HELP) for help info.'
secure
minoperator
;
@@ -8919,7 +8973,7 @@ minoperator
%put ### This is short help information for the `unbundlePackages` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *extract* SAS packages from a bundle, version `20260126` #;
%put # Macro to *extract* SAS packages from a bundle, version `20260216` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -9021,11 +9075,10 @@ minoperator
%let datetime = %sysfunc(datetime());
%let reportFile = WORK.tmpbundlefile%sysfunc(int(&datetime.), b8601dt15.)_;
data _null_ ;
data _null_;
datetime=symgetn('datetime');
length packagesList $ 32767 bundleName $ 128;
bundleName = compress(symget('bundleName'),"_.","KAD"); /* bundle name is letters, digits, and underscore, up to 128 symbols */
if bundleName NE symget('bundleName') then /* warn about illegal characters */
@@ -9033,12 +9086,12 @@ if bundleName NE symget('bundleName') then /* warn about illegal characters */
put "ERROR: Bundle name contains illegal characters. Exiting";
stop;
end;
bundleName=lowcase(bundleName);
lbn = length(bundleName); /* to cover lengths < 7 & 11 */
/* if there is ".bundle.zip" extension added, remove it */
if substr(strip(reverse(bundleName)),1,11) = 'piz.eldnub.' then bundleName=scan(bundleName,-3,".");
if substr(strip(reverse(bundleName)),1,min(11,lbn)) = 'piz.eldnub.' then bundleName=scan(bundleName,-3,".");
else /* if there is ".bundle" extension added, remove it */
if substr(strip(reverse(bundleName)),1,7) = 'eldnub.' then bundleName=scan(bundleName,-2,".");
if substr(strip(reverse(bundleName)),1,min(7,lbn)) = 'eldnub.' then bundleName=scan(bundleName,-2,".");
put / "INFO: Bundle name is: " bundleName / ;
@@ -9046,7 +9099,6 @@ length packagesPath $ 32767 packagesRef $ 8;
packagesPath = dequote(symget('packagesPath'));
packagesRef = upcase(strip(symget('packagesRef')));
/* organize target path (location for packages) */
if " "=packagesPath then
do;
@@ -9174,7 +9226,6 @@ label package="Package name"
hash="SHA256 for the Package";
/*--------------------------------------------------*/
if 0=Q.NUM_ITEMS then /* ... if empty then exit */
do;
put "WARNING: No packages to unbundle. Exiting!";
@@ -9213,7 +9264,6 @@ put / "INFO: The " bundleName "bundle extraction ended.";
rc = doSubL(code2);
put / "INFO: The " bundleName "bundle verification ended.";
%end;
put " ";
rc=sleep(1,1);

View File

@@ -28,7 +28,7 @@ SHA256 digest for SQLinDS: F*CEAA4C90515F6E8AACBFFD55ABA6544E399EDBE0A7081107B62
---
- **DFA** (Dynamic Function Arrays)\[0.5.8\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples.
- **DFA** (Dynamic Function Arrays)\[0.5.9\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples.
```sas
%createDFArray(ArrDynamic, resizefactor=17);
@@ -55,7 +55,7 @@ data _null_;
end;
run;
```
SHA256 digest for DFA: F*643FBE2B7AE1425FC0240139813B93AE2C6BCFFDF6A0CFAEBEC11F83D3548E57
SHA256 digest for DFA: F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08315DF0C49
[Documentation for DFA](https://github.com/SASPAC/blob/main/dfa.md "Documentation for DFA")
@@ -86,7 +86,7 @@ SHA256 digest for macroArray: F*9DA64CA9A745E1DB7176F7AF4459BB014F61F71626473ABF
---
- **BasePlus**\[3.1.2\] adds a bunch of functionalities I am missing in BASE SAS, such as:
- **BasePlus**\[3.1.3\] adds a bunch of functionalities I am missing in BASE SAS, such as:
```sas
call arrMissToRight(myArray);
call arrFillMiss(17, myArray);
@@ -120,7 +120,7 @@ format x bool.;
%workLib(ABC)
```
SHA256 digest for BasePlus: F*91A5AD4709A418704315EF37DDCF954522D4FB42808D406B3ED4DA560F6864C6
SHA256 digest for BasePlus: F*B762F900EEFF7035880891D89416C0F973E4D377BCB75486283363A9BDADBA82
[Documentation for BasePlus](https://github.com/SASPAC/blob/main/baseplus.md "Documentation for BasePlus")

View File

@@ -1,3 +1,7 @@
/* 20260202 */
BasePlus: F*B762F900EEFF7035880891D89416C0F973E4D377BCB75486283363A9BDADBA82
DFA: F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08315DF0C49
/* 20260126 */
BasePlus: F*91A5AD4709A418704315EF37DDCF954522D4FB42808D406B3ED4DA560F6864C6
DFA: F*643FBE2B7AE1425FC0240139813B93AE2C6BCFFDF6A0CFAEBEC11F83D3548E57

View File

@@ -9,22 +9,22 @@
### Version information:
- Package: BasePlus
- Version: 3.1.2
- Generated: 2026-01-26T15:57:25
- Version: 3.1.3
- Generated: 2026-02-02T13:52:20
- Author(s): Bartosz Jablonski (yabwon@gmail.com), contributors are Quentin McMullen (qmcmullen@gmail.com) and Ryo Nakaya (nakaya.ryou@gmail.com)
- Maintainer(s): Bartosz Jablonski (yabwon@gmail.com)
- License: MIT
- File SHA256: `F*91A5AD4709A418704315EF37DDCF954522D4FB42808D406B3ED4DA560F6864C6` for this version
- Content SHA256: `C*BB61DE3ECA8293AD1CFCE9A6BF5E175B7CFDB75DF063D6070783B75F7B97CE61` for this version
- File SHA256: `F*B762F900EEFF7035880891D89416C0F973E4D377BCB75486283363A9BDADBA82` for this version
- Content SHA256: `C*1CB969446728CD3888BF7046E2463AA74F6A4B2634A0BD2EAD78ED6A526BA7F6` for this version
---
# The `BasePlus` package, version: `3.1.2`;
# The `BasePlus` package, version: `3.1.3`;
---
# The BasePlus package [ver. 3.1.2] <a name="baseplus-package"></a> ###############################################
# The BasePlus package [ver. 3.1.3] <a name="baseplus-package"></a> ###############################################
The **BasePlus** package implements useful
functions and functionalities I miss in the BASE SAS.
@@ -409,7 +409,7 @@ localization (only if additional content was deployed during the installation pr
---------------------------------------------------------------------
*SAS package generated by SAS Package Framework, version `20260125`,*
*SAS package generated by SAS Package Framework, version `20260202`,*
*under `WIN`(`X64_10PRO`) operating system,*
*using SAS release: `9.04.01M9P06042025`.*

Binary file not shown.

View File

@@ -9,22 +9,22 @@
### Version information:
- Package: DFA
- Version: 0.5.8
- Generated: 2026-01-26T15:19:02
- Version: 0.5.9
- Generated: 2026-02-02T13:54:19
- Author(s): Bartosz Jablonski (yabwon@gmail.com)
- Maintainer(s): Bartosz Jablonski (yabwon@gmail.com)
- License: MIT
- File SHA256: `F*643FBE2B7AE1425FC0240139813B93AE2C6BCFFDF6A0CFAEBEC11F83D3548E57` for this version
- Content SHA256: `C*E2E883D8F8A7F7FCB97C2B7240FD5E70A8A6F2A6B3F0F75119F47886338C6B0C` for this version
- File SHA256: `F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08315DF0C49` for this version
- Content SHA256: `C*1818B4D524F779F2FB3A242D9E5BEEB592074A92D68135E18A660E594B214401` for this version
---
# The `DFA` package, version: `0.5.8`;
# The `DFA` package, version: `0.5.9`;
---
# The DFA package [ver. 0.5.8] <a name="dfa-package"></a> ###############################################
# The DFA package [ver. 0.5.9] <a name="dfa-package"></a> ###############################################
The **DFA** (a.k.a. *Dynamic Function Array*) package implements:
- dynamic numeric and character arrays,
@@ -56,7 +56,7 @@ Required SAS Components:
---------------------------------------------------------------------
*SAS package generated by SAS Package Framework, version `20260125`,*
*SAS package generated by SAS Package Framework, version `20260202`,*
*under `WIN`(`X64_10PRO`) operating system,*
*using SAS release: `9.04.01M9P06042025`.*

Binary file not shown.