Compare commits

..

120 Commits

Author SHA1 Message Date
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
b4b319a2e0 SAS Packages Framework, version 20251017
SAS Packages Framework, version 20251017

Changes:
- New parameters `workInTestResults=` and `testWorkPath=` added to the `%generatePackage()` macro.
- Documentation updated.
2025-10-19 21:36:03 +02:00
Bart Jablonski
9cf3332e60 The BasePlus package [ver. 3.0.0]
The BasePlus package [ver. 3.0.0]

New:
- New utility macro `%workLib()`, created in collaboration with Ryo Nakaya, added.

- File SHA256: `F*B9F6D8F1EDD1ECDA89F4BE327C4F4202649475D1D9DFB476279B633D9F14125D` for this version
- Content SHA256: `C*680412F6B403870A3A8975FC17300F7C92AEDECA48D3F242B5BC4E545DC6D313` for this version
2025-10-15 10:23:42 +02:00
Bart Jablonski
998a23c980 Update README.md 2025-10-13 10:02:21 +02:00
Bart Jablonski
3701986fab SAS Packages Framework logo 2025-10-13 09:41:54 +02:00
Bart Jablonski
31a29b3528 SESUG 2025 conference article added to the documentation
SESUG 2025 conference article added to the documentation
2025-10-02 11:03:01 +02:00
Bart Jablonski
fab9fb7166 Update README.md
Link to "SAS Package ー その共有、もっとスマートに" video added.
2025-09-30 22:32:32 +02:00
Bart Jablonski
1d83c65a9b Merge pull request #114 from yabwon/main
pull request
2025-09-09 22:46:31 +02:00
Bart Jablonski
71503379bf The BasePlus package [ver. 2.4.1]
The BasePlus package [ver. 2.4.1]

Fix:
- Fix engine recognition code in `%splitDSintoBlocks()` macro.

- File SHA256: `F*DB0811D8F207641BD45FCE30CB75D03CDF8D06849EBEA268BB575358FAA4E76C` for this version
- Content SHA256: `C*27861ABABB412E8229FE25CD5EEA868F49BB3CBD805CCE65F321ADBC522FAC4E` for this version
2025-09-05 10:30:18 +02:00
Bart Jablonski
79bd3d0c0a Update README.md 2025-08-07 18:49:17 +02:00
Bart Jablonski
f01ac518a6 The BasePlus package [ver. 2.4.0]
The BasePlus package [ver. 2.4.0]

Changes:
- new parameter `backslashSens=` added to the `%dirsAndFiles()` macro.

- File SHA256: `F*19FE220C82DE4B9990B4AC352A9D9DEF5FAF2FD601BE756B2F3A2AC39CDAF381` for this version
- Content SHA256: `C*83DEF0C93481B1C77494531E5CE9F8EB8E4C15AB3CC48D1E9C0223C13A84DB3F` for this version
2025-08-07 18:26:26 +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
62b7c64063 The BasePlus package [ver. 2.3.1]
The BasePlus package [ver. 2.3.1]

Changes:
Fix in log notes produced by `%getVars()` and `%QgetVars()`.

- File SHA256: `F*B2D318DD9708D74E5A7C419F7CAE1BF46D662B7F6AEE7E6B1B9D9B6858A5C41A` for this version
- Content SHA256: `C*C34B47FDC4A22C5F5EACA087FA5308B97C367E8B7C32C5B28D37B491C6DAA9A3` for this version
2025-08-05 20:18:11 +02:00
Bart Jablonski
ef3afe837d The BasePlus package [ver. 2.3.0]
# The BasePlus package [ver. 2.3.0]

- File SHA256: `F*71DC1AFA709B2977E8AEA452721776F62EEC8240ABD658AC83AA6D4310FC49B6` for this version
- Content SHA256: `C*9CEDE8C64D2C619EBC27AC85B4904D2CE2423C832C6C313E526946FC1417EFD1` for this version

---

### Changes:

Update in macros:
- `%getVars()` and `%QgetVars()`

    - New *optional* parameter `nlit=`. Introduced to improve `validvarname=ANY` handling. Indicates if the `NLITERAL()` function should be executed to cover spacial characters. Default value is `0`.
    - Code simplification for the `mcArray=` parameter case.
    - Situation when the `%getVars()` macro is called with `mcArray=` in `%put` or `%let` statements is handled more gracefully.

- `%zipEvalf()` and `%QzipEvalf()`

    - If the list contains quoted blanks, they are respected now, i.e. `a "b c"` are considered 2 strings, `a` and `b c`.

See documentation for details.

---
2025-08-04 15:45:33 +02: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
f63ff497ee SAS Packages Framework, version 20250729
SAS Packages Framework, version 20250729

Changes:
- New parameter `github=` added to the `%installPackage()` macro.
- Documentation updated.
2025-07-29 11:51:56 +02: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
030a0932a8 SAS Packages Framework, version 20250728
SAS Packages Framework, version 20250728

Changes:
- The `mirror=3` parameter in the `%installPackage()` macro allows access `https://github.com/PharmaForest/`.
- Values `SASPAC` and `PharmaForest` are accepted by the `mirror=` parameter in the `%installPackage()` macro.
- Documentation updated.
2025-07-28 10:39:12 +02: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
cc25b76144 SAS Packages Framework, version 20250710
SAS Packages Framework, version 20250710

