12 Commits
2.1.0 ... 3.1.0

Author SHA1 Message Date
SASPAC - SAS Packages Archive
124cc01c3d Merge pull request #52 from SASPAC/dev
The BasePlus package [ver. 3.1.0]
2025-10-20 11:07:32 +02:00
Bart Jablonski
65dc1c510d The BasePlus package [ver. 3.1.0]
The BasePlus package [ver. 3.1.0]

Update:
- Update in macro `%findDSwithVarVal()`. To handle bigger range of engines, when a library is assigned with different engine than: "BASE","SPDE","V6","V7","V8","V9","CVP" observation number is not returned.

- File SHA256: `F*9FFBC40A2B7FC51161C7D6D120DADC3ACEF8087E4EB43BB1A3F0FBC1F1CBD5AC` for this version
- Content SHA256: `C*76C55A9F392EAB938D199144CC834EF332CD78BA8B98565FA003DEA509A33A3E` for this version
2025-10-20 11:01:34 +02:00
SASPAC - SAS Packages Archive
5be733fb98 Merge pull request #51 from SASPAC/dev
The BasePlus package [ver. 3.0.0]
2025-10-15 10:36:02 +02:00
Bart Jablonski
eb43a1be93 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:51 +02:00
SASPAC - SAS Packages Archive
7ff5b3de09 Merge pull request #50 from SASPAC/dev
The BasePlus package [ver. 2.4.1]
2025-09-05 10:43:14 +02:00
Bart Jablonski
0fab75eda8 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:04 +02:00
SASPAC - SAS Packages Archive
65dd5ba8cb Merge pull request #49 from SASPAC/dev
The BasePlus package [ver. 2.4.0]
2025-08-07 18:28:12 +02:00
Bart Jablonski
de1de46fbe 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:30 +02:00
SASPAC - SAS Packages Archive
a46a4ea9f6 Merge pull request #48 from SASPAC/dev
The BasePlus package [ver. 2.3.1]
2025-08-05 20:23:07 +02:00
Bart Jablonski
8625e9c364 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:29 +02:00
SASPAC - SAS Packages Archive
0e83226bcc Merge pull request #47 from SASPAC/dev
The BasePlus package [ver. 2.3.0]
2025-08-04 15:52:21 +02:00
Bart Jablonski
059f7feb1c 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:57 +02:00
36 changed files with 46415 additions and 22 deletions

View File

