Releases: yabwon/SAS_PACKAGES
SAS Packages Framework, version 20230207
SAS Packages Framework, version 20230207
News:
- New "Additional Content" feature added to the framework. Usually a package is a "code container" with plain text files with code inside, but sometimes Developer may want the package to contain so called "additional content". The additional content is a perfect solution for a Developer who want, for example, to include: a 150 pages long
pdf
file with detailed documentation, or a bunch ofjpg
files with figures depicting relations between package macros, or something else (basically everything that can't be delivered in the "standard" way). See the latest version of documentation for the details.
Changes in the framework related to the new feature:
- new macro
%loadPackageAddCnt()
which allows to extract additional content, - modifications in the
%generatePackage()
macro to allow creation of additional content, - new parameter in
%loadPackage()
and%installPackage()
macros which triggers use of%loadPackageAddCnt()
macro, - new code added in loading test (to verify extraction of additional content).
Fixes:
- IML Modules loader utility macro rewritten,
- minor bug fixes.
Documentation:
- documentation updated,
- spelling fixes.
SAS Packages Framework, version 20230112
SAS Packages Framework, version 20230112
In the %generatePackage()
macro:
- A
packageGenerated
macrovariable added to packages metadata.It contains timestamp when the package was generated in the ISO8601 form (YYYY-MM-DDThh:mm:ss
) The variable is from now on used the log output for headers in lading, help, preview, etc. - Diagnostic messages for loading required packages extended.
- Help info updated for macros dedicated to CASL UDFs and IML modules loading.
- SHA256 hash digest for the package is calculated in two versions(types). Type
F
generates digest for whole package zip file. TypeC
generates digest for package zip file content. For developer convenience both digests are generated and displayed. Details are available in the documentation.
The %verifyPackage()
macro adjusted to new digest types. For the backward compatibility verification works also of packages generated with previous versions of SPF.
Documentation updated.
SAS Packages Framework, version 20221215
SAS Packages Framework, version 20221215
Changes in the framework:
SAS Packages Framework, version 20221212
SAS Packages Framework, version 20221212
Changes in the framework:
New type.
New type CASLUDF
for CASL User Defined Functions added to the framework.
Rules for adding CASL User Defined Functions to a package are the same as those for FCMP functions (FUNCTIONS
), user formats (FOTMATS
) or IML modules (IMLMODULE
) types, and in line with general rules:
- one file one function,
- file contains only function definition e.g.,
function myFunction(x, y, z);
result = x + y + z;
return (result);
end func;
CASL UDFs are loaded through a dedicated utility macro generated at the loading process and described below.
New utility macros.
If a package contains IML modules or CASL user defined functions additional utility macros for IML Modules and CASL UDFs are generated when package is loaded.
Macros are generated with the following names: %<packageName>IML()
and %<packageName>CASLudf()
. Their purpose is to make loading of Modules or UDFs (with potentially multiple dependencies) easy in Proc IML and Proc CAS.
Run them, accordingly, as the first line in the Proc IML or Proc CAS to access the package content.
For Proc IML the use is as follows:
proc IML;
%<packageName>IML()
<... your code using IML modules from the package ...>
quit;
For Proc CAS the use is as follows:
proc CAS;
%<packageName>CASLudf()
<... your code using CASL UDFs from the package ...>
quit;
If a utility macro is generated appropriate note and a code snippet is printed in the log of the package loading process.
In 99% cases macros are used with default parameters values but, in case when deeper insight about macros parameters is needed, help info is printed in the log when the following code is run:
%<packageName>IML(list=HELP)
or
%<packageName>CASLudf(list=HELP)
If created, those macros are automatically deleted when the %unloadPackage()
macro is run.
Other.
Documentation updated.
Minor bugfix.
SAS Packages Framework, version 20221125
SAS Packages Framework, version 20221125
Changes in %generatePackage()
macro:
- Bug fix on the edge between cherry picking feature and loading required packages.
- Documentation updated.
The following packages were regenerated with the latest version of the SAS Packages Framework:
- BasePlus [1.17.3]
- DFA [0.5.3]
- dynMacroArray [0.2.3]
- GSM [0.20.3]
- macroArray [1.0.3]
- SQLinDS [2.2.3]
SAS Packages Framework, version 20221121
SAS Packages Framework, version 20221121
New feature of "Cherry picking" added to the SAS Packages Framework.
Sometimes a package offers so many features that the number may be "overwhelming".
In such case only some of them may be selected for loading. Such process
is called a "cherry picking". The feature is provided by the %loadPackage()
macro
which uses a cherryPick=
parameter (see description below).
For example, execution of the following code:
%loadPackage(BasePlus, cherryPick=rainCloudPlot getVars)
results with loading only the rainCloudPlot
and the getVars
elements.
If several object types (e.g., a macro and a format) share the same name
all will be loaded.
What is the trade-off?
- Since the cherry picking selects only a part of the package the
SYSloadedPackages
macrovariable is not updated with the package name. - Dependencies i.e., packages from the
ReqPackages
list, are not loaded automatically, so they have to be loaded manually. - The
%unloadPackage()
macro executed on such partially loaded package may sometimes issue some irrelevant warnings.
Changes in %loadPackage()
macro:
- New
cherryPick=
parameter added to the macro.
As a value a space separated list of selected elements
of the package to be loaded into the SAS session is expected.
Default value of an asterisk (*
) means: "load all elements of the package".
Empty list is equivalent to default. - Documentation updated.
Changes in %generatePackage()
macro:
- Code adjustment for the cherry picking feature.
- Minor additional code refactoring.
- The
%ICEloadPackage()
macro does not support cherry picking.
The following packages were regenerated with the latest version of the framework:
- BasePlus [1.17.2]
- DFA [0.5.2]
- dynMacroArray [0.2.2]
- GSM [0.20.2]
- macroArray [1.0.2]
- SQLinDS [2.2.2]
SAS Packages Framework, version 20221112
SAS Packages Framework, ver. 20221112
Changes in %generatePackage()
macro:
- refactoring of package metadata extraction and metadata file preparation,
- in a package folder all subfolders which name starts with
!
are ignored in the package generation process, - in a package folder all subfolders with unknown code types are ignored in the package generation process,
- bug fix in package version extraction for required package list,
- new test added to loading test,
- documentation updated.
The following packages were regenerated with the latest version of the framework:
- BasePlus [1.17.1]
- DFA [0.5.1]
- dynMacroArray [0.2.1]
- GSM [0.20.1]
- macroArray [1.0.1]
- SQLinDS [2.2.1]
SAS Packages Framework, version 20221107
SAS Packages Framework, ver. 20221107
- Minor update on the
%generatePackage()
macro log look.
SAS Packages Framework, version 20221022
SAS Packages Framework, ver. 20221022
In the %generatePackage()
macro additional quality checks for files of EXEC and CLEAN types were added.
Each EXEC file should have a CLEAN file counterpart and vice versa.
- If the number of EXECs and CLEANs differs but both are positive macro issues a Warning.
- If EXECs are positive but CLEANs are zero (or other way around) macro issues an Error!
Documentation updated.
SAS Packages Framework, version 20221002
SAS Packages Framework, version 20221002
Modifications in the %installPackage()
macro it is allowed to call installation of packages with version number (if used with mirror=0
), for example: %installPackage(baseplus(1.17) macroarray(1.0) dfa(0.5) GSM)
,
For the %installPackage()
and in the %loadPackageS()
macros the list of packages standardised before execution to the form package1(ver1) package2(ver2) package3(ver3)
,
Fix for directories "with spaces" for %installPackage()
.
Documentation updated.