Changes:
- Framework's code cleanup: all uses of the autocall `%lowcase()` macro were removed or replaced by `%sysfunc(lowcase(...))` call.
- Formatting of the default MIT license text in the `%generatePackage()` macro was changed.
- The `sourcePath=` parameter in the `%installPackage()` macro now allows both quoted and un-quoted address.
- Documentation updated.
2025-07-10 13:56:45 +02:00
Bart Jablonski
bfdede5dd4 Merge pull request #109 from yabwon/main
update README.md
2025-06-11 13:32:59 -04:00
Bart Jablonski
628641a6cf Update README.md 2025-04-22 13:06:18 +02:00
Bart Jablonski
191d07c2c8 Update README.md
A bit of polishing.
2025-04-03 13:40:06 +02: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
26 changed files with 1338 additions and 799 deletions

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2019 - 2024 Bartosz Jablonski Copyright (c) 2019 - 2025 Bartosz Jablonski
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,28 +1,35 @@
# SAS_PACKAGES - a SAS Packages Framework # SAS Packages Framework
![SAS Packages Framework](./SPF/Logo/SPFlogo1200x770.png "SAS Packages Framework")
--- ---
## Intro:
A **SAS package** is an automatically generated, single, stand alone *zip* file containing organised and ordered code structures, created by the developer and extended with additional automatically generated "driving" files (i.e. description, metadata, load, unload, and help files). A **SAS package** is an automatically generated, single, stand alone *zip* file containing organised and ordered code structures, created by the developer and extended with additional automatically generated "driving" files (i.e. description, metadata, load, unload, and help files).
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. 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. In this repository we are presenting the **SAS Packages Framework** - a tool that allows to develop and use SAS packages.
Don't forget to give the repository a **STAR** and become [stargazer](https://github.com/yabwon/SAS_PACKAGES/stargazers)! :-)
Don't forget to **STAR** (:star:) the repository! :-)
--- ---
### Current version: ### Current version:
**The latest version** of SPF is **`20241207`**. **The latest version** of the **SAS Packages Framework** is **`20251017`**.
To get started with SAS Packages try this [**`Getting Started with SAS Packages`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf "Getting Started with SAS Packages") presentation (see the `./SPF/Documentation` directory). ---
The documentation and more advance reading would be the [**`SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/SAS(r)%20packages%20-%20the%20way%20to%20share%20(a%20how%20to)-%20Paper%204725-2020%20-%20extended.pdf "SAS packages - the way to share") article (see the `./SPF/Documentation` directory). ---
Short description of the SAS Packages Framework macros can be found [here](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md "Short description of the SAS Packages Framework macros") ## Intro:
To get started with SAS Packages try: [**`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).
The documentation and more advance reading can be found in the [**`SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/SAS(r)%20packages%20-%20the%20way%20to%20share%20(a%20how%20to)-%20Paper%204725-2020%20-%20extended.pdf "SAS packages - the way to share") article (see the `./SPF/Documentation` directory).
Short description of the SAS Packages Framework macros and their parameters can be found [here](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md "Short description of the SAS Packages Framework macros")
### Recordings and Presentations: ### Recordings and Presentations:
@@ -37,6 +44,7 @@ Videos presenting the SPF and packages, from various conferences and meetups (th
- ["A BasePlus Package for SAS" - SAS Explore 2022](https://communities.sas.com/t5/SAS-Explore-Presentations/A-BasePlus-Package-for-SAS/ta-p/838246 "SASexplore2022 communities.sas.com") (September 27th-29th 2022, ~28 minutes, technical presentation with details about the BasePlus package), alternative video at YouTube is [here](https://www.youtube.com/watch?v=-Poxkx5WfOQ "SASexplore2022 TouTube") - ["A BasePlus Package for SAS" - SAS Explore 2022](https://communities.sas.com/t5/SAS-Explore-Presentations/A-BasePlus-Package-for-SAS/ta-p/838246 "SASexplore2022 communities.sas.com") (September 27th-29th 2022, ~28 minutes, technical presentation with details about the BasePlus package), alternative video at YouTube is [here](https://www.youtube.com/watch?v=-Poxkx5WfOQ "SASexplore2022 TouTube")
- ["SAS Packages - State of the Union" - SaSensei International Dojo No. 13](https://www.youtube.com/watch?v=1GEldZYQjj0&t=0s "SID no. 13") (November 10th 2022, ~50 minutes, general overview with the latest technical details) - ["SAS Packages - State of the Union" - SaSensei International Dojo No. 13](https://www.youtube.com/watch?v=1GEldZYQjj0&t=0s "SID no. 13") (November 10th 2022, ~50 minutes, general overview with the latest technical details)
- ["SAS Packages Framework - an easy code sharing medium for SAS" - Warsaw IT Days 2023](https://youtu.be/T52Omisi0dk&t=0s "Warsaw IT Days 2023") (March 31st 2023, ~60 minutes, general overview with technical details for user and developer) - ["SAS Packages Framework - an easy code sharing medium for SAS" - Warsaw IT Days 2023](https://youtu.be/T52Omisi0dk&t=0s "Warsaw IT Days 2023") (March 31st 2023, ~60 minutes, general overview with technical details for user and developer)
- ["SAS Package ー その共有、もっとスマートに" - SASユーザー総会 2025](https://youtu.be/4QRr7sUhO9E "SASユーザー総会2025") (September 25th 2025, ~22 minutes, general overview with the list of reasons: why is it worth to use SAS packages?)
### Tutorials: ### Tutorials:
@@ -45,7 +53,7 @@ Here are links to some tutorials which may help you to start with the framework.
Order is dictated by the amount of details presented. Order is dictated by the amount of details presented.
Letter "D" indicates tutorial dedicated for developers and "U" materials for users. Letter "D" indicates tutorial dedicated for developers and "U" materials for users.
1) (DU) The latest [video](https://youtu.be/T52Omisi0dk&t=0s) explaining the idea. 1) (DU) A [video](https://youtu.be/T52Omisi0dk&t=0s) explaining the idea in more details.
2) (D) Very simple ["Hello World" example](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/HelloWorldPackage.md) tutorial for developers. As a support a [walk-through video](https://youtu.be/T52Omisi0dk&t=2160s) 2) (D) Very simple ["Hello World" example](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/HelloWorldPackage.md) tutorial for developers. As a support a [walk-through video](https://youtu.be/T52Omisi0dk&t=2160s)
@@ -54,22 +62,27 @@ Letter "D" indicates tutorial dedicated for developers and "U" materials for use
4) (DU) Materials from Hands-on-Workshop (4+ hours) tutorial: [Share your code with SAS Packages](https://github.com/yabwon/HoW-SASPackages). 4) (DU) Materials from Hands-on-Workshop (4+ hours) tutorial: [Share your code with SAS Packages](https://github.com/yabwon/HoW-SASPackages).
It is a "zero to hero" tutorial that explains all the "bells and whistles" of using, and all the "nuts and bolts" of developing SAS packages. It is a "zero to hero" tutorial that explains all the "bells and whistles" of using, and all the "nuts and bolts" of developing SAS packages.
---
--- ---
### Initiative to add SAS Packages Framework to SAS Base/Viya: ### Initiative to add SAS Packages Framework to SAS Base/Viya:
A **SASware Ballot Idea** for adding *SAS Packages Framework* macros into Base SAS and Viya was submitted Friday, May 27th 2022. If you would like to support the idea visit this [communities.sas.com post](https://communities.sas.com/t5/SASware-Ballot-Ideas/Add-SAS-Packages-Framework-to-the-SAS-Base-Viya/idi-p/815508) and up vote the idea! A **SASware Ballot Idea** for adding *SAS Packages Framework* macros into Base SAS and Viya was submitted Friday, May 27th 2022. If you would like to support the idea visit this [**communities.sas.com post**](https://communities.sas.com/t5/SASware-Ballot-Ideas/Add-SAS-Packages-Framework-to-the-SAS-Base-Viya/idi-p/815508) and up vote the idea! We have 48 likes from 46 supporters up to today (as of September 30, 2025)!
--- ---
### The User: ### A Brief User Manual:
This is a brief intro. See below to find a link to detailed workshop materials.
#### Create directory
The first step to use a package with the SAS Packages Framework: The first step to use a package with the SAS Packages Framework:
- Create a folder for your packages, under Windows OS family e.g., `C:/SAS_PACKAGES` or under Linux/UNIX OS family e.g., `/home/<username>/SAS_PACKAGES`. - Create a folder for your packages, under Windows OS family e.g., `C:/SAS_PACKAGES` or under Linux/UNIX OS family e.g., `/home/<username>/SAS_PACKAGES`. The path selected is totally up to you.
Then either: #### Manual installation
- Manually download the `SPFinit.sas` file (the SAS Packages Framework) into the local packages folder. - Manually download the `SPFinit.sas` file (the SAS Packages Framework) into the local packages folder.
- \[Optional\] Manually download the `<packageName>.zip` file into the local packages folder. - \[Optional\] Manually download the `<packageName>.zip` file into the local packages folder.
@@ -85,7 +98,11 @@ filename packages "<directory/containing/packages/>"; /* setup directory
%loadPackage(packageName) /* load the package content into the SAS session */ %loadPackage(packageName) /* load the package content into the SAS session */
``` ```
or if you need it just for "one time" only: ---
#### Automatic (one-time-only) installation
If you need it just for "one time" only, e.g., for test if you like it:
- Execute: - Execute:
@@ -99,9 +116,13 @@ filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main
%loadPackage(packageName) /* load the package content into the SAS session */ %loadPackage(packageName) /* load the package content into the SAS session */
``` ```
or do it pragmatically: ---
- Enable the framework [first time only]: #### Automatic (permanent) installation
To install SPF pragmatically:
- Enable the framework [do this first and one time only!]:
```sas ```sas
filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas"; filename SPFinit url "https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas";
@@ -122,7 +143,7 @@ filename packages "<directory/containing/packages/>";
%installPackage(SPFinit) /* install the framework */ %installPackage(SPFinit) /* install the framework */
``` ```
- From now on run it like this: - From now on, just like you would assign libraries, run the SPF and use packages like this:
```sas ```sas
filename packages "<directory/containing/packages/>"; filename packages "<directory/containing/packages/>";
@@ -135,16 +156,20 @@ filename packages "<directory/containing/packages/>";
--- ---
The "Workshop video for the User" got outdated (in general). Newer version is coming soon, in the mean time see some of the videos from the "Recordings and Presentations" section above. [**Detailed workshop materials**](https://github.com/yabwon/HoW-SASPackages) (i.e. "from 0 to hero" instruction).
The youtube "Workshop video for the User" got outdated (in general). Newer version is coming soon, in the mean time see some of the videos from the "Recordings and Presentations" section above.
(You can watch the workshop if you wish, link is working and some parts are still valid source of information e.g., "`ICE` loading" or "`disk` loading") (You can watch the workshop if you wish, link is working and some parts are still valid source of information e.g., "`ICE` loading" or "`disk` loading")
<s>[**Workshop video for the User**](https://youtu.be/qX_-HJ76g8Y) \[May 6th, 2020\] [~86 minutes, outdated (installPackage macro was not there yet) but gives the idea how it works especially load, help, unload, ICEload, and other details]</s> <s>[**Workshop video for the User**](https://youtu.be/qX_-HJ76g8Y) \[May 6th, 2020\] [~86 minutes, outdated (installPackage macro was not there yet) but gives the idea how it works especially load, help, unload, ICEload, and other details]</s>
--- ---
### The Developer: ---
To create your own package: ### For The Developer:
In brief, to create your own package:
- Download (and use) the `SPFinit.sas` file (the SAS Packages Framework), the part of the framework required for *testing* is there too. - Download (and use) the `SPFinit.sas` file (the SAS Packages Framework), the part of the framework required for *testing* is there too.
@@ -156,6 +181,8 @@ To create your own package:
The SAS Packages Framework [(short) documentation](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md) to quickly see macros options and parameters. The SAS Packages Framework [(short) documentation](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/SPFinit.md) to quickly see macros options and parameters.
[**Detailed workshop materials**](https://github.com/yabwon/HoW-SASPackages) (i.e. "from 0 to hero" detailed instruction with a bunch of examples).
--- ---
### If you have any questions, suggestions, or ideas do not hesitate to contact me! ### If you have any questions, suggestions, or ideas do not hesitate to contact me!
@@ -195,12 +222,15 @@ The SAS Packages Framework [(short) documentation](https://github.com/yabwon/SAS
--- ---
## Where the SAS Packages Framework is used: ## Where the SAS Packages Framework is used:
This is a list of locations where the SAS Packages Framework is used: This is a list of locations where the SAS Packages Framework is used:
- Warsaw (Poland) - Warsaw (Poland)
- Osaka (Japan)
- Kyoto (Japan)
If you want to share that you are using the SPF let me know and I'll update the list. If you want to share that you are using the SPF let me know and I'll update the list.
If you find the SPF useful **share info** about it or **give it a [star (:star:)](https://github.com/yabwon/SAS_PACKAGES/stargazers)** so more people will know. If you find the SPF useful **share info** about it or **give it a [star ()](https://github.com/yabwon/SAS_PACKAGES/stargazers)** so more people will know.
--- ---

Binary file not shown.

BIN
SPF/Logo/SPFlogo.pdf Normal file

Binary file not shown.

BIN
SPF/Logo/SPFlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

View File

@@ -6,7 +6,7 @@
when empty the "packages" value is used */ when empty the "packages" value is used */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to list directories pointed by "packages" fileref, version 20241207. Run %extendPackagesFileref(HELP) for help info.' des = 'Macro to list directories pointed by "packages" fileref, version 20251017. Run %extendPackagesFileref(HELP) for help info.'
; ;
%if %QUPCASE(&packages.) = HELP %then %if %QUPCASE(&packages.) = HELP %then
@@ -22,7 +22,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20241207
%put ### This is short help information for the `extendPackagesFileref` macro #; %put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;; %put #-----------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20241207` #; %put # Macro to list directories pointed by 'packages' fileref, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -43,6 +43,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20241207
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put #### Example ##############################################################################; %put #### Example ##############################################################################;
%put # #; %put # #;

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to get help about SAS package, version 20241207. Run %helpPackage() for help info.' des = 'Macro to get help about SAS package, version 20251017. Run %helpPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -43,7 +43,7 @@ des = 'Macro to get help about SAS package, version 20241207. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #; %put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to get help about SAS packages, version `20241207` #; %put # Macro to get help about SAS packages, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -93,6 +93,7 @@ des = 'Macro to get help about SAS package, version 20241207. Run %helpPackage()
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put #### Example ####################################################################; %put #### Example ####################################################################;
%put # #; %put # #;
@@ -131,8 +132,9 @@ des = 'Macro to get help about SAS package, version 20241207. Run %helpPackage()
options NOnotes NOsource ls=MAX ps=MAX msglevel=N NOmautocomploc; options NOnotes NOsource ls=MAX ps=MAX msglevel=N NOmautocomploc;
%local _PackageFileref_; %local _PackageFileref_;
/* %let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.); */ data _null_;
data _null_; call symputX("_PackageFileref_", "P" !! put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); run; call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
/* when the packages reference is multi-directory search for the first one containing the package */ /* when the packages reference is multi-directory search for the first one containing the package */
data _null_; data _null_;
@@ -142,7 +144,7 @@ des = 'Macro to get help about SAS package, version 20241207. Run %helpPackage()
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */ if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS"); do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS")); p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, "%lowcase(&packageName.).&zip.")); exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
if exists then leave; if exists then leave;
end; end;
if exists then call symputx("path", p, "L"); if exists then call symputx("path", p, "L");
@@ -150,7 +152,7 @@ des = 'Macro to get help about SAS package, version 20241207. Run %helpPackage()
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
/* put location of package myPackageFile.zip here */ /* put location of package myPackageFile.zip here */
"&path./%lowcase(&packageName.).&zip." %unquote(&options.) "&path./%sysfunc(lowcase(&packageName.)).&zip." %unquote(&options.)
; ;
%if %sysfunc(fexist(&_PackageFileref_.)) %then %if %sysfunc(fexist(&_PackageFileref_.)) %then
%do; %do;
@@ -158,7 +160,7 @@ des = 'Macro to get help about SAS package, version 20241207. Run %helpPackage()
filename &_PackageFileref_. clear; filename &_PackageFileref_. clear;
options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.; options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
"&path./%lowcase(&packageName.).&zip." %unquote(&options.) "&path./%sysfunc(lowcase(&packageName.)).&zip." %unquote(&options.)
ENCODING = ENCODING =
%if %bquote(&packageEncoding.) NE %then &packageEncoding. ; %if %bquote(&packageEncoding.) NE %then &packageEncoding. ;
%else utf8 ; %else utf8 ;