@@ -53,10 +53,12 @@ libname NEW "%workPath()/new";
%put %monthShift(2023,1,-5);
%put #%expandDataSetsList(lib=sashelp,datasets=_all_)#;
%workLib(ABC)
```
and more.
SHA256 digest for the latest version of `BasePlus`: F*DFA83F8E0D7424DEB63D49620392068BC68D766552E2804CB6B01DE8E5A87769
SHA256 digest for the latest version of `BasePlus`: F*9FFBC40A2B7FC51161C7D6D120DADC3ACEF8087E4EB43BB1A3F0FBC1F1CBD5AC
[**Documentation for BasePlus**](./baseplus.md "Documentation for BasePlus")

View File

@@ -9,22 +9,22 @@
### Version information:
- Package: BasePlus
- Version: 2.1.0
- Generated: 2024-09-09T12:55:04
- Author(s): Bartosz Jablonski (yabwon@gmail.com), Quentin McMullen (qmcmullen@gmail.com)
- Version: 3.1.0
- Generated: 2025-10-20T10:47:22
- 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)
- License: MIT
- File SHA256: `F*DFA83F8E0D7424DEB63D49620392068BC68D766552E2804CB6B01DE8E5A87769` for this version
- Content SHA256: `C*AB16F5B6538515607C3C254E401DC1ACA7293AB36990227F6E7792145CEEAB87` for this version
- File SHA256: `F*9FFBC40A2B7FC51161C7D6D120DADC3ACEF8087E4EB43BB1A3F0FBC1F1CBD5AC` for this version
- Content SHA256: `C*76C55A9F392EAB938D199144CC834EF332CD78BA8B98565FA003DEA509A33A3E` for this version
---
# The `BasePlus` package, version: `2.1.0`;
# The `BasePlus` package, version: `3.1.0`;
---
# The BasePlus package [ver. 2.1.0] <a name="baseplus-package"></a> ###############################################
# The BasePlus package [ver. 3.1.0] <a name="baseplus-package"></a> ###############################################
The **BasePlus** package implements useful
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*,
*Kurt Bremser*,
*Leonid Batkhan*,
*Louise Hadden*.
*Louise Hadden*,
*Ryo Nakaya*.
---
@@ -387,6 +388,11 @@ proc print data=b_x;
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 `20251017`*
--------------------------------------------------------------------
@@ -490,10 +496,11 @@ The `BasePlus` package consists of the following content:
78. [`%translate()` macro ](#translate-macro-78 )
79. [`%tranwrd()` macro ](#tranwrd-macro-79 )
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=>
<,fileExt=>
<,maxDepth=>
<,backslashSens=>
)
~~~~~~~~~~~~~~~~~~~~~~~
@@ -868,6 +876,11 @@ The basic syntax is the following, the `<...>` means optional parameters:
* `maxDepth=0` - *Optional*, if not zero then indicates
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: ####################################################
@@ -989,7 +1002,12 @@ The QgetVars() returns quoted value [by %superq()].
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: ###################################################################
@@ -1003,6 +1021,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
<,quote=>
<,mcArray=>
<,ignoreCases>
<,nlit=>
)
~~~~~~~~~~~~~~~~~~~~~~~
@@ -1025,23 +1044,32 @@ The basic syntax is the following, the `<...>` means optional parameters:
* `mcArray=` - *Optional*, default value is blank.
1) When *null* - the macro behaves like a macro function
and returns a text string with variables list.
2) When *not null* - behaviour of the macro is altered.
and ban be used in the `%put` or `%let=` statements.
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
with `mcArray` value as a prefix, is created.
Furthermore a macro named as `mcArray` value is generated.
(see the macroArray package for the details).
When `mcArray=` parameter is active the `getVars` macro
cannot be called within the `%put` statement. Execution like:
`%put %getVars(..., mcArray=XXX);` will result with
an Explicit & Radical Refuse Of Run (aka ERROR).
should not be called within the `%put` or `%let=` statements.
A single semicolon is produced as the macro result, hence
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.
* `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: ####################################################
**When `validvarname=` option is _not_ `ANY`.**
**EXAMPLE 1.** A list of all variables from the
sashelp.class dataset:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
@@ -1267,6 +1295,44 @@ run;
%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.
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: ####################################################
@@ -5958,6 +6029,11 @@ See examples below for the details.
The `%findDSwithVarVal()` macro does not execute as a pure macro code.
**NOTE:**
When a library is assigned with different engine than:
"BASE","SPDE","V6","V7","V8","V9","CVP"
observation number is not returned.
### SYNTAX: ###################################################################
The basic syntax is the following, the `<...>` means optional parameters:
@@ -6395,7 +6471,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
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.
---
@@ -7555,7 +7631,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 library ABC assigned to `<WORK>/ABC` directory:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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> #######################
@@ -7598,7 +7738,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
# 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
of this software and associated documentation files (the "Software"), to deal

Binary file not shown.

7680
hist/2.3.0/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/2.3.0/baseplus.zip Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

7680
hist/2.3.1/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/2.3.1/baseplus.zip Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

7686
hist/2.4.0/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/2.4.0/baseplus.zip Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

7686
hist/2.4.1/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/2.4.1/baseplus.zip Normal file

Binary file not shown.

7757
hist/3.0.0/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/3.0.0/baseplus.zip Normal file

Binary file not shown.

7762
hist/3.1.0/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/3.1.0/baseplus.zip Normal file

Binary file not shown.