Compare commits

..

5 Commits

Author SHA1 Message Date
Bart Jablonski
0bd2f6f2d8 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. Type `C` generates digest for package zip file content. For developer convenience both digests are generated and displayed. Details are available in the [documentation](https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/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.
2023-01-12 17:23:22 +01:00
Bart Jablonski
e3c42e6441 Update README.md
spelling corrected
2023-01-12 14:42:36 +01:00
Bartosz Jablonski
8807a1560e SAS Packages Framework, version 20221215
SAS Packages Framework, version 20221215

Changes in the framework:
- Bug fix for `formats` and `proto` with cherry picking.

- Packages regenerated with the latest framework version:
  - SQLinDS [2.2.4]
  - DFA [0.5.4]
  - macroArray [1.0.4]
  - BasePlus [1.18.4]
  - GSM [0.20.4]
  - dynMacroArray [0.2.4]

- New macro `%bpPIPE()` in BasePlus package.

- Documentation updated.
2022-12-15 17:56:08 +01:00
Bart Jablonski
a282349c86 Update README.md 2022-12-14 12:12:53 +01:00
Bart Jablonski
6dc4f22103 Update in README.md
The "Workshop video for the User" got outdated.
2022-12-14 09:33:54 +01:00
27 changed files with 381 additions and 254 deletions

View File

@@ -14,7 +14,7 @@ In this repository we are presenting the **SAS Packages Framework** which allows
### Current version:
**The latest version** of SPF is **`20221212`**.
**The latest version** of SPF is **`20230112`**.
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).
@@ -30,7 +30,7 @@ Videos presenting the SPF and packages, from various conferences and meetups (th
- ["SAS Packages: The Way to Share" - SaSensei International Dojo No. 1](https://www.youtube.com/watch?v=BFhdUBQgjYQ&t=0s "SID no. 1") (April 2020, ~28 minutes, general overview but with a bit obsolete technical details)
- ["Co nowego z pakietami SAS?" - SAS dla Administratorów i Praktyków 2020](https://www.youtube.com/watch?v=mXuep2k48Z8&feature=youtu.be&t=0s "SASAiP2020") (October 2020, in Polish, ~41 minutes, general overview and technical details how to use SPF)
- ["SAS Packages - The Way to Share" - Boston Area SAS Users Group webinar](https://www.basug.org/videos?wix-vod-video-id=78067e61413d43d3a6951974b3bc3014&wix-vod-comp-id=comp-klv807gt "BASUG") (November 2020, ~59 minutes, general overview and technical details how to use SPF)
- ["My First SAS Package: A How-To" - SAS Global Forum 2021 V.E.](https://www.youtube.com/watch?v=hqexaQtGw88 "SGF2021") (May 20th 2021, ~59 minutes, technical workshop on how to create a package)
- ["My First SAS Package: A How-To" - SAS Global Forum 2021 V.E.](https://www.youtube.com/watch?v=hqexaQtGw88 "SGF2021") (May 20th 2021, ~30 minutes, technical workshop on how to create a package)
- ["Kod SASowy ukryty na widoku" - SAS dla Administratorów i Praktyków 2021](https://www.youtube.com/watch?v=LtaWPe2sgRY&t=1s) (November 24th 2021, in Polish, ~34 minutes, technical presentation with details about the GSM package)
- ["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)
@@ -107,8 +107,10 @@ filename packages "<directory/containing/packages/>";
```
---
The "Workshop video for the User" got outdated (in general). Newer version is comming soon, in the mean time see some of the vedeos 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")
[**Workshop video for the User**](https://youtu.be/qX_-HJ76g8Y) \[May 6th, 2020\] [~86 minutes, a bit outdated (installPackage macro was not there yet) but gives the idea how it works especially load, help, unload, ICEload, and other details]
<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>
---
@@ -172,29 +174,28 @@ If you find the SPF useful **share info** about it or **give it a [star](https:/
Packages:
- **SQLinDS**\[2.2.3\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
- **SQLinDS**\[2.2.4\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
```sas
data class;
set %SQL(select * from sashelp.class order by age);
run;
```
SHA256 digest for SQLinDS: D5A66E60602270E5FB1E592FA3E0C2F2C640BC077FE799A2223CB9BA275F6F47
SHA256 digest for SQLinDS: 42677CEBB0778A6B72DE9C0071B66A345811EE470289E3847D7737F782E709E0
[Documentation for SQLinDS](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/sqlinds.md "Documentation for SQLinDS")
- **MacroCore**\[1\], a macro library for SAS application developers. Over 100 macros for Base SAS, metadata, and Viya. Provided by the [SASjs framework](https://sasjs.io "SASjs framework").
[SQLinDS in SASPAC](https://github.com/SASPAC/sqlinds "SQLinDS in SASPAC")
SHA256 digest for MacroCore: A23C29529F3CE7D0C8BEE9545C5D22D5B5594907547374A5135B8E5A48D7687B
[Documentation for MacroCore](https://core.sasjs.io "Documentation for MacroCore")
- **DFA** (Dynamic Function Arrays)\[0.5.4\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples.
- **DFA** (Dynamic Function Arrays)\[0.5.3\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples.
SHA256 digest for DFA: 7520CF21CBF1FD4AD2BC05C5DD343E508FCEA507575EBC060B4AD322FB80AB04
SHA256 digest for DFA: 6DEB02BE1C30453FBC688AF1F561709C7D6BF10B3B67988B238853A2A9D53034
[Documentation for DFA](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/dfa.md "Documentation for DFA")
- **macroArray**\[1.0.3\], implementation of an array concept in a macrolanguage, e.g.
[DFA in SASPAC](https://github.com/SASPAC/dfa "DFA in SASPAC")
- **macroArray**\[1.0.4\], implementation of an array concept in a macrolanguage, e.g.
```sas
%array(ABC[17] (111:127), macarray=Y);
@@ -213,12 +214,13 @@ SHA256 digest for DFA: 7520CF21CBF1FD4AD2BC05C5DD343E508FCEA507575EBC060B4AD322F
which = 1:H:2
);
```
SHA256 digest for macroArray: 440920272D1838505EA5C033B1C448C612DE2FCCFD57F157BB90ED980E4001CC
SHA256 digest for macroArray: 8584C249C308B5E8B620ED5F695BC58CD426172FB2EACD5FF9C6899F9DE2B470
[Documentation for macroArray](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/macroarray.md "Documentation for macroArray")
[MacroArray in SASPAC](https://github.com/SASPAC/macroarray "MacroArray in SASPAC")
- **BasePlus**\[1.17.3\] adds a bunch of functionalities I am missing in BASE SAS, such as:
- **BasePlus**\[1.18.4\] adds a bunch of functionalities I am missing in BASE SAS, such as:
```sas
call arrMissToRight(myArray);
call arrFillMiss(17, myArray);
@@ -235,22 +237,28 @@ format x bool.;
%rainCloudPlot(sashelp.cars,DriveTrain,Invoice)
%zipLibrary(sashelp,libOut=work)
%bpPIPE(ls -la ~/)
```
SHA256 digest for BasePlus: D8DBB7CC5952331FA59FEBBBDD15BC543FE3C89A8BA9150FE6AF5E412868EBE7
SHA256 digest for BasePlus: A6F1977DC4EC22A39DDC7BCE68CF562AF54351A3D385D488EC3067B5A7C0F3CB
[Documentation for BasePlus](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md "Documentation for BasePlus")
- **GSM** (Generate Secure Macros)\[0.20.3\], package allows
[BasePlus in SASPAC](https://github.com/SASPAC/baseplus "BasePlus in SASPAC")
- **GSM** (Generate Secure Macros)\[0.20.4\], package allows
to create secured macros stored in SAS Proc FCMP functions.
The dataset with functions can be shared between different operating systems
and allows to generate macros on site without showing their code.
SHA256 digest for GSM: 50D8340E080BEA459E68BE315146AD3B809930DB8DC7B23C7A492C3815ACD83F
SHA256 digest for GSM: 83EC349DF97EFA71187536E8CC6CD62215CE675D20DA355E14D4ACE3FBC6D524
[Documentation for GSM](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/gsm.md "Documentation for GSM")
- **dynMacroArray**\[0.2.3\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA). Development of this package is currently on hold.
[GSM in SASPAC](https://github.com/SASPAC/gsm "GSM in SASPAC")
SHA256 digest for dynMacroArray: 440920272D1838505EA5C033B1C448C612DE2FCCFD57F157BB90ED980E4001CC
- **dynMacroArray**\[0.2.4\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA). Development of this package is currently on hold.
SHA256 digest for dynMacroArray: 7800F36877DC0B9A94B1AC8FFDF8B43ADB216F11B5B26343E41165E7F5E32FC0
### ======

View File

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

View File

@@ -23,7 +23,7 @@
default value 1 means "delete tests work" */
)/ secure minoperator
/*** HELP END ***/
des = 'Macro to generate SAS packages, version 20221212. Run %generatePackage() for help info.'
des = 'Macro to generate SAS packages, version 20230112. Run %generatePackage() for help info.'
;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do;
@@ -38,7 +38,7 @@ des = 'Macro to generate SAS packages, version 20221212. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to generate SAS packages, version `20221212` #;
%put # Macro to generate SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -152,6 +152,11 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 1024;
otherwise;
end;
run;
/* package generation timestamp, in iso8601 YYYY-MM-DDThh:mm:ss */
%local packageGenerated;
%let packageGenerated = %sysfunc(datetime(), E8601DT19.);
%put NOTE: &=packageGenerated.;
options &qlenmax_fstimer_tmp.;
/* test for required descriptors */
@@ -680,8 +685,8 @@ proc contents data = &filesWithCodes.;
run;
*/
title1 "Package location is: &filesLocation.";
title2 "User: &SYSUSERID., datetime: %qsysfunc(datetime(), datetime21.), SAS version: &SYSVLONG4.";
title3 "Package encoding: '&packageEncoding.', session encoding: '&SYSENCODING.'.";
title2 "User: &SYSUSERID., Datetime: &packageGenerated., SAS version: &SYSVLONG4.";
title3 "Package encoding: '&packageEncoding.', Session encoding: '&SYSENCODING.'.";
title4 " ______________________________ ";
title5 "List of files for package: &packageName. (version &packageVersion.), license: &packageLicense.";
title6 "MD5 hashed fileref of package lowcase name: &_PackageFileref_.";
@@ -772,7 +777,7 @@ data _null_;
end;
file &zipReferrence.(packagemetadata.sas) encoding = &packageEncoding.;
length packageName $ 32 packageVersion $ 24
length packageName $ 32 packageVersion packageGenerated $ 24
packageTitle packageAuthor packageMaintainer $ 2048
packageEncoding $ 8 packageLicense $ 128;
packageName = quote(strip(symget('packageName')),'"');
@@ -782,6 +787,7 @@ data _null_;
packageMaintainer = quote(strip(symget('packageMaintainer')),'"');
packageEncoding = quote(strip(symget('packageEncoding')),'"');
packageLicense = quote(strip(symget('packageLicense')),'"');
packageGenerated = quote(strip(symget('packageGenerated')),'"');
put ' data _null_; '; /* simple "%local" returns error while loading package */
put ' call symputX("packageName", ' packageName ', "L");';
@@ -790,7 +796,8 @@ data _null_;
put ' call symputX("packageAuthor", ' packageAuthor ', "L");';
put ' call symputX("packageMaintainer", ' packageMaintainer ', "L");';
put ' call symputX("packageEncoding", ' packageEncoding ', "L");';
put ' call symputX("packageLicense", ' packageLicense ', "L");';
put ' call symputX("packageLicense", ' packageLicense ', "L");';
put ' call symputX("packageGenerated", ' packageGenerated ', "L");';
put ' run; ';
stop;
@@ -893,7 +900,7 @@ data _null_;
put ' %put NOTE: ' @; put "Loading package &packageName., version &packageVersion., license &packageLicense.; ";
put ' %put NOTE: ' @; put '*** %superq(packageTitle) ***; ';
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Generated: &packageGenerated.; ";
put ' %put NOTE- ' @; put 'Author(s): %superq(packageAuthor); ';
put ' %put NOTE- ' @; put 'Maintainer(s): %superq(packageMaintainer); ';
put ' %put NOTE- ;';
@@ -1094,8 +1101,10 @@ data _null_;
put ' if (LP_find ne 0) or (LP_find = 0 and . < versN < verRN) then ';
put ' do; ';
put ' missingPackagr = 1; ';
put ' put "ERROR: SAS package: " req "is missing! Download it and" ; ';
put ' put ''ERROR- use %loadPackage('' name ", requiredVersion = " verR ") to load it." ;';
put ' put "ERROR: SAS package: " req "is missing! Download it by hand or if the SAS session";';
put ' put "ERROR- has access to the Internet and the package is available at SASPAC repository";';
put ' put ''ERROR- use %installPackage('' name +(-1) "(" verR +(-1) ")) to install it."/; ';
put ' put ''ERROR- Use %loadPackage('' name +(-1) ", requiredVersion=" verR +(-1) ") to load it."/;';
put ' end ; ';
put ' end ; ';
put ' if missingPackagr then call symputX("packageRequiredErrors", 1, "L"); ';
@@ -1107,8 +1116,10 @@ data _null_;
put ' do req = ' / packageReqPackages / ' ; ';
put ' name = lowcase(strip(kscanx(req, 1, "("))); ';
put ' vers = compress(kscanx(req,-1, "("), ".", "KD"); ';
put ' put "ERROR: SAS package " req "is missing! Download/install it and" ; ';
put ' put ''ERROR- use %loadPackage('' name ", requiredVersion = " vers ") to load it." ; ';
put ' put "ERROR: SAS package " req "is missing! Download it by hand or if the SAS session";';
put ' put "ERROR- has access to the Internet and the package is available at SASPAC repository";';
put ' put ''ERROR- use %installPackage('' name +(-1) "(" vers +(-1) ")) to install it."/; ';
put ' put ''ERROR- Use %loadPackage('' name +(-1)", requiredVersion=" vers +(-1) ") to load it."/;';
put ' end ; ';
put ' end; ';
put ' stop; ';
@@ -1172,30 +1183,18 @@ data _null_;
/* header for multiple functions in one FCMP run */
put "proc fcmp outlib = work.%lowcase(&packageName.fcmp).package ; ";
end;
if 1 = FIRST.type and upcase(type)='PROTO' then
if 1 = isProto and upcase(type)='PROTO' then
do;
/* macro variable for test if cherry picking used PROTO */
put 'data _null_; ';
put ' call symputX("cherryPick_PROTO", 0, "L"); ';
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='PROTO' then
do;
/* header for multiple functions in one PROTO run */
put "proc proto package = work.%lowcase(&packageName.proto).package ; ";
end;
if 1 = FIRST.type and upcase(type)='IMLMODULE' then
do;
/* macro variable for test if cherry picking used IML */
put 'data _null_; ';
put ' call symputX("cherryPick_IML", 0, "L"); ';
put ' call symputX("cherryPick_IML_ALL", 0, "L"); ';
put 'run; ';
/* header, for IML modules */
put "proc iml ; ";
end;
if 1 = FIRST.type and upcase(type)='FORMATS' then
do;
/* header, for FORMATS */
put "proc format lib = work.%lowcase(&packageName.format) ; ";
end;
if 1 = isFormat and upcase(type)=:'FORMAT' then
do;
/* macro variable for test if cherry picking used FORMAT */
@@ -1203,6 +1202,27 @@ data _null_;
put ' call symputX("cherryPick_FORMAT", 0, "L"); ';
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='FORMATS' then
do;
/* header, for FORMATS */
put "proc format lib = work.%lowcase(&packageName.format) ; ";
end;
if 1 = isIMLmodule and upcase(type)='IMLMODULE' then
do;
/* macro variable for test if cherry picking used IML */
put 'data _null_; ';
put ' call symputX("cherryPick_IML_ALL", 0, "L"); ';
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='IMLMODULE' then
do;
/* macro variable for test if cherry picking used IML */
put 'data _null_; ';
put ' call symputX("cherryPick_IML", 0, "L"); ';
put 'run; ';
/* header, for IML modules */
put "proc iml ; ";
end;
/* HEADERS for IML, FCMP, and PROTO - end */
put ' ' /
@@ -1313,7 +1333,7 @@ data _null_;
' !! '' %put %str( )when set to the value of `HELP` (upcase letters!) displays this help message.;''' /
' !! '' %put - `depList` [technical] contains the list of dependencies required by the package.;''' /
' !! '' %put - %str( )for _this_ macro the default value is: `';
' !! '' %put %str( )for _this_ instance of the macro the default value is: `';
%if %superq(packageReqPackages) ne %then
%do;
do i = 1 to countw(packageReqPackages, ",", "Q");
@@ -1321,9 +1341,9 @@ data _null_;
put reqPackage @;
end;
%end;
put '`.;''' /
' !! '' %put The macro generated: '' !! put(dtCASLudf, datetime19.-L) !! ";"' /
' !! '' %put with the SAS Packages Framework version 20221212.;''' /
put +(-1) '`.;''' /
' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' /
' !! '' %put with the SAS Packages Framework version 20230112.;''' /
' !! '' %put ****************************************************************************;''' /
' !! '' %GOTO theEndOfTheMacro;''' /
' !! '' %end;''' ;
@@ -1424,6 +1444,7 @@ data _null_;
put 'options cmplib = (%unquote(%sysfunc(compress(' /
'%sysfunc(getoption(cmplib))' /
',%str(()) ))));';
/* proc delete is adde because "empty" PROTO creates dataset too */
put "proc delete data=work.%lowcase(&packageName.proto); run;";
put '%end;';
end;
@@ -1485,7 +1506,7 @@ data _null_;
' %put %str( )when set to the value of `ERROR` (the default) prints Error message.; ' /
' %put - `depList` [technical] contains the list of dependencies required by the package.; ' /
' %put - %str( )for _this_ macro the default value is: `';
' %put %str( )for _this_ instance of the macro the default value is: `';
%if %superq(packageReqPackages) ne %then
%do;
do i = 1 to countw(packageReqPackages, ",", "Q");
@@ -1493,9 +1514,9 @@ data _null_;
put reqPackage @;
end;
%end;
put '`.;' /
' %put The macro generated: ''' " !! put(dtIML, datetime19.-L) !! " '''; ' /
' %put with the SAS Packages Framework version 20221212.; ' /
put +(-1) '`.;' /
' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; ' /
' %put with the SAS Packages Framework version 20230112.; ' /
' %put ****************************************************************************; ' /
' %GOTO theEndOfTheMacro; ' /
' %end; ' /
@@ -1620,7 +1641,7 @@ data _null_;
put ' %put NOTE: ' @; put "Data for package &packageName., version &packageVersion., license &packageLicense.; ";
put ' %put NOTE: ' @; put '*** %superq(packageTitle) ***; ';
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Generated: &packageGenerated.; ";
put ' %put NOTE- ' @; put 'Author(s): %superq(packageAuthor); ';
put ' %put NOTE- ' @; put 'Maintainer(s): %superq(packageMaintainer); ';
put ' %put NOTE- ;';
@@ -1928,7 +1949,7 @@ data _null_;
put ' %put NOTE: '"Preview of the &packageName. package, version &packageVersion., license &packageLicense.;";
put ' %put NOTE: ' @; put '*** %superq(packageTitle) ***; ';
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Generated: &packageGenerated.; ";
put ' %put NOTE- ' @; put 'Author(s): %superq(packageAuthor); ';
put ' %put NOTE- ' @; put 'Maintainer(s): %superq(packageMaintainer); ';
put ' %put NOTE- ;';
@@ -2044,7 +2065,7 @@ data _null_;
put ' %put NOTE: '"Help for package &packageName., version &packageVersion., license &packageLicense.;";
put ' %put NOTE: ' @; put '*** %superq(packageTitle) ***; ';
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Generated: &packageGenerated.; ";
put ' %put NOTE- ' @; put 'Author(s): %superq(packageAuthor); ';
put ' %put NOTE- ' @; put 'Maintainer(s): %superq(packageMaintainer); ';
put ' %put NOTE- ;';
@@ -2103,7 +2124,7 @@ data _null_;
put ' end ; ';
%end;
put 'put "***"; put "* SAS package generated by generatePackage, version 20221212 *"; put "***";';
put 'put "***"; put "* SAS package generated by generatePackage, version 20230112 *"; put "***";';
put 'run; ' /;
@@ -2322,6 +2343,7 @@ filename &zipReferrence. clear;
%put NOTE: Calculating SHA256 check sum.;
%put NOTE- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^;
%put NOTE-;
filename &zipReferrence. "&filesLocation./%lowcase(&packageName.).zip";
filename &zipReferrence. list;
%local notesSourceOptions;
@@ -2331,12 +2353,20 @@ filename &zipReferrence. clear;
set sashelp.vfunc(keep=fncname);
where fncname = "HASHING_FILE";
call execute('
data the_SHA256_hash_id;
SHA256 = HASHING_FILE("SHA256", "&zipReferrence.", 4);
label SHA256 = "The SHA256 hash digest for package &packageName.:";
put / @7 SHA256= / " ";
run;');
call execute('proc print data = the_SHA256_hash_id noobs label; run;');
data the_SHA256_hash_id;' !!
/* F - file */
" SHA256 = 'F*' !! HASHING_FILE('SHA256', pathname('&zipReferrence.','F'), 0); " !!
' TYPE="F"; ' !!
' put / @7 SHA256= / " "; output; ' !!
/* C - content */
" SHA256 = 'C*' !! HASHING_FILE('SHA256', '&zipReferrence.', 4); " !!
' TYPE="C"; ' !!
' put / @7 SHA256= / " "; output; ' !!
' label ' !!
' SHA256 = "The SHA256 hash digest for package &packageName.:" ' !!
' TYPE= "Type of hash digest / F = file / C = content"; ' !!
'run;');
call execute('proc print data = the_SHA256_hash_id noobs label split="/"; run;');
stop;
run;
options &notesSourceOptions.;

View File

@@ -24,7 +24,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to get help about SAS package, version 20221212. Run %helpPackage() for help info.'
des = 'Macro to get help about SAS package, version 20230112. Run %helpPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -39,7 +39,7 @@ des = 'Macro to get help about SAS package, version 20221212. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get help about SAS packages, version `20221212` #;
%put # Macro to get help about SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -169,7 +169,7 @@ TODO:
- add MD5(&packageName.) value hash instead "package" word in filenames [DONE]
*/
/* Macros to install SAS packages, version 20221212 */
/* Macros to install SAS packages, version 20230112 */
/* A SAS package is a zip file containing a group of files
with SAS code (macros, functions, data steps generating
data, etc.) wrapped up together and %INCLUDEed by

View File

@@ -14,7 +14,7 @@
/secure
minoperator
/*** HELP END ***/
des = 'Macro to install SAS package, version 20221212. Run %%installPackage() for help info.'
des = 'Macro to install SAS package, version 20230112. Run %%installPackage() for help info.'
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do;
@@ -29,7 +29,7 @@ des = 'Macro to install SAS package, version 20221212. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to install SAS packages, version `20221212` #;
%put # Macro to install SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -458,7 +458,7 @@ des = 'Macro to install SAS package, version 20221212. Run %%installPackage() fo
/* Macro to list SAS packages in packages folder.
Version 20221212
Version 20230112
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating

View File

@@ -1,7 +1,7 @@
/*+listPackages+*/
%macro listPackages()/secure PARMBUFF
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20221212.'
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20230112.'
;
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
%do;
@@ -16,7 +16,7 @@ des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HE
%put ### This is short help information for the `listPackages` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to list available SAS packages, version `20221212` #;
%put # Macro to list available SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -166,7 +166,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
/* Macro to generate SAS packages.
Version 20221212
Version 20230112
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating

View File

@@ -31,7 +31,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to load SAS package, version 20221212. Run %loadPackage() for help info.'
des = 'Macro to load SAS package, version 20230112. Run %loadPackage() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -47,7 +47,7 @@ minoperator
%put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *load* SAS packages, version `20221212` #;
%put # Macro to *load* SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

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

View File

@@ -23,7 +23,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20221212. Run %previewPackage() for help info.'
des = 'Macro to preview content of a SAS package, version 20230112. Run %previewPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -38,7 +38,7 @@ des = 'Macro to preview content of a SAS package, version 20221212. Run %preview
%put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get previwe of a SAS packages, version `20221212` #;
%put # Macro to get previwe of a SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -20,7 +20,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to unload SAS package, version 20221212. Run %unloadPackage() for help info.'
des = 'Macro to unload SAS package, version 20230112. Run %unloadPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -35,7 +35,7 @@ des = 'Macro to unload SAS package, version 20221212. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to unload SAS packages, version `20221212` #;
%put # Macro to unload SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -13,7 +13,7 @@
hashing_file() function, SAS 9.4M6 */
)/secure
/*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20221212. Run %verifyPackage() for help info.'
des = 'Macro to verify SAS package with the hash digest, version 20230112. Run %verifyPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -28,7 +28,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20221212. Run %
%put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to verify SAS package with it hash digest, version `20221212` #;
%put # Macro to verify SAS package with it hash digest, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -138,13 +138,21 @@ des = 'Macro to verify SAS package with the hash digest, version 20221212. Run %
filename &_PackageFileref_. list;
data _null_;
SHA256 = HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
providedHash = "&hash.";
length providedHash $ 100;
providedHash = strip(symget("hash"));
select;
when ( 'F*' = upcase(substr(providedHash,1,2)) ) /* F = file digest */
SHA256 = 'F*' !! HASHING_FILE("SHA256", pathname("&_PackageFileref_.",'F'), 0);
when ( 'C*' = upcase(substr(providedHash,1,2)) ) /* C = content digest */
SHA256 = 'C*' !! HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
otherwise /* legacy approach, without C or F, digest value equivalent to C */
SHA256 = HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
end;
put "Provided Hash: " providedHash;
put "SHA256 digest: " SHA256;
put " ";
if SHA256 = providedHash then
if upcase(SHA256) = upcase(providedHash) then
do;
put "NOTE: Package verification SUCCESSFUL.";
put "NOTE- Generated hash is EQUAL to the provided one.";

View File

@@ -21,7 +21,7 @@ A **SAS package** is an automatically generated, single, stand alone *zip* file
The *purpose of a package* is to be a simple, and easy to access, code sharing medium, which will allow: on the one hand, to separate the code complex dependencies created by the developer from the user experience with the final product and, on the other hand, reduce developer's and user's unnecessary frustration related to a remote deployment process.
In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20221212`**.
In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20230112`**.
**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).
@@ -39,7 +39,7 @@ After assigning the directory do not change them when using the SPF since it may
## This is short help information for the `installPackage` macro <a name="installpackage"></a>
--------------------------------------------------------------------------------------------
Macro to install SAS packages, version `20221212`
Macro to install SAS packages, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -141,7 +141,7 @@ filename packages "C:/SAS_PACKAGES";
## This is short help information for the `helpPackage` macro <a name="helppackage"></a>
-------------------------------------------------------------------------------
Macro to get help about SAS packages, version `20221212`
Macro to get help about SAS packages, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -212,7 +212,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `loadPackage` macro <a name="loadpackage"></a>
-------------------------------------------------------------------------------
Macro to *load* SAS packages, version `20221212`
Macro to *load* SAS packages, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -353,7 +353,7 @@ If created, those macros are automatically deleted when the `%unloadPackage()` m
## This is short help information for the `loadPackageS` macro <a name="loadpackages"></a>
-------------------------------------------------------------------------------
Macro wrapper for the loadPackage macro, version `20221212`
Macro wrapper for the loadPackage macro, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -402,7 +402,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `unloadPackage` macro <a name="unloadpackage"></a>
-------------------------------------------------------------------------------
Macro to unload SAS packages, version `20221212`
Macro to unload SAS packages, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -467,7 +467,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `listPackages` macro <a name="listpackages"></a>
-----------------------------------------------------------------------------------------
Macro to list available SAS packages, version `20221212`
Macro to list available SAS packages, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -508,7 +508,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `verifyPackage` macro <a name="verifypackage"></a>
-------------------------------------------------------------------------------
Macro to verify SAS package with it hash digest, version `20221212`
Macro to verify SAS package with it hash digest, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -562,7 +562,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>
-------------------------------------------------------------------------------
Macro to get previwe of a SAS packages, version `20221212`
Macro to get previwe of a SAS packages, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -629,7 +629,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `generatePackage` macro <a name="generatepackage"></a>
-------------------------------------------------------------------------------
Macro to generate SAS packages, version `20221212`
Macro to generate SAS packages, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -813,7 +813,7 @@ All files have to have `.sas` extension. Other files are ignored.
## This is short help information for the `extendPackagesFileref` macro <a name="extendpackagesfileref"></a>
-----------------------------------------------------------------------------------------
Macro to list directories pointed by 'packages' fileref, version `20221212`
Macro to list directories pointed by 'packages' fileref, version `20230112`
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating

View File

@@ -42,7 +42,7 @@
- to unload, or
- to generate SAS packages.
Version 20221212.
Version 20230112.
See examples below.
A SAS package is a zip file containing a group of files
@@ -86,7 +86,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to load SAS package, version 20221212. Run %loadPackage() for help info.'
des = 'Macro to load SAS package, version 20230112. Run %loadPackage() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -102,7 +102,7 @@ minoperator
%put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *load* SAS packages, version `20221212` #;
%put # Macro to *load* SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -329,7 +329,7 @@ minoperator
*/
)/secure
/*** HELP END ***/
des = 'Macro to unload SAS package, version 20221212. Run %unloadPackage() for help info.'
des = 'Macro to unload SAS package, version 20230112. Run %unloadPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -344,7 +344,7 @@ des = 'Macro to unload SAS package, version 20221212. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to unload SAS packages, version `20221212` #;
%put # Macro to unload SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -489,7 +489,7 @@ des = 'Macro to unload SAS package, version 20221212. Run %unloadPackage() for h
*/
)/secure
/*** HELP END ***/
des = 'Macro to get help about SAS package, version 20221212. Run %helpPackage() for help info.'
des = 'Macro to get help about SAS package, version 20230112. Run %helpPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -504,7 +504,7 @@ des = 'Macro to get help about SAS package, version 20221212. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get help about SAS packages, version `20221212` #;
%put # Macro to get help about SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -634,7 +634,7 @@ TODO:
- add MD5(&packageName.) value hash instead "package" word in filenames [DONE]
*/
/* Macros to install SAS packages, version 20221212 */
/* Macros to install SAS packages, version 20230112 */
/* A SAS package is a zip file containing a group of files
with SAS code (macros, functions, data steps generating
data, etc.) wrapped up together and %INCLUDEed by
@@ -657,7 +657,7 @@ TODO:
/secure
minoperator
/*** HELP END ***/
des = 'Macro to install SAS package, version 20221212. Run %%installPackage() for help info.'
des = 'Macro to install SAS package, version 20230112. Run %%installPackage() for help info.'
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do;
@@ -672,7 +672,7 @@ des = 'Macro to install SAS package, version 20221212. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to install SAS packages, version `20221212` #;
%put # Macro to install SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1101,7 +1101,7 @@ des = 'Macro to install SAS package, version 20221212. Run %%installPackage() fo
/* Macro to list SAS packages in packages folder.
Version 20221212
Version 20230112
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1122,7 +1122,7 @@ des = 'Macro to install SAS package, version 20221212. Run %%installPackage() fo
/*+listPackages+*/
%macro listPackages()/secure PARMBUFF
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20221212.'
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20230112.'
;
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
%do;
@@ -1137,7 +1137,7 @@ des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HE
%put ### This is short help information for the `listPackages` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to list available SAS packages, version `20221212` #;
%put # Macro to list available SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1287,7 +1287,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
/* Macro to generate SAS packages.
Version 20221212
Version 20230112
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1324,7 +1324,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
default value 1 means "delete tests work" */
)/ secure minoperator
/*** HELP END ***/
des = 'Macro to generate SAS packages, version 20221212. Run %generatePackage() for help info.'
des = 'Macro to generate SAS packages, version 20230112. Run %generatePackage() for help info.'
;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do;
@@ -1339,7 +1339,7 @@ des = 'Macro to generate SAS packages, version 20221212. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to generate SAS packages, version `20221212` #;
%put # Macro to generate SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1453,6 +1453,11 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 1024;
otherwise;
end;
run;
/* package generation timestamp, in iso8601 YYYY-MM-DDThh:mm:ss */
%local packageGenerated;
%let packageGenerated = %sysfunc(datetime(), E8601DT19.);
%put NOTE: &=packageGenerated.;
options &qlenmax_fstimer_tmp.;
/* test for required descriptors */
@@ -1981,8 +1986,8 @@ proc contents data = &filesWithCodes.;
run;
*/
title1 "Package location is: &filesLocation.";
title2 "User: &SYSUSERID., datetime: %qsysfunc(datetime(), datetime21.), SAS version: &SYSVLONG4.";
title3 "Package encoding: '&packageEncoding.', session encoding: '&SYSENCODING.'.";
title2 "User: &SYSUSERID., Datetime: &packageGenerated., SAS version: &SYSVLONG4.";
title3 "Package encoding: '&packageEncoding.', Session encoding: '&SYSENCODING.'.";
title4 " ______________________________ ";
title5 "List of files for package: &packageName. (version &packageVersion.), license: &packageLicense.";
title6 "MD5 hashed fileref of package lowcase name: &_PackageFileref_.";
@@ -2073,7 +2078,7 @@ data _null_;
end;
file &zipReferrence.(packagemetadata.sas) encoding = &packageEncoding.;
length packageName $ 32 packageVersion $ 24
length packageName $ 32 packageVersion packageGenerated $ 24
packageTitle packageAuthor packageMaintainer $ 2048
packageEncoding $ 8 packageLicense $ 128;
packageName = quote(strip(symget('packageName')),'"');
@@ -2083,6 +2088,7 @@ data _null_;
packageMaintainer = quote(strip(symget('packageMaintainer')),'"');
packageEncoding = quote(strip(symget('packageEncoding')),'"');
packageLicense = quote(strip(symget('packageLicense')),'"');
packageGenerated = quote(strip(symget('packageGenerated')),'"');
put ' data _null_; '; /* simple "%local" returns error while loading package */
put ' call symputX("packageName", ' packageName ', "L");';
@@ -2091,7 +2097,8 @@ data _null_;
put ' call symputX("packageAuthor", ' packageAuthor ', "L");';
put ' call symputX("packageMaintainer", ' packageMaintainer ', "L");';
put ' call symputX("packageEncoding", ' packageEncoding ', "L");';
put ' call symputX("packageLicense", ' packageLicense ', "L");';
put ' call symputX("packageLicense", ' packageLicense ', "L");';
put ' call symputX("packageGenerated", ' packageGenerated ', "L");';
put ' run; ';
stop;
@@ -2194,7 +2201,7 @@ data _null_;
put ' %put NOTE: ' @; put "Loading package &packageName., version &packageVersion., license &packageLicense.; ";
put ' %put NOTE: ' @; put '*** %superq(packageTitle) ***; ';
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Generated: &packageGenerated.; ";
put ' %put NOTE- ' @; put 'Author(s): %superq(packageAuthor); ';
put ' %put NOTE- ' @; put 'Maintainer(s): %superq(packageMaintainer); ';
put ' %put NOTE- ;';
@@ -2395,8 +2402,10 @@ data _null_;
put ' if (LP_find ne 0) or (LP_find = 0 and . < versN < verRN) then ';
put ' do; ';
put ' missingPackagr = 1; ';
put ' put "ERROR: SAS package: " req "is missing! Download it and" ; ';
put ' put ''ERROR- use %loadPackage('' name ", requiredVersion = " verR ") to load it." ;';
put ' put "ERROR: SAS package: " req "is missing! Download it by hand or if the SAS session";';
put ' put "ERROR- has access to the Internet and the package is available at SASPAC repository";';
put ' put ''ERROR- use %installPackage('' name +(-1) "(" verR +(-1) ")) to install it."/; ';
put ' put ''ERROR- Use %loadPackage('' name +(-1) ", requiredVersion=" verR +(-1) ") to load it."/;';
put ' end ; ';
put ' end ; ';
put ' if missingPackagr then call symputX("packageRequiredErrors", 1, "L"); ';
@@ -2408,8 +2417,10 @@ data _null_;
put ' do req = ' / packageReqPackages / ' ; ';
put ' name = lowcase(strip(kscanx(req, 1, "("))); ';
put ' vers = compress(kscanx(req,-1, "("), ".", "KD"); ';
put ' put "ERROR: SAS package " req "is missing! Download/install it and" ; ';
put ' put ''ERROR- use %loadPackage('' name ", requiredVersion = " vers ") to load it." ; ';
put ' put "ERROR: SAS package " req "is missing! Download it by hand or if the SAS session";';
put ' put "ERROR- has access to the Internet and the package is available at SASPAC repository";';
put ' put ''ERROR- use %installPackage('' name +(-1) "(" vers +(-1) ")) to install it."/; ';
put ' put ''ERROR- Use %loadPackage('' name +(-1)", requiredVersion=" vers +(-1) ") to load it."/;';
put ' end ; ';
put ' end; ';
put ' stop; ';
@@ -2473,30 +2484,18 @@ data _null_;
/* header for multiple functions in one FCMP run */
put "proc fcmp outlib = work.%lowcase(&packageName.fcmp).package ; ";
end;
if 1 = FIRST.type and upcase(type)='PROTO' then
if 1 = isProto and upcase(type)='PROTO' then
do;
/* macro variable for test if cherry picking used PROTO */
put 'data _null_; ';
put ' call symputX("cherryPick_PROTO", 0, "L"); ';
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='PROTO' then
do;
/* header for multiple functions in one PROTO run */
put "proc proto package = work.%lowcase(&packageName.proto).package ; ";
end;
if 1 = FIRST.type and upcase(type)='IMLMODULE' then
do;
/* macro variable for test if cherry picking used IML */
put 'data _null_; ';
put ' call symputX("cherryPick_IML", 0, "L"); ';
put ' call symputX("cherryPick_IML_ALL", 0, "L"); ';
put 'run; ';
/* header, for IML modules */
put "proc iml ; ";
end;
if 1 = FIRST.type and upcase(type)='FORMATS' then
do;
/* header, for FORMATS */
put "proc format lib = work.%lowcase(&packageName.format) ; ";
end;
if 1 = isFormat and upcase(type)=:'FORMAT' then
do;
/* macro variable for test if cherry picking used FORMAT */
@@ -2504,6 +2503,27 @@ data _null_;
put ' call symputX("cherryPick_FORMAT", 0, "L"); ';
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='FORMATS' then
do;
/* header, for FORMATS */
put "proc format lib = work.%lowcase(&packageName.format) ; ";
end;
if 1 = isIMLmodule and upcase(type)='IMLMODULE' then
do;
/* macro variable for test if cherry picking used IML */
put 'data _null_; ';
put ' call symputX("cherryPick_IML_ALL", 0, "L"); ';
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='IMLMODULE' then
do;
/* macro variable for test if cherry picking used IML */
put 'data _null_; ';
put ' call symputX("cherryPick_IML", 0, "L"); ';
put 'run; ';
/* header, for IML modules */
put "proc iml ; ";
end;
/* HEADERS for IML, FCMP, and PROTO - end */
put ' ' /
@@ -2614,7 +2634,7 @@ data _null_;
' !! '' %put %str( )when set to the value of `HELP` (upcase letters!) displays this help message.;''' /
' !! '' %put - `depList` [technical] contains the list of dependencies required by the package.;''' /
' !! '' %put - %str( )for _this_ macro the default value is: `';
' !! '' %put %str( )for _this_ instance of the macro the default value is: `';
%if %superq(packageReqPackages) ne %then
%do;
do i = 1 to countw(packageReqPackages, ",", "Q");
@@ -2622,9 +2642,9 @@ data _null_;
put reqPackage @;
end;
%end;
put '`.;''' /
' !! '' %put The macro generated: '' !! put(dtCASLudf, datetime19.-L) !! ";"' /
' !! '' %put with the SAS Packages Framework version 20221212.;''' /
put +(-1) '`.;''' /
' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' /
' !! '' %put with the SAS Packages Framework version 20230112.;''' /
' !! '' %put ****************************************************************************;''' /
' !! '' %GOTO theEndOfTheMacro;''' /
' !! '' %end;''' ;
@@ -2725,6 +2745,7 @@ data _null_;
put 'options cmplib = (%unquote(%sysfunc(compress(' /
'%sysfunc(getoption(cmplib))' /
',%str(()) ))));';
/* proc delete is adde because "empty" PROTO creates dataset too */
put "proc delete data=work.%lowcase(&packageName.proto); run;";
put '%end;';
end;
@@ -2786,7 +2807,7 @@ data _null_;
' %put %str( )when set to the value of `ERROR` (the default) prints Error message.; ' /
' %put - `depList` [technical] contains the list of dependencies required by the package.; ' /
' %put - %str( )for _this_ macro the default value is: `';
' %put %str( )for _this_ instance of the macro the default value is: `';
%if %superq(packageReqPackages) ne %then
%do;
do i = 1 to countw(packageReqPackages, ",", "Q");
@@ -2794,9 +2815,9 @@ data _null_;
put reqPackage @;
end;
%end;
put '`.;' /
' %put The macro generated: ''' " !! put(dtIML, datetime19.-L) !! " '''; ' /
' %put with the SAS Packages Framework version 20221212.; ' /
put +(-1) '`.;' /
' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; ' /
' %put with the SAS Packages Framework version 20230112.; ' /
' %put ****************************************************************************; ' /
' %GOTO theEndOfTheMacro; ' /
' %end; ' /
@@ -2921,7 +2942,7 @@ data _null_;
put ' %put NOTE: ' @; put "Data for package &packageName., version &packageVersion., license &packageLicense.; ";
put ' %put NOTE: ' @; put '*** %superq(packageTitle) ***; ';
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Generated: &packageGenerated.; ";
put ' %put NOTE- ' @; put 'Author(s): %superq(packageAuthor); ';
put ' %put NOTE- ' @; put 'Maintainer(s): %superq(packageMaintainer); ';
put ' %put NOTE- ;';
@@ -3229,7 +3250,7 @@ data _null_;
put ' %put NOTE: '"Preview of the &packageName. package, version &packageVersion., license &packageLicense.;";
put ' %put NOTE: ' @; put '*** %superq(packageTitle) ***; ';
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Generated: &packageGenerated.; ";
put ' %put NOTE- ' @; put 'Author(s): %superq(packageAuthor); ';
put ' %put NOTE- ' @; put 'Maintainer(s): %superq(packageMaintainer); ';
put ' %put NOTE- ;';
@@ -3345,7 +3366,7 @@ data _null_;
put ' %put NOTE: '"Help for package &packageName., version &packageVersion., license &packageLicense.;";
put ' %put NOTE: ' @; put '*** %superq(packageTitle) ***; ';
put ' %put NOTE- ' @; put "Generated: %sysfunc(datetime(), datetime21.); ";
put ' %put NOTE- ' @; put "Generated: &packageGenerated.; ";
put ' %put NOTE- ' @; put 'Author(s): %superq(packageAuthor); ';
put ' %put NOTE- ' @; put 'Maintainer(s): %superq(packageMaintainer); ';
put ' %put NOTE- ;';
@@ -3404,7 +3425,7 @@ data _null_;
put ' end ; ';
%end;
put 'put "***"; put "* SAS package generated by generatePackage, version 20221212 *"; put "***";';
put 'put "***"; put "* SAS package generated by generatePackage, version 20230112 *"; put "***";';
put 'run; ' /;
@@ -3623,6 +3644,7 @@ filename &zipReferrence. clear;
%put NOTE: Calculating SHA256 check sum.;
%put NOTE- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^;
%put NOTE-;
filename &zipReferrence. "&filesLocation./%lowcase(&packageName.).zip";
filename &zipReferrence. list;
%local notesSourceOptions;
@@ -3632,12 +3654,20 @@ filename &zipReferrence. clear;
set sashelp.vfunc(keep=fncname);
where fncname = "HASHING_FILE";
call execute('
data the_SHA256_hash_id;
SHA256 = HASHING_FILE("SHA256", "&zipReferrence.", 4);
label SHA256 = "The SHA256 hash digest for package &packageName.:";
put / @7 SHA256= / " ";
run;');
call execute('proc print data = the_SHA256_hash_id noobs label; run;');
data the_SHA256_hash_id;' !!
/* F - file */
" SHA256 = 'F*' !! HASHING_FILE('SHA256', pathname('&zipReferrence.','F'), 0); " !!
' TYPE="F"; ' !!
' put / @7 SHA256= / " "; output; ' !!
/* C - content */
" SHA256 = 'C*' !! HASHING_FILE('SHA256', '&zipReferrence.', 4); " !!
' TYPE="C"; ' !!
' put / @7 SHA256= / " "; output; ' !!
' label ' !!
' SHA256 = "The SHA256 hash digest for package &packageName.:" ' !!
' TYPE= "Type of hash digest / F = file / C = content"; ' !!
'run;');
call execute('proc print data = the_SHA256_hash_id noobs label split="/"; run;');
stop;
run;
options &notesSourceOptions.;
@@ -4268,7 +4298,7 @@ TODO: (in Polish)
*/
)/secure
/*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20221212. Run %loadPackages() for help info.'
des = 'Macro to load multiple SAS packages at one run, version 20230112. Run %loadPackages() for help info.'
parmbuff
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
@@ -4284,7 +4314,7 @@ parmbuff
%put ### This is short help information for the `loadPackageS` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro wrapper for the loadPackage macro, version `20221212` #;
%put # Macro wrapper for the loadPackage macro, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -4381,7 +4411,7 @@ parmbuff
hashing_file() function, SAS 9.4M6 */
)/secure
/*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20221212. Run %verifyPackage() for help info.'
des = 'Macro to verify SAS package with the hash digest, version 20230112. Run %verifyPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -4396,7 +4426,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20221212. Run %
%put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to verify SAS package with it hash digest, version `20221212` #;
%put # Macro to verify SAS package with it hash digest, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -4506,13 +4536,21 @@ des = 'Macro to verify SAS package with the hash digest, version 20221212. Run %
filename &_PackageFileref_. list;
data _null_;
SHA256 = HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
providedHash = "&hash.";
length providedHash $ 100;
providedHash = strip(symget("hash"));
select;
when ( 'F*' = upcase(substr(providedHash,1,2)) ) /* F = file digest */
SHA256 = 'F*' !! HASHING_FILE("SHA256", pathname("&_PackageFileref_.",'F'), 0);
when ( 'C*' = upcase(substr(providedHash,1,2)) ) /* C = content digest */
SHA256 = 'C*' !! HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
otherwise /* legacy approach, without C or F, digest value equivalent to C */
SHA256 = HASHING_FILE("SHA256", "&_PackageFileref_.", 4);
end;
put "Provided Hash: " providedHash;
put "SHA256 digest: " SHA256;
put " ";
if SHA256 = providedHash then
if upcase(SHA256) = upcase(providedHash) then
do;
put "NOTE: Package verification SUCCESSFUL.";
put "NOTE- Generated hash is EQUAL to the provided one.";
@@ -4567,7 +4605,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20221212. Run %
*/
)/secure
/*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20221212. Run %previewPackage() for help info.'
des = 'Macro to preview content of a SAS package, version 20230112. Run %previewPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -4582,7 +4620,7 @@ des = 'Macro to preview content of a SAS package, version 20221212. Run %preview
%put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get previwe of a SAS packages, version `20221212` #;
%put # Macro to get previwe of a SAS packages, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -4709,7 +4747,7 @@ des = 'Macro to preview content of a SAS package, version 20221212. Run %preview
when empty the "packages" value is used */
)/secure
/*** HELP END ***/
des = 'Macro to list directories pointed by "packages" fileref, version 20221212. Run %extendPackagesFileref(HELP) for help info.'
des = 'Macro to list directories pointed by "packages" fileref, version 20230112. Run %extendPackagesFileref(HELP) for help info.'
;
%if %QUPCASE(&packages.) = HELP %then
@@ -4725,7 +4763,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20221212
%put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20221212` #;
%put # Macro to list directories pointed by 'packages' fileref, version `20230112` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -10,7 +10,7 @@ Packages:
---
- **SQLinDS**\[2.2.3\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
- **SQLinDS**\[2.2.4\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g.
```sas
data class;
set %SQL(
@@ -22,21 +22,13 @@ data class;
WH = weight + height;
run;
```
SHA256 digest for SQLinDS: D5A66E60602270E5FB1E592FA3E0C2F2C640BC077FE799A2223CB9BA275F6F47
SHA256 digest for SQLinDS: 42677CEBB0778A6B72DE9C0071B66A345811EE470289E3847D7737F782E709E0
[Documentation for SQLinDS](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/sqlinds.md "Documentation for SQLinDS")
---
- **MacroCore**\[1\], a macro library for SAS application developers. Over 100 macros for Base SAS, metadata, and Viya. Provided by the [SASjs framework](https://sasjs.io "SASjs framework").
SHA256 digest for MacroCore: A23C29529F3CE7D0C8BEE9545C5D22D5B5594907547374A5135B8E5A48D7687B
[Documentation for MacroCore](https://core.sasjs.io "Documentation for MacroCore")
---
- **DFA** (Dynamic Function Arrays)\[0.5.3\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples.
- **DFA** (Dynamic Function Arrays)\[0.5.4\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples.
```sas
%createDFArray(ArrDynamic, resizefactor=17);
@@ -63,13 +55,13 @@ data _null_;
end;
run;
```
SHA256 digest for DFA: 7520CF21CBF1FD4AD2BC05C5DD343E508FCEA507575EBC060B4AD322FB80AB04
SHA256 digest for DFA: 6DEB02BE1C30453FBC688AF1F561709C7D6BF10B3B67988B238853A2A9D53034
[Documentation for DFA](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/dfa.md "Documentation for DFA")
---
- **macroArray**\[1.0.3\], implementation of an array concept in a macro language, e.g.
- **macroArray**\[1.0.4\], implementation of an array concept in a macro language, e.g.
```sas
%array(ABC[17] (111:127), macarray=Y);
@@ -88,13 +80,13 @@ SHA256 digest for DFA: 7520CF21CBF1FD4AD2BC05C5DD343E508FCEA507575EBC060B4AD322F
which = 1:H:2
);
```
SHA256 digest for macroArray: 244B88C82AD7E6E93B8B85BC701ECDDB20B68F38B16C500EE9B49E1167ADC298
SHA256 digest for macroArray: 8584C249C308B5E8B620ED5F695BC58CD426172FB2EACD5FF9C6899F9DE2B470
[Documentation for macroArray](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/macroarray.md "Documentation for macroArray")
---
- **BasePlus**\[1.17.3\] adds a bunch of functionalities I am missing in BASE SAS, such as:
- **BasePlus**\[1.18.4\] adds a bunch of functionalities I am missing in BASE SAS, such as:
```sas
call arrMissToRight(myArray);
call arrFillMiss(17, myArray);
@@ -112,25 +104,25 @@ format x bool.;
%zipLibrary(sashelp,libOut=work)
```
SHA256 digest for BasePlus: D8DBB7CC5952331FA59FEBBBDD15BC543FE3C89A8BA9150FE6AF5E412868EBE7
SHA256 digest for BasePlus: A6F1977DC4EC22A39DDC7BCE68CF562AF54351A3D385D488EC3067B5A7C0F3CB
[Documentation for BasePlus](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md "Documentation for BasePlus")
---
- **GSM** (Generate Secure Macros)\[0.20.3\], package allows
- **GSM** (Generate Secure Macros)\[0.20.4\], package allows
to create secured macros stored in SAS Proc FCMP functions.
The dataset with functions can be shared between different operating systems
and allows to generate macros on site without showing their code.
SHA256 digest for GSM: 50D8340E080BEA459E68BE315146AD3B809930DB8DC7B23C7A492C3815ACD83F
SHA256 digest for GSM: 83EC349DF97EFA71187536E8CC6CD62215CE675D20DA355E14D4ACE3FBC6D524
[Documentation for GSM](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/gsm.md "Documentation for GSM")
---
- **dynMacroArray**\[0.2.3\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA). Development of this package is currently on hold.
- **dynMacroArray**\[0.2.4\], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA). Development of this package is currently on hold.
SHA256 digest for dynMacroArray: 440920272D1838505EA5C033B1C448C612DE2FCCFD57F157BB90ED980E4001CC
SHA256 digest for dynMacroArray: 7800F36877DC0B9A94B1AC8FFDF8B43ADB216F11B5B26343E41165E7F5E32FC0
---

View File

@@ -1,3 +1,12 @@
/* 20221215 */
BasePlus: A6F1977DC4EC22A39DDC7BCE68CF562AF54351A3D385D488EC3067B5A7C0F3CB
DFA: 6DEB02BE1C30453FBC688AF1F561709C7D6BF10B3B67988B238853A2A9D53034
dynMacroArray: 7800F36877DC0B9A94B1AC8FFDF8B43ADB216F11B5B26343E41165E7F5E32FC0
GSM: 83EC349DF97EFA71187536E8CC6CD62215CE675D20DA355E14D4ACE3FBC6D524
macroArray: 8584C249C308B5E8B620ED5F695BC58CD426172FB2EACD5FF9C6899F9DE2B470
SQLinDS: 42677CEBB0778A6B72DE9C0071B66A345811EE470289E3847D7737F782E709E0
/* 20221125 */
BasePlus: D8DBB7CC5952331FA59FEBBBDD15BC543FE3C89A8BA9150FE6AF5E412868EBE7
DFA: 7520CF21CBF1FD4AD2BC05C5DD343E508FCEA507575EBC060B4AD322FB80AB04

View File

@@ -49,14 +49,14 @@
* [`%LDsNm()` macro](#ldsnm-macro)
* [`%LVarNm()` macro](#lvarnm-macro)
* [`%LVarNmLab()` macro](#lvarnmlab-macro)
* [`%bpPIPE()` macro](#bppipe-macro)
* [License](#license)
---
# The BasePlus package [ver. 1.17.3] <a name="baseplus-package"></a> ###############################################
# The BasePlus package [ver. 1.18.4] <a name="baseplus-package"></a> ###############################################
The **BasePlus** package implements useful
functions and functionalities I miss in the BASE SAS.
@@ -220,63 +220,69 @@ data MyNextDataset;
run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Example 12**: List, to the log, content of `home` directory.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%bpPIPE(ls -la ~/)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
Package contains:
1. macro deduplistc
2. macro deduplistp
3. macro deduplists
4. macro deduplistx
5. macro functionexists
6. macro getvars
7. macro ldsn
8. macro ldsnm
9. macro lvarnm
10. macro lvarnmlab
11. macro qdeduplistx
12. macro qgetvars
13. macro qzipevalf
14. macro raincloudplot
15. macro symdelglobal
16. macro unziplibrary
17. macro zipevalf
18. macro ziplibrary
19. format bool
20. format boolz
21. format ceil
22. format floor
23. format int
24. functions arrfill
25. functions arrfillc
26. functions arrmissfill
27. functions arrmissfillc
28. functions arrmisstoleft
29. functions arrmisstoleftc
30. functions arrmisstoright
31. functions arrmisstorightc
32. functions bracketsc
33. functions bracketsn
34. functions catxfc
35. functions catxfi
36. functions catxfj
37. functions catxfn
38. functions deldataset
39. functions semicolonc
40. functions semicolonn
41. format brackets
42. format semicolon
43. proto qsortincbyprocproto
44. functions frommissingtonumberbs
45. functions fromnumbertomissing
46. functions quicksort4notmiss
47. functions quicksorthash
48. functions quicksorthashsddv
49. functions quicksortlight
1. macro bppipe
2. macro deduplistc
3. macro deduplistp
4. macro deduplists
5. macro deduplistx
6. macro functionexists
7. macro getvars
8. macro ldsn
9. macro ldsnm
10. macro lvarnm
11. macro lvarnmlab
12. macro qdeduplistx
13. macro qgetvars
14. macro qzipevalf
15. macro raincloudplot
16. macro symdelglobal
17. macro unziplibrary
18. macro zipevalf
19. macro ziplibrary
20. format bool
21. format boolz
22. format ceil
23. format floor
24. format int
25. functions arrfill
26. functions arrfillc
27. functions arrmissfill
28. functions arrmissfillc
29. functions arrmisstoleft
30. functions arrmisstoleftc
31. functions arrmisstoright
32. functions arrmisstorightc
33. functions bracketsc
34. functions bracketsn
35. functions catxfc
36. functions catxfi
37. functions catxfj
38. functions catxfn
39. functions deldataset
40. functions semicolonc
41. functions semicolonn
42. format brackets
43. format semicolon
44. proto qsortincbyprocproto
45. functions frommissingtonumberbs
46. functions fromnumbertomissing
47. functions quicksort4notmiss
48. functions quicksorthash
49. functions quicksorthashsddv
50. functions quicksortlight
*SAS package generated by generatePackage, version 20221125*
*SAS package generated by generatePackage, version 20221215*
The SHA256 hash digest for package BasePlus:
`D8DBB7CC5952331FA59FEBBBDD15BC543FE3C89A8BA9150FE6AF5E412868EBE7`
`A6F1977DC4EC22A39DDC7BCE68CF562AF54351A3D385D488EC3067B5A7C0F3CB`
---
# Content description ############################################################################################
@@ -3934,6 +3940,42 @@ The basic syntax is the following, the `<...>` means optional parameters:
---
## >>> `%bpPIPE()` macro: <<< <a name="bppipe-macro"></a> #######################
The bpPIPE() [Base Plus PIPE] macro executes OS command
and print to the log output of the execution.
Under the hood it uses `_` filename reference to PIPE device.
### SYNTAX: ###################################################################
The basic syntax is the following, the `<...>` means optional parameters:
~~~~~~~~~~~~~~~~~~~~~~~sas
%bpPIPE( <OS command goes here> )
~~~~~~~~~~~~~~~~~~~~~~~
**Arguments description**:
* **NO Arguments** - Everything inside brackets is treated as an OS command.
---
### EXAMPLES AND USECASES: ####################################################
**EXAMPLE 1.** List, to the log, content of D and C drives:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%bpPIPE(D: & dir & dir "C:\")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 2.** List, to the log, content of `home` directory:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%bpPIPE(ls -halt ~/)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
## License ####################################################################
Copyright (c) since 2020 Bartosz Jablonski

Binary file not shown.

View File

@@ -18,7 +18,7 @@
---
# The DFA package [ver. 0.5.3] <a name="dfa-package"></a> ###############################################
# The DFA package [ver. 0.5.4] <a name="dfa-package"></a> ###############################################
The **DFA** (a.k.a. *Dynamic Function Array*) package implements:
- dynamic numeric and character arrays,
@@ -52,10 +52,10 @@ Package contains:
12. exec generatearrays
13. clean generatearrays
*SAS package generated by generatePackage, version 20221125*
*SAS package generated by generatePackage, version 20221215*
The SHA256 hash digest for package BasePlus:
`7520CF21CBF1FD4AD2BC05C5DD343E508FCEA507575EBC060B4AD322FB80AB04`
`6DEB02BE1C30453FBC688AF1F561709C7D6BF10B3B67988B238853A2A9D53034`
---
# Content description ############################################################################################

Binary file not shown.

Binary file not shown.

View File

@@ -8,7 +8,7 @@
---
# The GSM package [ver. 0.20.3] <a name="gsm-package"></a> ###############################################
# The GSM package [ver. 0.20.4] <a name="gsm-package"></a> ###############################################
The **GSM** (a.k.a. *Generate Secure Macros*) package allows
to create secured macros stored in SAS Proc FCMP functions.
@@ -91,10 +91,10 @@ Package contains:
Required SAS Components:
`Base SAS Software`
*SAS package generated by generatePackage, version 20221125*
*SAS package generated by generatePackage, version 20221215*
The SHA256 hash digest for package GSM:
`50D8340E080BEA459E68BE315146AD3B809930DB8DC7B23C7A492C3815ACD83F`
`83EC349DF97EFA71187536E8CC6CD62215CE675D20DA355E14D4ACE3FBC6D524`
## >>> `%GSM()` macro: <<< <a name="gsm-macro"></a> #######################

Binary file not shown.

View File

@@ -19,7 +19,7 @@
---
# The macroArray package [ver. 1.0.3] <a name="macroarray-package"></a> ###############################################
# The macroArray package [ver. 1.0.4] <a name="macroarray-package"></a> ###############################################
The **macroArray** package implements a macro array facility:
- `%array()`,
@@ -75,10 +75,10 @@ Package contains:
Required SAS Components:
*Base SAS Software*
*SAS package generated by generatePackage, version 20221125*
*SAS package generated by generatePackage, version 20221215*
The SHA256 hash digest for package macroArray:
`440920272D1838505EA5C033B1C448C612DE2FCCFD57F157BB90ED980E4001CC`
`8584C249C308B5E8B620ED5F695BC58CD426172FB2EACD5FF9C6899F9DE2B470`
---
# Content description ############################################################################################

Binary file not shown.

View File

@@ -8,7 +8,7 @@
---
# The SQLinDS package [ver. 2.2.3] <a name="sqlinds-package"></a> ###############################################
# The SQLinDS package [ver. 2.2.4] <a name="sqlinds-package"></a> ###############################################
The **SQLinDS** package is an implementation of
the *macro-function-sandwich* concept introduced in the
@@ -46,10 +46,10 @@ Package contains:
Required SAS Components:
*Base SAS Software*
*SAS package generated by generatePackage, version 20221125*
*SAS package generated by generatePackage, version 20221215*
The SHA256 hash digest for package SQLinDS:
`D5A66E60602270E5FB1E592FA3E0C2F2C640BC077FE799A2223CB9BA275F6F47`
`42677CEBB0778A6B72DE9C0071B66A345811EE470289E3847D7737F782E709E0`
---
# Content description ############################################################################################

Binary file not shown.