View File

@@ -1,5 +1,5 @@
/*+installPackage+*/ /*+installPackage+*/
/* Macros to install SAS packages, version 20241207 */ /* Macros to install SAS packages, version 20251017 */
/* A SAS package is a zip file containing a group of files /* A SAS package is a zip file containing a group of files
with SAS code (macros, functions, data steps generating with SAS code (macros, functions, data steps generating
data, etc.) wrapped up together and %INCLUDEed by data, etc.) wrapped up together and %INCLUDEed by
@@ -21,11 +21,12 @@
, instDoc=0 /* should the markdown file with documentation be installed? , instDoc=0 /* should the markdown file with documentation be installed?
default is 0 - means No, 1 means Yes */ default is 0 - means No, 1 means Yes */
, SFRCVN = /* name of a macro variable to store success-failure return code value */ , SFRCVN = /* name of a macro variable to store success-failure return code value */
, github = /* name of a user or an organization in GitHub, all characters except [A-z0-9_.-] are compressed */
) )
/secure /secure
minoperator minoperator
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to install SAS package, version 20241207. Run %%installPackage() for help info.' des = 'Macro to install SAS package, version 20251017. Run %%installPackage() for help info.'
; ;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do; %do;
@@ -40,7 +41,7 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #; %put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;; %put #--------------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to install SAS packages, version `20241207` #; %put # Macro to install SAS packages, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -73,21 +74,23 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%put # `https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/` #; %put # `https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/` #;
%put # #; %put # #;
%put # - `mirror=` Indicates which web location for packages installation is used. #; %put # - `mirror=` Indicates which web location for packages installation is used. #;
%put # Value `0` indicates: #; %put # Value `0` or `SASPAC` indicates: #;
%put # `https://github.com/SASPAC/` #; %put # `https://github.com/SASPAC/` #;
%put # Value `1` indicates: #; %put # Value `1` indicates: #;
%put # `https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main` #; %put # `https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main` #;
%put # Value `2` indicates: #; %put # Value `2` indicates: #;
%put # `https://pages.mini.pw.edu.pl/~jablonskib/SASpublic/SAS_PACKAGES` #; %put # `https://pages.mini.pw.edu.pl/~jablonskib/SASpublic/SAS_PACKAGES` #;
%put # Value `3` or `PharmaForest` indicates: #;
%put # `https://github.com/PharmaForest/` #;
%put # Default value is `0`. #; %put # Default value is `0`. #;
%put # #; %put # #;
%put # - `version=` Indicates which historical version of a package to install. #; %put # - `version=` Indicates which historical version of a package to install. #;
%put # Historical version are available only if `mirror=0` is set. #; %put # Historical version are currently available only if `mirror=0` is set. #;
%put # Default value is null which means "install the latest". #; %put # Default value is null which means "install the latest". #;
%put # When there are multiple packages to install version variable #; %put # When there are multiple packages to install the `version` variable #;
%put # is scan sequentially. #; %put # is scan sequentially. #;
%put # #; %put # #;
%put # - `replace=` With default value of `1` it causes existing package file #; %put # - `replace=` With default value of `1`, it causes existing package file 0 #;
%put # to be replaced by new downloaded file. #; %put # to be replaced by new downloaded file. #;
%put # #; %put # #;
%put # - `URLuser=` A user name for the password protected URLs, no quotes needed. #; %put # - `URLuser=` A user name for the password protected URLs, no quotes needed. #;
@@ -109,15 +112,21 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%put # indicates if the `.md` file should be also downloaded. #; %put # indicates if the `.md` file should be also downloaded. #;
%put # Default value of zero (`0`) means "No", one (`1`) means "Yes". #; %put # Default value of zero (`0`) means "No", one (`1`) means "Yes". #;
%put # #; %put # #;
%put # - `SFRCVN=` *Optional.* Provides a NAME for a macro variable to store value of the #; %put # - `SFRCVN=` *Optional.* Provides a NAME for a macro variable to store value of the #;
%put # *success-failure return code* of the installation process. Return value #; %put # *success-failure return code* of the installation process. Return value #;
%put # has the following form: `<number of successes>.<number of failures>` #; %put # has the following form: `<number of successes>.<number of failures>` #;
%put # The macro variable is created as a *global* macro variable. #; %put # The macro variable is created as a *global* macro variable. #;
%put # #;
%put # - `github=` *Optional.* A name of a user or an organization in GitHub. #;
%put # Allows an easy set of the search path for packages available on GitHub: #;
%put # `https://github.com/<github>/<packagename>/raw/.../` #;
%put # All characters except `[A-z0-9_.-]` are compressed. #;
%put # #; %put # #;
%put #--------------------------------------------------------------------------------------------#; %put #--------------------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put #### Example #################################################################################; %put #### Example #################################################################################;
%put # #; %put # #;
@@ -142,7 +151,7 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%put # #; %put # #;
%put # Enabling the SAS Package Framework #; %put # Enabling the SAS Package Framework #;
%put # from the local directory and installing & loading #; %put # from the local directory and installing & loading #;
%put # the multiple packages from the Internet. #; %put # multiple packages with versions from the Internet. #;
%put # #; %put # #;
%put # Assume that the `SPFinit.sas` file #; %put # Assume that the `SPFinit.sas` file #;
%put # is located in the "C:/SAS_PACKAGES/" folder. #; %put # is located in the "C:/SAS_PACKAGES/" folder. #;
@@ -202,11 +211,22 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.md; %let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.md;
%let sourcePath = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/packages/; %let sourcePath = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/packages/;
%if %qupcase(%superq(mirror))=SASPAC %then %let mirror = 0;
%if %qupcase(%superq(mirror))=PHARMAFOREST %then %let mirror = 3;
%if %superq(github) NE %then %let mirror = 4;
%if NOT (%superq(mirror) IN (0 1 2 3 4)) %then
%do;
%put WARNING: Unknown mirror: %superq(mirror)!;
%put WARNING- Default will be used.;
%let mirror = 0;
%end;
%if 0 = %superq(mirror) %then %if 0 = %superq(mirror) %then
%do; %do;
%let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas; %let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas;
%let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.md; %let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.md;
%let sourcePath = https://github.com/SASPAC/; /*usercontent*/ %let sourcePath = https://github.com/SASPAC/; /*users content*/
%goto mirrorEnd; %goto mirrorEnd;
%end; %end;
@@ -225,11 +245,33 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%let sourcePath = https://pages.mini.pw.edu.pl/~jablonskib/SASpublic/SAS_PACKAGES/packages/; %let sourcePath = https://pages.mini.pw.edu.pl/~jablonskib/SASpublic/SAS_PACKAGES/packages/;
%goto mirrorEnd; %goto mirrorEnd;
%end; %end;
%if 3 = %superq(mirror) %then
%do;
%let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas;
%let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.md;
/* ingnore version support for pharmaForest for now */
%let sourcePath = https://github.com/PharmaForest/; /*users content*/
%goto mirrorEnd;
%end;
%if 4 = %superq(mirror) %then
%do;
%let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas;
%let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.md;
/* ingnore version support for pharmaForest for now */
%let github = %sysfunc(compress(%superq(github),%str(,.-),KAD));
%put INFO: GitHub location used is: %superq(github).;
%let sourcePath = https://github.com/&github./; /*users content*/
%goto mirrorEnd;
%end;
%mirrorEnd: %mirrorEnd:
%put INFO: Source path is &sourcePath.; %put INFO: Source path is &sourcePath.;
%end; %end;
%else %else
%do; %do;
%let sourcePath = %sysfunc(dequote(%superq(sourcePath)))/;
%let mirror=-1; %let mirror=-1;
%let SPFinitMirror = &sourcePath.SPFinit.sas; %let SPFinitMirror = &sourcePath.SPFinit.sas;
%let SPFinitMirrorMD = &sourcePath.SPFinit.md; %let SPFinitMirrorMD = &sourcePath.SPFinit.md;
@@ -249,7 +291,7 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%if %length("%sysfunc(compress(%superq(str),[,k))") NE %length("%sysfunc(compress(%superq(str),],k))") %then %if %length("%sysfunc(compress(%superq(str),[,k))") NE %length("%sysfunc(compress(%superq(str),],k))") %then
%do; %do;
%put ERROR: Syntax error in list of packages!; %put ERROR: Syntax error in the provided list of packages!;
%put ERROR- %superq(packagesNames); %put ERROR- %superq(packagesNames);
%goto packagesListError; %goto packagesListError;
%end; %end;
@@ -272,15 +314,15 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%let vers=; %let vers=;
%if %superq(versB) ne %then %let vers = &versB.; %if %superq(versB) ne %then %let vers = &versB.;
%if %superq(versA) ne %then %let vers = &versA.; %if %superq(versA) ne %then %let vers = &versA.;
%if -1 = &mirror %then /* ignore version when direct path is provided */ %if %eval(-1 = &mirror) OR %eval(3 = &mirror) %then /* ignore version when direct path or PharmaForest is provided */
%do; %do;
%let vers=; %let vers=;
%end; %end;
%put ### &packageName.(&vers.) ###; %put ### &packageName.(&vers.) ###;
%put *** %lowcase(&packageName.) start *****************************************; %put *** %sysfunc(lowcase(&packageName.)) start *****************************************;
%local in out inMD outMD _IOFileref_; %local in out inMD outMD _IOFileref_;
data _null_; call symputX("_IOFileref_", put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); run; data _null_; call symputX("_IOFileref_", put(MD5(lowcase("&packageName.")), hex7. -L), "L"); run;
%let in = i&_IOFileref_.; %let in = i&_IOFileref_.;
%let out = o&_IOFileref_.; %let out = o&_IOFileref_.;
%let inMD = j&_IOFileref_.; %let inMD = j&_IOFileref_.;
@@ -319,24 +361,24 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%end; %end;
%else %else
%do; %do;
%if 0 = %superq(mirror) %then %if %superq(mirror) IN (0 3 4) %then /* SASPAC or PharmaForest or an arbitrary GitHub repo */
%do; %do;
%let packageSubDir = %lowcase(&packageName.)/raw/main/; %let packageSubDir = %sysfunc(lowcase(&packageName.))/raw/main/;
%if %superq(vers) ne %then %if %superq(vers) ne %then
%do; %do;
/*%let packageSubDir = %lowcase(&packageName.)/main/hist/&version./;*/ /*%let packageSubDir = %sysfunc(lowcase(&packageName.))/main/hist/&version./;*/
%let packageSubDir = %lowcase(&packageName.)/raw/&vers./; %let packageSubDir = %sysfunc(lowcase(&packageName.))/raw/&vers./;
%end; %end;
%end; %end;
%else %else
%do; %do;
%if %superq(mirror) > 0 %then %if %superq(mirror) NE 0 %then
%put %str( )Mirror %superq(mirror) does not support versioning.; %put %str( )Mirror %superq(mirror) does not support versioning.;
%end; %end;
/* zip */ /* zip */
filename &in. URL "&sourcePath.&packageSubDir.%lowcase(&packageName.).zip" filename &in. URL "&sourcePath.&packageSubDir.%sysfunc(lowcase(&packageName.)).zip"
%if (%superq(URLuser) ne ) %then %if (%superq(URLuser) ne ) %then
%do; %do;
user = "&URLuser." user = "&URLuser."
@@ -344,9 +386,9 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%end; %end;
&URLoptions. &URLoptions.
recfm=N lrecl=1; recfm=N lrecl=1;
filename &out. "&firstPackagesPath./%lowcase(&packageName.).zip" recfm=N lrecl=1; filename &out. "&firstPackagesPath./%sysfunc(lowcase(&packageName.)).zip" recfm=N lrecl=1;
/* markdown */ /* markdown */
filename &inMD. URL "&sourcePath.&packageSubDir.%lowcase(&packageName.).md" filename &inMD. URL "&sourcePath.&packageSubDir.%sysfunc(lowcase(&packageName.)).md"
%if (%superq(URLuser) ne ) %then %if (%superq(URLuser) ne ) %then
%do; %do;
user = "&URLuser." user = "&URLuser."
@@ -354,7 +396,7 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
%end; %end;
&URLoptions. &URLoptions.
recfm=N lrecl=1; recfm=N lrecl=1;
filename &outMD. "&firstPackagesPath./%lowcase(&packageName.).md" recfm=N lrecl=1; filename &outMD. "&firstPackagesPath./%sysfunc(lowcase(&packageName.)).md" recfm=N lrecl=1;
%end; %end;
/* /*
filename in list; filename in list;
@@ -486,7 +528,7 @@ des = 'Macro to install SAS package, version 20241207. Run %%installPackage() fo
) )
%put - Additional content loading - End -; %put - Additional content loading - End -;
%end; %end;
%put *** %lowcase(&packageName.) end *******************************************; %put *** %sysfunc(lowcase(&packageName.)) end *******************************************;
/*-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-*/ /*-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-*/
%end; %end;

View File

@@ -3,7 +3,7 @@
Macro to list SAS packages in packages folder. Macro to list SAS packages in packages folder.
Version 20241207 Version 20251017
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -23,7 +23,7 @@
%macro listPackages() %macro listPackages()
/secure PARMBUFF /secure PARMBUFF
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20241207.' des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20251017.'
; ;
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then %if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
%do; %do;
@@ -38,7 +38,7 @@ des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HE
%put ### This is short help information for the `listPackages` macro #; %put ### This is short help information for the `listPackages` macro #;
%put #-----------------------------------------------------------------------------------------#;; %put #-----------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to list available SAS packages, version `20241207` #; %put # Macro to list available SAS packages, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -57,6 +57,7 @@ des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HE
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put #### Example ##############################################################################; %put #### Example ##############################################################################;
%put # #; %put # #;

View File

@@ -36,7 +36,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to load SAS package, version 20241207. Run %loadPackage() for help info.' des = 'Macro to load SAS package, version 20251017. Run %loadPackage() for help info.'
minoperator minoperator
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -52,7 +52,7 @@ minoperator
%put ### This is short help information for the `loadPackage` macro #; %put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to *load* SAS packages, version `20241207` #; %put # Macro to *load* SAS packages, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -120,6 +120,7 @@ minoperator
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put ### Example 1 ###################################################################; %put ### Example 1 ###################################################################;
%put # #; %put # #;
@@ -178,8 +179,9 @@ minoperator
options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc; options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc;
%local _PackageFileref_; %local _PackageFileref_;
/* %let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.); */ data _null_;
data _null_; call symputX("_PackageFileref_", "P" !! put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); run; call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
/* when the packages reference is multi-directory search for the first one containing the package */ /* when the packages reference is multi-directory search for the first one containing the package */
data _null_; data _null_;
@@ -189,7 +191,7 @@ minoperator
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */ if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS"); do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS")); p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, "%lowcase(&packageName.).&zip.")); exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
if exists then leave; if exists then leave;
end; end;
if exists then call symputx("path", p, "L"); if exists then call symputx("path", p, "L");
@@ -225,7 +227,7 @@ minoperator
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
/* put location of package myPackageFile.zip here */ /* put location of package myPackageFile.zip here */
"&path./%lowcase(&packageName.).&zip." %unquote(&options.) "&path./%sysfunc(lowcase(&packageName.)).&zip." %unquote(&options.)
; ;
%if %sysfunc(fexist(&_PackageFileref_.)) %then %if %sysfunc(fexist(&_PackageFileref_.)) %then
%do; %do;
@@ -265,7 +267,7 @@ minoperator
options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.; options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
"&path./%lowcase(&packageName.).&zip." %unquote(&options.) "&path./%sysfunc(lowcase(&packageName.)).&zip." %unquote(&options.)
ENCODING = ENCODING =
%if %bquote(&packageEncoding.) NE %then &packageEncoding. ; %if %bquote(&packageEncoding.) NE %then &packageEncoding. ;
%else utf8 ; %else utf8 ;

View File

@@ -19,7 +19,7 @@
is provided in required version */ is provided in required version */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to load additional content for a SAS package, version 20241207. Run %loadPackageAddCnt() for help info.' des = 'Macro to load additional content for a SAS package, version 20251017. Run %loadPackageAddCnt() for help info.'
minoperator minoperator
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -35,7 +35,7 @@ minoperator
%put ### This is short help information for the `loadPackageAddCnt` macro #; %put ### This is short help information for the `loadPackageAddCnt` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to *load* additional content for a SAS package, version `20241207` #; %put # Macro to *load* additional content for a SAS package, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -75,6 +75,7 @@ minoperator
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put ### Example 1 ###################################################################; %put ### Example 1 ###################################################################;
%put # #; %put # #;
@@ -115,10 +116,9 @@ minoperator
options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc; options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc;
%local _PackageFileref_; %local _PackageFileref_;
/* %let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.); */
data _null_; data _null_;
call symputX("_PackageFileref_", "A" !! put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); call symputX("_PackageFileref_", "A" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
call symputX("_TargetFileref_", "T" !! put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); call symputX("_TargetFileref_", "T" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run; run;
/* when the packages reference is multi-directory search for the first one containing the package */ /* when the packages reference is multi-directory search for the first one containing the package */
@@ -129,7 +129,7 @@ minoperator
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */ if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS"); do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS")); p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, "%lowcase(&packageName.).&zip.")); exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
if exists then leave; if exists then leave;
end; end;
if exists then call symputx("path", p, "L"); if exists then call symputx("path", p, "L");
@@ -137,14 +137,14 @@ minoperator
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
/* put location of package myPackageFile.zip here */ /* put location of package myPackageFile.zip here */
"&path./%lowcase(&packageName.).&zip." "&path./%sysfunc(lowcase(&packageName.)).&zip."
; ;
%if %sysfunc(fexist(&_PackageFileref_.)) %then %if %sysfunc(fexist(&_PackageFileref_.)) %then
%do; %do;
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
/* check existence of addcnt.zip inside package */ /* check existence of addcnt.zip inside package */
"&path./%lowcase(&packageName.).&zip." "&path./%sysfunc(lowcase(&packageName.)).&zip."
member='addcnt.zip' member='addcnt.zip'
; ;
%if %sysfunc(fexist(&_PackageFileref_.)) %then %if %sysfunc(fexist(&_PackageFileref_.)) %then
@@ -152,7 +152,7 @@ minoperator
/* get metadata */ /* get metadata */
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
"&path./%lowcase(&packageName.).&zip." "&path./%sysfunc(lowcase(&packageName.)).&zip."
; ;
%include &_PackageFileref_.(packagemetadata.sas) / &source2.; %include &_PackageFileref_.(packagemetadata.sas) / &source2.;
filename &_PackageFileref_. clear; filename &_PackageFileref_. clear;
@@ -191,7 +191,7 @@ minoperator
/*options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;*/ /*options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;*/
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
"&path./%lowcase(&packageName.).&zip." "&path./%sysfunc(lowcase(&packageName.)).&zip."
member='addcnt.zip' member='addcnt.zip'
; ;
/*********************/ /*********************/
@@ -199,10 +199,10 @@ minoperator
%if %sysfunc(fexist(&_TargetFileref_.)) %then %if %sysfunc(fexist(&_TargetFileref_.)) %then
%do; %do;
%if %sysfunc(fileexist(%sysfunc(pathname(&_TargetFileref_.))/%lowcase(&packageName.)_AdditionalContent)) %then %if %sysfunc(fileexist(%sysfunc(pathname(&_TargetFileref_.))/%sysfunc(lowcase(&packageName.))_AdditionalContent)) %then
%do; /* dir for AC already exists */ %do; /* dir for AC already exists */
%put WARNING: Target location:; %put WARNING: Target location:;
%put WARNING- %sysfunc(pathname(&_TargetFileref_.))/%lowcase(&packageName.)_AdditionalContent; %put WARNING- %sysfunc(pathname(&_TargetFileref_.))/%sysfunc(lowcase(&packageName.))_AdditionalContent;
%put WARNING- already exist. Please remove it manually to upload additional contents.; %put WARNING- already exist. Please remove it manually to upload additional contents.;
%put WARNING- Additional Content will not be loaded.; %put WARNING- Additional Content will not be loaded.;
%put WARNING- ; %put WARNING- ;
@@ -213,12 +213,12 @@ minoperator
/* create target location */ /* create target location */
%put INFO:; %put INFO:;
%put Additional content will be located in:; %put Additional content will be located in:;
%put %sysfunc(dcreate(%lowcase(&packageName.)_AdditionalContent,%sysfunc(pathname(&_TargetFileref_.)))); %put %sysfunc(dcreate(%sysfunc(lowcase(&packageName.))_AdditionalContent,%sysfunc(pathname(&_TargetFileref_.))));
%if NOT (%sysfunc(fileexist(%sysfunc(pathname(&_TargetFileref_.))/%lowcase(&packageName.)_AdditionalContent))) %then %if NOT (%sysfunc(fileexist(%sysfunc(pathname(&_TargetFileref_.))/%sysfunc(lowcase(&packageName.))_AdditionalContent))) %then
%do; /* dir for AC cannot be generated */ %do; /* dir for AC cannot be generated */
%put ERROR: Cannot create target location:; %put ERROR: Cannot create target location:;
%put ERROR- %sysfunc(pathname(&_TargetFileref_.))/%lowcase(&packageName.)_AdditionalContent; %put ERROR- %sysfunc(pathname(&_TargetFileref_.))/%sysfunc(lowcase(&packageName.))_AdditionalContent;
%put ERROR- Additional Content will not be loaded.; %put ERROR- Additional Content will not be loaded.;
%put ERROR- ; %put ERROR- ;
%end; %end;
@@ -237,7 +237,7 @@ minoperator
if fexist("in") then if fexist("in") then
do; do;
rc2=filename("out", pathname("WORK")!!"/%lowcase(&packageName.)addcnt.zip", "disk", "lrecl=1 recfm=n"); rc2=filename("out", pathname("WORK")!!"/%sysfunc(lowcase(&packageName.))addcnt.zip", "disk", "lrecl=1 recfm=n");
length rc2txt $ 8192; length rc2txt $ 8192;
rc2txt=sysmsg(); rc2txt=sysmsg();
@@ -266,9 +266,9 @@ minoperator
%if &AdditionalContent. %then %if &AdditionalContent. %then
%do; %do;
filename f DUMMY; filename f DUMMY;
filename f ZIP "%sysfunc(pathname(WORK))/%lowcase(&packageName.)addcnt.zip"; filename f ZIP "%sysfunc(pathname(WORK))/%sysfunc(lowcase(&packageName.))addcnt.zip";
options dlCreateDir; options dlCreateDir;
libname outData "%sysfunc(pathname(&_TargetFileref_.))/%lowcase(&packageName.)_AdditionalContent"; libname outData "%sysfunc(pathname(&_TargetFileref_.))/%sysfunc(lowcase(&packageName.))_AdditionalContent";
data WORK.__&_TargetFileref_._zip___; data WORK.__&_TargetFileref_._zip___;
did = dopen("f"); did = dopen("f");
@@ -291,6 +291,8 @@ minoperator
set WORK.__&_TargetFileref_._zip___ end = EOF; set WORK.__&_TargetFileref_._zip___ end = EOF;
wc = countw(file,"/\"); wc = countw(file,"/\");
put wc= file=;
length libText pathname_f $ 8192; length libText pathname_f $ 8192;
libText = pathname("outData", "L"); libText = pathname("outData", "L");
@@ -309,15 +311,24 @@ minoperator
end; end;
pathname_f = pathname("f"); pathname_f = pathname("f");
rc1 = filename("in", strip(pathname_f), "zip", "member='" !! strip(file) !! "' lrecl=1 recfm=n");
length rc1msg $ 8192; length rc1msg $ 8192;
rc1 = filename("in", strip(pathname_f), "zip", "member='" !! strip(file) !! "' lrecl=1 recfm=n");
rc1msg = sysmsg(); rc1msg = sysmsg();
rc2 = filename("out", catx("/", libText, scan(file, j , "/\")), "disk", "lrecl=1 recfm=n");
length fileNameOutPath $ 8192;
fileNameOutPath = catx("/", libText, scan(file, j , "/\"));
/* check for Windows */
if lengthn(fileNameOutPath)>260 then
if symget('SYSSCP')='WIN' then
put "INFO: Pathname plus filename length exceeds 260. Under Windows family OS it may cause problems.";
length rc2msg $ 8192; length rc2msg $ 8192;
rc2 = filename("out", fileNameOutPath, "disk", "lrecl=1 recfm=n");
rc2msg = sysmsg(); rc2msg = sysmsg();
rc3 = fcopy("in", "out");
length rc3msg $ 8192; length rc3msg $ 8192;
rc3 = fcopy("in", "out");
rc3msg = sysmsg(); rc3msg = sysmsg();
loadingProblem + (rc3 & 1); loadingProblem + (rc3 & 1);
@@ -325,7 +336,7 @@ minoperator
if rc3 then if rc3 then
do; do;
put "ERROR: Cannot extract: " file; put "ERROR: Cannot extract: " file;
put (rc1 rc2 rc3) (=); put "ERROR-" (rc1 rc2 rc3) (=);
put (rc1msg rc2msg rc3msg) (/); put (rc1msg rc2msg rc3msg) (/);
put "ERROR-"; put "ERROR-";
end; end;

View File

@@ -11,7 +11,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20241207. Run %loadPackages() for help info.' des = 'Macro to load multiple SAS packages at one run, version 20251017. Run %loadPackages() for help info.'
parmbuff parmbuff
; ;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
@@ -27,7 +27,7 @@ parmbuff
%put ### This is short help information for the `loadPackageS` macro #; %put ### This is short help information for the `loadPackageS` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro wrapper for the loadPackage macro, version `20241207` #; %put # Macro wrapper for the loadPackage macro, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -52,6 +52,7 @@ parmbuff
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put #### Example ####################################################################; %put #### Example ####################################################################;
%put # #; %put # #;

View File

@@ -23,7 +23,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20241207. Run %previewPackage() for help info.' des = 'Macro to preview content of a SAS package, version 20251017. Run %previewPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -38,7 +38,7 @@ des = 'Macro to preview content of a SAS package, version 20241207. Run %preview
%put ### This is short help information for the `previewPackage` macro #; %put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to get preview of a SAS packages, version `20241207` #; %put # Macro to get preview of a SAS packages, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -82,6 +82,7 @@ des = 'Macro to preview content of a SAS package, version 20241207. Run %preview
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put #### Example ####################################################################; %put #### Example ####################################################################;
%put # #; %put # #;
@@ -117,8 +118,9 @@ des = 'Macro to preview content of a SAS package, version 20241207. Run %preview
options NOnotes NOsource ls=MAX ps=MAX msglevel=N NOmautocomploc; options NOnotes NOsource ls=MAX ps=MAX msglevel=N NOmautocomploc;
%local _PackageFileref_; %local _PackageFileref_;
/* %let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.); */ data _null_;
data _null_; call symputX("_PackageFileref_", "P" !! put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); run; call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
/* when the packages reference is multi-directory search for the first one containing the package */ /* when the packages reference is multi-directory search for the first one containing the package */
data _null_; data _null_;
@@ -128,7 +130,7 @@ des = 'Macro to preview content of a SAS package, version 20241207. Run %preview
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */ if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS"); do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS")); p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, "%lowcase(&packageName.).&zip.")); exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
if exists then leave; if exists then leave;
end; end;
if exists then call symputx("path", p, "L"); if exists then call symputx("path", p, "L");
@@ -136,7 +138,7 @@ des = 'Macro to preview content of a SAS package, version 20241207. Run %preview
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
/* put location of package myPackageFile.zip here */ /* put location of package myPackageFile.zip here */
"&path./%lowcase(&packageName.).&zip." %unquote(&options.) "&path./%sysfunc(lowcase(&packageName.)).&zip." %unquote(&options.)
; ;
%if %sysfunc(fexist(&_PackageFileref_.)) %then %if %sysfunc(fexist(&_PackageFileref_.)) %then
%do; %do;
@@ -144,7 +146,7 @@ des = 'Macro to preview content of a SAS package, version 20241207. Run %preview
filename &_PackageFileref_. clear; filename &_PackageFileref_. clear;
options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.; options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
"&path./%lowcase(&packageName.).&zip." %unquote(&options.) "&path./%sysfunc(lowcase(&packageName.)).&zip." %unquote(&options.)
ENCODING = ENCODING =
%if %bquote(&packageEncoding.) NE %then &packageEncoding. ; %if %bquote(&packageEncoding.) NE %then &packageEncoding. ;
%else utf8 ; %else utf8 ;

View File

@@ -8,7 +8,7 @@
,nobs=0 /* technical parameter */ ,nobs=0 /* technical parameter */
) )
/*** HELP START ***/ /*** HELP START ***/
/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20241207. Run %splitCodeForPackage() for help info.' / des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20251017. Run %splitCodeForPackage() for help info.'
; ;
/*%macro _();%mend _;*/ /*%macro _();%mend _;*/
%if (%superq(codeFile) = ) OR (%qupcase(&codeFile.) = HELP) %then %if (%superq(codeFile) = ) OR (%qupcase(&codeFile.) = HELP) %then
@@ -25,7 +25,7 @@
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Utility macro to *split* single file with SAS package code into multiple #; %put # Utility macro to *split* single file with SAS package code into multiple #;
%put # files with separate snippets, version `20241207` #; %put # files with separate snippets, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -60,6 +60,7 @@
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put ### Example 1 ###################################################################; %put ### Example 1 ###################################################################;
%put # #; %put # #;
@@ -106,7 +107,6 @@
%GOTO ENDofsplitCodeForPackage; %GOTO ENDofsplitCodeForPackage;
%end; %end;
%local options_tmp2 ; %local options_tmp2 ;
%let options_tmp2 = ls=%sysfunc(getoption(ls)) ps=%sysfunc(getoption(ps)) %let options_tmp2 = ls=%sysfunc(getoption(ls)) ps=%sysfunc(getoption(ps))
%sysfunc(getoption(notes)) %sysfunc(getoption(source)) %sysfunc(getoption(notes)) %sysfunc(getoption(source))
@@ -172,7 +172,6 @@ options nomprint nosymbolgen nomlogic notes source ls=MAX ps=MAX msglevel=N ;
call symputX('packagePath',packagePath,"L"); call symputX('packagePath',packagePath,"L");
run; run;
data w.files; data w.files;
stop; stop;
run; run;
@@ -198,7 +197,7 @@ options nomprint nosymbolgen nomlogic notes source ls=MAX ps=MAX msglevel=N ;
line = left(lowcase(_infile_)); line = left(lowcase(_infile_));
block=scan(line,1," "); block=scan(line,1," ");
if block in ( if block in (
'/*##$##-code-block-start-##$##' '/*##$##-code-block-start-##$##'
'/*##$##-code-block-end-##$##' '/*##$##-code-block-end-##$##'
); );
@@ -402,7 +401,7 @@ options nomprint nosymbolgen nomlogic notes source ls=MAX ps=MAX msglevel=N ;
*/ */
if firstLine[j] then if firstLine[j] then
do; do;
put '/* File generated with help of SAS Packages Framework, version 20241207. */'; put '/* File generated with help of SAS Packages Framework, version 20251017. */';
firstLine[j]=0; firstLine[j]=0;
end; end;
put _infile_; put _infile_;
@@ -418,5 +417,4 @@ options &options_tmp2.;
%ENDofsplitCodeForPackage: %ENDofsplitCodeForPackage:
%mend splitCodeForPackage; %mend splitCodeForPackage;
/**/ /**/

View File

@@ -20,7 +20,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to unload SAS package, version 20241207. Run %unloadPackage() for help info.' des = 'Macro to unload SAS package, version 20251017. Run %unloadPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -35,7 +35,7 @@ des = 'Macro to unload SAS package, version 20241207. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #; %put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to unload SAS packages, version `20241207` #; %put # Macro to unload SAS packages, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -75,6 +75,7 @@ des = 'Macro to unload SAS package, version 20241207. Run %unloadPackage() for h
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put ### Example #####################################################################; %put ### Example #####################################################################;
%put # #; %put # #;
@@ -113,8 +114,9 @@ des = 'Macro to unload SAS package, version 20241207. Run %unloadPackage() for h
options NOnotes NOsource ls=MAX ps=MAX msglevel=N NOmautocomploc; options NOnotes NOsource ls=MAX ps=MAX msglevel=N NOmautocomploc;
%local _PackageFileref_; %local _PackageFileref_;
/* %let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.); */ data _null_;
data _null_; call symputX("_PackageFileref_", "P" !! put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); run; call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
/* when the packages reference is multi-directory search for the first one containing the package */ /* when the packages reference is multi-directory search for the first one containing the package */
data _null_; data _null_;
@@ -124,7 +126,7 @@ des = 'Macro to unload SAS package, version 20241207. Run %unloadPackage() for h
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */ if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS"); do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS")); p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, "%lowcase(&packageName.).&zip.")); exists + fileexist(catx("/", p, lowcase("&packageName.") !! ".&zip."));
if exists then leave; if exists then leave;
end; end;
if exists then call symputx("path", p, "L"); if exists then call symputx("path", p, "L");
@@ -132,7 +134,7 @@ des = 'Macro to unload SAS package, version 20241207. Run %unloadPackage() for h
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
/* put location of package myPackageFile.zip here */ /* put location of package myPackageFile.zip here */
"&path./%lowcase(&packageName.).&zip." %unquote(&options.) "&path./%sysfunc(lowcase(&packageName.)).&zip." %unquote(&options.)
; ;
%if %sysfunc(fexist(&_PackageFileref_.)) %then %if %sysfunc(fexist(&_PackageFileref_.)) %then
%do; %do;
@@ -140,7 +142,7 @@ des = 'Macro to unload SAS package, version 20241207. Run %unloadPackage() for h
filename &_PackageFileref_. clear; filename &_PackageFileref_. clear;
options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.; options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
filename &_PackageFileref_. &ZIP. filename &_PackageFileref_. &ZIP.
"&path./%lowcase(&packageName.).&zip." %unquote(&options.) "&path./%sysfunc(lowcase(&packageName.)).&zip." %unquote(&options.)
ENCODING = ENCODING =
%if %bquote(&packageEncoding.) NE %then &packageEncoding. ; %if %bquote(&packageEncoding.) NE %then &packageEncoding. ;
%else utf8 ; %else utf8 ;

View File

@@ -13,7 +13,7 @@
hashing_file() function, SAS 9.4M6 */ hashing_file() function, SAS 9.4M6 */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20241207. Run %verifyPackage() for help info.' des = 'Macro to verify SAS package with the hash digest, version 20251017. Run %verifyPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -28,7 +28,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20241207. Run %
%put ### This is short help information for the `verifyPackage` macro #; %put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to verify SAS package with it hash digest, version `20241207` #; %put # Macro to verify SAS package with it hash digest, version `20251017` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -58,6 +58,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20241207. Run %
%put # #; %put # #;
%put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #;
%put # to learn more. #; %put # to learn more. #;
%put # Tutorials available at: `https://github.com/yabwon/HoW-SASPackages` #;
%put # #; %put # #;
%put #### Example ####################################################################; %put #### Example ####################################################################;
%put # #; %put # #;
@@ -96,8 +97,9 @@ des = 'Macro to verify SAS package with the hash digest, version 20241207. Run %
options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc; options NOnotes NOsource ls=MAX ps=MAX NOfullstimer NOstimer msglevel=N NOmautocomploc;
%local _PackageFileref_; %local _PackageFileref_;
/* %let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.); */ data _null_;
data _null_; call symputX("_PackageFileref_", "P" !! put(MD5("%lowcase(&packageName.)"), hex7. -L), "L"); run; call symputX("_PackageFileref_", "P" !! put(MD5(lowcase("&packageName.")), hex7. -L), "L");
run;
/* when the packages reference is multi-directory search for the first one containing the package */ /* when the packages reference is multi-directory search for the first one containing the package */
data _null_; data _null_;
@@ -107,7 +109,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20241207. Run %
if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */ if char(packages,1) ^= "(" then packages = quote(strip(packages)); /* for paths with spaces */
do i = 1 to kcountw(packages, "()", "QS"); do i = 1 to kcountw(packages, "()", "QS");
p = dequote(kscanx(packages, i, "()", "QS")); p = dequote(kscanx(packages, i, "()", "QS"));
exists + fileexist(catx("/", p, "%lowcase(&packageName.).zip")); exists + fileexist(catx("/", p, lowcase("&packageName.") !! "zip")); /* check on zip files only! */
if exists then leave; if exists then leave;
end; end;
if exists then call symputx("path", p, "L"); if exists then call symputx("path", p, "L");
@@ -115,7 +117,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20241207. Run %
filename &_PackageFileref_. filename &_PackageFileref_.
/* put location of package myPackageFile.zip here */ /* put location of package myPackageFile.zip here */
"&path./%lowcase(&packageName.).zip" "&path./%sysfunc(lowcase(&packageName.)).zip"
; ;
%if %sysfunc(fexist(&_PackageFileref_.)) %then %if %sysfunc(fexist(&_PackageFileref_.)) %then
%do; %do;

View File

@@ -1,7 +1,7 @@
--- ---
# SAS Packages Framework, version `20241207` # SAS Packages Framework, version `20251017`
--- ---
@@ -25,13 +25,13 @@
## This is short SAS Packages Framework help information <a name="helpinfo"></a> ## This is short SAS Packages Framework help information <a name="helpinfo"></a>
A **SAS package** is an automatically generated, single, stand alone *zip* file containing organised and ordered code structures, created by the developer and extended with additional automatically generated "driving" files (i.e. description, metadata, load, unload, and help files). A **SAS package** is an automatically generated, single, stand alone *zip* file containing organized and ordered code structures, created by the developer and extended with additional automatically generated "driving" files (i.e. description, metadata, load, unload, and help files).
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. 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 **`20241207`**. In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20251017`**.
**To get started with SAS Packages** try this [**`Getting Started with SAS Packages`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf "Getting Started with SAS Packages") presentation (see the `./SPF/Documentation` directory). **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).
**The documentation and more advance reading** would be the [**`SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/SAS(r)%20packages%20-%20the%20way%20to%20share%20(a%20how%20to)-%20Paper%204725-2020%20-%20extended.pdf "SAS packages - the way to share") article (see the `./SPF/Documentation` directory). **The documentation and more advance reading** would be the [**`SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/SAS(r)%20packages%20-%20the%20way%20to%20share%20(a%20how%20to)-%20Paper%204725-2020%20-%20extended.pdf "SAS packages - the way to share") article (see the `./SPF/Documentation` directory).
@@ -43,7 +43,7 @@ After assigning the directory do not change them when using the SPF since it may
## Tutorial on SAS Packages and SAS Packages Framework ## Tutorial on SAS Packages and SAS Packages Framework
"From 0 to hero" tutorial explaining what are SAS Packages, and how to work with "From 0 to hero" tutorial explaining what are SAS Packages, and how to work with
them using the SPF can be found [**HERE**](https://github.com/yabwon/HoW-SASPackages). them using the SPF can be found [**HERE**](https://github.com/yabwon/HoW-SASPackages).
-------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------
@@ -52,7 +52,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> ## This is short help information for the `installPackage` macro <a name="installpackage"></a>
-------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------
Macro to install SAS packages, version `20241207` Macro to install SAS packages, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -84,18 +84,20 @@ them using the SPF can be found [**HERE**](https://github.com/yabwon/HoW-SASPack
`https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/` `https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/`
- `mirror=` Indicates which web location for packages installation is used. - `mirror=` Indicates which web location for packages installation is used.
Value `0` indicates: Value `0` or `SASPAC` indicates:
`https://github.com/SASPAC/` `https://github.com/SASPAC/`
Value `1` indicates: Value `1` indicates:
`https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main` `https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main`
Value `2` indicates: Value `2` indicates:
`https://pages.mini.pw.edu.pl/~jablonskib/SASpublic/SAS_PACKAGES` `https://pages.mini.pw.edu.pl/~jablonskib/SASpublic/SAS_PACKAGES`
Value `3` or `PharmaForest` indicates:
`https://github.com/PharmaForest/`
Default value is `0`. Default value is `0`.
- `version=` Indicates which historical version of a package to install. - `version=` Indicates which historical version of a package to install.
Historical version are available only if `mirror=0` is set. Historical version are currently available only if `mirror=0` is set.
Default value is null which means "install the latest". Default value is null which means "install the latest".
When there are multiple packages to install version When there are multiple packages to install version variable
is scan sequentially. is scan sequentially.
- `replace=` With default value of `1` it causes existing package file - `replace=` With default value of `1` it causes existing package file
@@ -125,10 +127,17 @@ them using the SPF can be found [**HERE**](https://github.com/yabwon/HoW-SASPack
has the following form: `<number of successes>.<number of failures>` has the following form: `<number of successes>.<number of failures>`
The macro variable is created as a *global* macro variable. The macro variable is created as a *global* macro variable.
- `github=` *Optional.* A name of a user or an organization in GitHub.
Allows an easy set of the search path for packages available on GitHub:
`https://github.com/<github>/<packagename>/raw/.../`
All characters except `[A-z0-9_.-]` are compressed.
-------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` to learn more. Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
### Example ################################################################################ ### Example ################################################################################
Enabling the SAS Package Framework Enabling the SAS Package Framework
@@ -153,7 +162,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
Enabling the SAS Package Framework Enabling the SAS Package Framework
from the local directory and installing & loading from the local directory and installing & loading
the multiple packages from the Internet. multiple packages with versions from the Internet.
Assume that the `SPFinit.sas` file Assume that the `SPFinit.sas` file
is located in the "C:/SAS_PACKAGES/" folder. is located in the "C:/SAS_PACKAGES/" folder.
@@ -171,7 +180,7 @@ filename packages "C:/SAS_PACKAGES";
## This is short help information for the `helpPackage` macro <a name="helppackage"></a> ## This is short help information for the `helpPackage` macro <a name="helppackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to get help about SAS packages, version `20241207` Macro to get help about SAS packages, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -222,6 +231,8 @@ filename packages "C:/SAS_PACKAGES";
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
## Example #################################################################### ## Example ####################################################################
Enabling the SAS Package Framework Enabling the SAS Package Framework
@@ -247,7 +258,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `loadPackage` macro <a name="loadpackage"></a> ## This is short help information for the `loadPackage` macro <a name="loadpackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to *load* SAS packages, version `20241207` Macro to *load* SAS packages, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -316,6 +327,8 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
## Example 1 ################################################################## ## Example 1 ##################################################################
Enabling the SAS Package Framework Enabling the SAS Package Framework
@@ -403,7 +416,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> ## This is short help information for the `loadPackageS` macro <a name="loadpackages"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro wrapper for the loadPackage macro, version `20241207` Macro wrapper for the loadPackage macro, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -429,6 +442,8 @@ If created, those macros are automatically deleted when the `%unloadPackage()` m
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
### Example ################################################################### ### Example ###################################################################
Enabling the SAS Package Framework Enabling the SAS Package Framework
@@ -452,7 +467,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `unloadPackage` macro <a name="unloadpackage"></a> ## This is short help information for the `unloadPackage` macro <a name="unloadpackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to unload SAS packages, version `20241207` Macro to unload SAS packages, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -493,6 +508,8 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
### Example ################################################################### ### Example ###################################################################
Enabling the SAS Package Framework Enabling the SAS Package Framework
@@ -517,7 +534,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `listPackages` macro <a name="listpackages"></a> ## This is short help information for the `listPackages` macro <a name="listpackages"></a>
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
Macro to list available SAS packages, version `20241207` Macro to list available SAS packages, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -537,6 +554,8 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
### Example ############################################################################# ### Example #############################################################################
Enabling the SAS Package Framework Enabling the SAS Package Framework
@@ -558,7 +577,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `verifyPackage` macro <a name="verifypackage"></a> ## This is short help information for the `verifyPackage` macro <a name="verifypackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to verify SAS package with it hash digest, version `20241207` Macro to verify SAS package with it hash digest, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -612,7 +631,7 @@ filename packages "C:/SAS_PACKAGES"; %* set-up a directory for packages;
## This is short help information for the `previewPackage` macro <a name="previewpackage"></a> ## This is short help information for the `previewPackage` macro <a name="previewpackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to get preview of a SAS packages, version `20241207` Macro to get preview of a SAS packages, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -658,6 +677,8 @@ filename packages "C:/SAS_PACKAGES"; %* set-up a directory for packages;
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
### Example ################################################################### ### Example ###################################################################
Enabling the SAS Package Framework Enabling the SAS Package Framework
@@ -679,7 +700,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `generatePackage` macro <a name="generatepackage"></a> ## This is short help information for the `generatePackage` macro <a name="generatepackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to generate SAS packages, version `20241207` Macro to generate SAS packages, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -697,49 +718,61 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
### Parameters: ### Parameters:
1. `filesLocation=` Location of package files, example value: 1. `filesLocation=` Location of package files, example value:
`%sysfunc(pathname(work))/packagename`. `%sysfunc(pathname(work))/packagename`.
Default use case: Default use case:
`%generatePackage(filesLocation=/path/to/packagename)` `%generatePackage(filesLocation=/path/to/packagename)`
If empty displays this help information. If empty displays this help information.
Testing parameters: Testing parameters:
- `testPackage=` Indicator if tests should be executed. - `testPackage=` Indicator if tests should be executed.
Default value: `Y`, means "execute tests" Default value: `Y`, means "execute tests"
- `packages=` Location of other packages for testing - `packages=` Location of other packages for testing
if there are dependencies in loading the package. if there are dependencies in loading the package.
Has to be a single directory, if more than one are Has to be a single directory, if more than one are
provided than only the first is used. provided than only the first is used.
If path to location contains spaces it should be quoted! If path to location contains spaces it should be quoted!
- `testResults=` Location where tests results should be stored, - `testResults=` Location where tests results should be stored,
if null (the default) then the session WORK is used. if null (the default) then the session WORK is used.
- `sasexe=` Location of a DIRECTORY where the SAS binary is located, - `workInTestResults=` Indicates if WORK directories for test sessions should
if null (the default) then the `!SASROOT` is used. be located in the same place as results.
The default value: `0` means "do not do this".
Available values are `0` and `1`.
- `sascfgFile=` Location of a FILE with testing session configuration - `testWorkPath=` Points a location where tests sessions work directories
parameters, if null (the default) then no config file should be stored. By default it is null what means that
is pointed during the SAS invocation, a sub-directory of the main SAS session WORK is used.
if set to `DEF` then the `!SASROOT/sasv9.cfg` is used. Takes precedence over `workInTestResults=`.
- `delTestWork=` Indicates if `WORK` directories generated by user tests - `sasexe=` Location of a DIRECTORY where the SAS binary is located,
should be deleted, i.e. the (NO)WORKTERM option is set. if null (the default) then the `!SASROOT` is used.
The default value: `1` means "delete tests work".
Available values are `0` and `1`.
- `markdownDoc=` Indicates if a markdown file with documentation - `sascfgFile=` Location of a FILE with testing session configuration
be generated from help information blocks. parameters, if null (the default) then no config file
The default value: `0` means "do not generate the file". is pointed during the SAS invocation,
Available values are `0` and `1`. if set to `DEF` then the `!SASROOT/sasv9.cfg` is used.
- `easyArch=` When creating documentation file (`markdownDoc=1`) - `delTestWork=` Indicates if `WORK` directories generated by user tests
indicates if a copy of the zip and markdown files should be deleted, i.e. the (NO)WORKTERM option is set.
with the version number in the file name be created The default value: `1` means "delete tests work".
The default value: `0` means "do not create files". Available values are `0` and `1`.
Available values are `0` and `1`.
Documentation parameters:
- `markdownDoc=` Indicates if a markdown file with documentation
be generated from help information blocks.
The default value: `0` means "do not generate the file".
Available values are `0` and `1`.
- `easyArch=` When creating documentation file (`markdownDoc=1`)
indicates if a copy of the zip and markdown files
with the version number in the file name be created
The default value: `0` means "do not create files".
Available values are `0` and `1`.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@@ -894,7 +927,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> ## This is short help information for the `extendPackagesFileref` macro <a name="extendpackagesfileref"></a>
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
Macro to list directories pointed by 'packages' fileref, version `20241207` Macro to list directories pointed by 'packages' fileref, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -913,6 +946,8 @@ All files have to have `.sas` extension. Other files are ignored.
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
### Example ################################################################### ### Example ###################################################################
Enabling the SAS Package Framework Enabling the SAS Package Framework
@@ -934,7 +969,7 @@ filename packages ("D:/NEW_DIR" %extendPackagesFileref()); %* add new directory;
## This is short help information for the `loadPackageAddCnt` macro <a name="loadpackageaddcnt"></a> ## This is short help information for the `loadPackageAddCnt` macro <a name="loadpackageaddcnt"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to load *additional content* for a SAS package, version `20241207` Macro to load *additional content* for a SAS package, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -975,6 +1010,8 @@ filename packages ("D:/NEW_DIR" %extendPackagesFileref()); %* add new directory;
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
By *default* additional content is not deployed automatically e.g., By *default* additional content is not deployed automatically e.g.,
@@ -1026,7 +1063,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Utility macro to *split* single file with SAS package code into multiple Utility macro to *split* single file with SAS package code into multiple
files with separate snippets, version `20241207` files with separate snippets, version `20251017`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -1062,6 +1099,8 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation`
to learn more. to learn more.
Tutorials available at: `https://github.com/yabwon/HoW-SASPackages`
### Example 1 ################################################################## ### Example 1 ##################################################################
Assume that the `myPackageCode.sas` file Assume that the `myPackageCode.sas` file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
Copyright (c) 2019 - 2024 Bartosz Jablonski Copyright (c) 2019 - 2025 Bartosz Jablonski
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -86,7 +86,7 @@ SHA256 digest for macroArray: F*3F3893F1FCD78719543703E4353F4CC19811D247C016F220
--- ---
- **BasePlus**\[2.1.0\] adds a bunch of functionalities I am missing in BASE SAS, such as: - **BasePlus**\[3.0.0\] adds a bunch of functionalities I am missing in BASE SAS, such as:
```sas ```sas
call arrMissToRight(myArray); call arrMissToRight(myArray);
call arrFillMiss(17, myArray); call arrFillMiss(17, myArray);
@@ -117,8 +117,10 @@ format x bool.;
%put %monthShift(2023,1,-5); %put %monthShift(2023,1,-5);
%put #%expandDataSetsList(lib=sashelp,datasets=_all_)#; %put #%expandDataSetsList(lib=sashelp,datasets=_all_)#;
%workLib(ABC)
``` ```
SHA256 digest for BasePlus: F*DFA83F8E0D7424DEB63D49620392068BC68D766552E2804CB6B01DE8E5A87769 SHA256 digest for BasePlus: F*B9F6D8F1EDD1ECDA89F4BE327C4F4202649475D1D9DFB476279B633D9F14125D
[Documentation for BasePlus](https://github.com/SASPAC/blob/main/baseplus.md "Documentation for BasePlus") [Documentation for BasePlus](https://github.com/SASPAC/blob/main/baseplus.md "Documentation for BasePlus")

View File

@@ -1,3 +1,18 @@
/* 20251015 */
BasePlus: F*B9F6D8F1EDD1ECDA89F4BE327C4F4202649475D1D9DFB476279B633D9F14125D
/* 20250905 */
BasePlus: F*DB0811D8F207641BD45FCE30CB75D03CDF8D06849EBEA268BB575358FAA4E76C
/* 20250807 */
BasePlus: F*19FE220C82DE4B9990B4AC352A9D9DEF5FAF2FD601BE756B2F3A2AC39CDAF381
/* 20250805 */
BasePlus: F*B2D318DD9708D74E5A7C419F7CAE1BF46D662B7F6AEE7E6B1B9D9B6858A5C41A
/* 20250804 */
BasePlus: F*71DC1AFA709B2977E8AEA452721776F62EEC8240ABD658AC83AA6D4310FC49B6
/* 20240909 */ /* 20240909 */
BasePlus: F*DFA83F8E0D7424DEB63D49620392068BC68D766552E2804CB6B01DE8E5A87769 BasePlus: F*DFA83F8E0D7424DEB63D49620392068BC68D766552E2804CB6B01DE8E5A87769

View File

@@ -9,22 +9,22 @@
### Version information: ### Version information:
- Package: BasePlus - Package: BasePlus
- Version: 2.1.0 - Version: 3.0.0
- Generated: 2024-09-09T12:55:04 - Generated: 2025-10-15T10:13:04
- Author(s): Bartosz Jablonski (yabwon@gmail.com), Quentin McMullen (qmcmullen@gmail.com) - Author(s): Bartosz Jablonski (yabwon@gmail.com), Quentin McMullen (qmcmullen@gmail.com), Ryo Nakaya (nakaya.ryou@gmail.com)
- Maintainer(s): Bartosz Jablonski (yabwon@gmail.com) - Maintainer(s): Bartosz Jablonski (yabwon@gmail.com)
- License: MIT - License: MIT
- File SHA256: `F*DFA83F8E0D7424DEB63D49620392068BC68D766552E2804CB6B01DE8E5A87769` for this version - File SHA256: `F*B9F6D8F1EDD1ECDA89F4BE327C4F4202649475D1D9DFB476279B633D9F14125D` for this version
- Content SHA256: `C*AB16F5B6538515607C3C254E401DC1ACA7293AB36990227F6E7792145CEEAB87` for this version - Content SHA256: `C*680412F6B403870A3A8975FC17300F7C92AEDECA48D3F242B5BC4E545DC6D313` for this version
--- ---
# The `BasePlus` package, version: `2.1.0`; # The `BasePlus` package, version: `3.0.0`;
--- ---
# The BasePlus package [ver. 2.1.0] <a name="baseplus-package"></a> ############################################### # The BasePlus package [ver. 3.0.0] <a name="baseplus-package"></a> ###############################################
The **BasePlus** package implements useful The **BasePlus** package implements useful
functions and functionalities I miss in the BASE SAS. functions and functionalities I miss in the BASE SAS.
@@ -47,7 +47,8 @@ Kudos to all who inspired me to generate this package:
*Quentin McMullen*, *Quentin McMullen*,
*Kurt Bremser*, *Kurt Bremser*,
*Leonid Batkhan*, *Leonid Batkhan*,
*Louise Hadden*. *Louise Hadden*,
*Ryo Nakaya*.
--- ---
@@ -387,6 +388,11 @@ proc print data=b_x;
run; run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 29** Create library ABC assigned to `<WORK>/ABC` directory:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%workLib(abc)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- ---
--- ---
@@ -403,7 +409,7 @@ localization (only if additional content was deployed during the installation pr
-------------------------------------------------------------------- --------------------------------------------------------------------
*SAS package generated by SAS Package Framework, version `20240711`* *SAS package generated by SAS Package Framework, version `20250729`*
-------------------------------------------------------------------- --------------------------------------------------------------------
@@ -490,10 +496,11 @@ The `BasePlus` package consists of the following content:
78. [`%translate()` macro ](#translate-macro-78 ) 78. [`%translate()` macro ](#translate-macro-78 )
79. [`%tranwrd()` macro ](#tranwrd-macro-79 ) 79. [`%tranwrd()` macro ](#tranwrd-macro-79 )
80. [`%unifyvarscasesize()` macro ](#unifyvarscasesize-macro-80 ) 80. [`%unifyvarscasesize()` macro ](#unifyvarscasesize-macro-80 )
81. [`%workpath()` macro ](#workpath-macro-81 ) 81. [`%worklib()` macro ](#worklib-macro-81 )
82. [`%workpath()` macro ](#workpath-macro-82 )
82. [License note](#license) 83. [License note](#license)
--- ---
@@ -838,6 +845,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
<,longFormat=> <,longFormat=>
<,fileExt=> <,fileExt=>
<,maxDepth=> <,maxDepth=>
<,backslashSens=>
) )
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
@@ -868,6 +876,11 @@ The basic syntax is the following, the `<...>` means optional parameters:
* `maxDepth=0` - *Optional*, if not zero then indicates * `maxDepth=0` - *Optional*, if not zero then indicates
maximum depth of search in the root path. maximum depth of search in the root path.
* `backslashSens=0` - *Optional*, if not zero then it indicates
that backslash(`\`) symbol in files and dirs
names is detectable under Linux. Accepted
values: `0` and `1`. Ignored under Windows.
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
@@ -989,7 +1002,12 @@ The QgetVars() returns quoted value [by %superq()].
See examples below for the details. See examples below for the details.
The `%getVars()` macro executes like a pure macro code. When `mcArray=` is not used the `%getVars()` macro executes like
a pure macro code. When `mcArray=` is not null (creation of a
macro variable array is requested) them a single semicolon is returned.
When `validvarname=ANY` in set special care should be kept.
See dedicated examples below.
### SYNTAX: ################################################################### ### SYNTAX: ###################################################################
@@ -1003,6 +1021,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
<,quote=> <,quote=>
<,mcArray=> <,mcArray=>
<,ignoreCases> <,ignoreCases>
<,nlit=>
) )
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
@@ -1025,23 +1044,32 @@ The basic syntax is the following, the `<...>` means optional parameters:
* `mcArray=` - *Optional*, default value is blank. * `mcArray=` - *Optional*, default value is blank.
1) When *null* - the macro behaves like a macro function 1) When *null* - the macro behaves like a macro function
and returns a text string with variables list. and ban be used in the `%put` or `%let=` statements.
2) When *not null* - behaviour of the macro is altered. The returned text is a string with variables list.
2) When *not null* - behavior of the macro is altered.
In such case a macro array of selected variables, named In such case a macro array of selected variables, named
with `mcArray` value as a prefix, is created. with `mcArray` value as a prefix, is created.
Furthermore a macro named as `mcArray` value is generated. Furthermore a macro named as `mcArray` value is generated.
(see the macroArray package for the details). (see the macroArray package for the details).
When `mcArray=` parameter is active the `getVars` macro When `mcArray=` parameter is active the `getVars` macro
cannot be called within the `%put` statement. Execution like: should not be called within the `%put` or `%let=` statements.
`%put %getVars(..., mcArray=XXX);` will result with A single semicolon is produced as the macro result, hence
an Explicit & Radical Refuse Of Run (aka ERROR). execution like: `%put %getVars(..., mcArray=XXX) some text;`
will result with an Explicit & Radical Refuse Of Run (aka ERROR).
* `ignoreCases=` - *Optional*, default value is 1. * `ignoreCases=` - *Optional*, default value is 1.
Indicates if search should be case insensitive. Indicates if search should be case insensitive.
* `nlit=` - *Optional*, default value is 0.
Introduced to improve `validvarname=ANY` handling.
Indicates if the `NLITERAL()` function should be
executed to cover spacial characters.
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
**When `validvarname=` option is _not_ `ANY`.**
**EXAMPLE 1.** A list of all variables from the **EXAMPLE 1.** A list of all variables from the
sashelp.class dataset: sashelp.class dataset:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
@@ -1267,6 +1295,44 @@ run;
%put %do_over(XYZ); %put %do_over(XYZ);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**When the `validvarname=ANY` option is set.**
**EXAMPLE 12.** Get all variables and handle special characters.
Without `nlit=1` the code will fail.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
options validvarname = any;
data varnameANY;
set sashelp.class(obs=3);
'A&B'n=42;
'space name'n=101;
'2025-08'n=234;
'2025%09'n=235;
"2025'10"n=236;
'2025"11'n=237;
run;
%put %getVars(varnameANY, nlit=1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 13.** Create macro variable array ABC for all variables.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%getVars(varnameANY, mcArray=ABC, nlit=1);
%put %ABC(1) %ABC(6) %ABC(7) %ABC(11);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 14.** Get only variables with illegal characters in names.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%let notV7compliant = %getVars(varnameANY, pattern=[^a-z0-9_], nlit=1);
%put &notV7compliant.;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 14.** Print variables starting with a digit.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%put %getVars(varnameANY, pattern=^\d, nlit=1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- ---
@@ -1929,6 +1995,11 @@ The basic syntax is the following, the `<...>` means optional parameters:
* `ignoreCases=` - *Optional*, default value is 1. * `ignoreCases=` - *Optional*, default value is 1.
Indicates if search should be case insensitive. Indicates if search should be case insensitive.
* `nlit=` - *Optional*, default value is 0.
Introduced to improve `validvarname=ANY` handling.
Indicates if the `NLITERAL()` function should be
executed to cover spacial characters.
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
@@ -6395,7 +6466,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
3. `false` - *Required*, value returned when condition is false. 3. `false` - *Required*, value returned when condition is false.
4 `v=` - *Optional*, v for verbose. If set to `1` extra notes * `v=` - *Optional*, v for verbose. If set to `1` extra notes
are printed. are printed.
--- ---
@@ -7555,7 +7626,71 @@ run;
--- ---
## `%workpath()` macro <a name="workpath-macro-81"></a> ###### ## `%worklib()` macro <a name="worklib-macro-81"></a> ######
## >>> `%workLib()` macro: <<< <a name="worklib-macro"></a> #######################
The `%workLib()` macro creates and assigns a WORK-scoped sub-library.
Purpose:
The macro creates (if needed) and assigns a SAS library as a sub-directory
under the current `WORK` location. This is useful for isolating temporary
outputs per task while ensuring automatic cleanup at the end of the SAS session.
Basic engines libraries, like `BASE`, `V*`, and simple `SPDE`, can be set.
### SYNTAX: ###################################################################
The basic syntax is the following, the `<...>` means optional parameters:
~~~~~~~~~~~~~~~~~~~~~~~sas
%workLib(lib,<engine>)
~~~~~~~~~~~~~~~~~~~~~~~
**Arguments description**:
- `lib` - *Required*: Name of a library (and sub-folder)
to create under WORK. The value must be a valid
nonempty SAS libref (8 characters max, starting
with a letter or underscore).
- `engine` - *Optional*, Name of a basic, directory level,
SAS engine, e.g. `BASE`. When empty the default
engine is used.
---
### Details
- Builds a target path: `<WORK>/<lib>`.
- All data written to this libref are temporary and will be removed
when the WORK library is cleared at session end.
- If a directory with the same name already exists under WORK,
the macro prints a note and simply assigns the LIBNAME to
that location.
- The `dcreate()` function is used to create sub-directory.
### EXAMPLES AND USECASES: ####################################################
**EXAMPLE 1.** Create basic library ABC:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%workLib(abc)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 2.** Create libraries with different engines:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%workLib(b,BASE)
%workLib(v,V6) %* for Windows only.;
%workLib(s,SPDE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
---
## `%workpath()` macro <a name="workpath-macro-82"></a> ######
## >>> `%workPath()` macro: <<< <a name="workpath-macro"></a> ####################### ## >>> `%workPath()` macro: <<< <a name="workpath-macro"></a> #######################
@@ -7598,7 +7733,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
# License <a name="license"></a> ###### # License <a name="license"></a> ######
Copyright (c) 2020 - 2024 Bartosz Jablonski Copyright (c) 2020 - 2025 Bartosz Jablonski
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

Binary file not shown.