SAS Packages Framework, version 20230411

## **SAS Packages Framework**, version `20230411`.

---

Fixes:
- Bug fix for cherry picking. Cherry picking from already loaded package caused deletion of search paths to FCMP functions, Proto functions, Formats, and Informats. Also corresponding dataset for Proc Proto was deleted.
- Bug fix for Proc Proto C functions. The way how Proc Proto adds new portions of stored C functions caused that, if there were multiple directories with proto C functions all content was overwritten by the last one.

[Documentation](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/SAS(r)%20packages%20-%20the%20way%20to%20share%20(a%20how%20to)-%20Paper%204725-2020%20-%20extended.pdf "Documentation") updated.

---

Packages regenerated with latest version of SAS Packages Framework:
- [BasePlus](https://github.com/SASPAC/baseplus "BasePlus") package [ver. 1.19.1]
- [DFA](https://github.com/SASPAC/dfa "DFA") package [ver. 0.5.5]
- dynMacroArray package [ver. 0.2.5]
- [GSM](https://github.com/SASPAC/gsm "GSM") package [ver. 0.20.5]
- [macroArray](https://github.com/SASPAC/macroarray "macroArray") package [ver. 1.0.5]
- [SQLinDS](https://github.com/SASPAC/sqlinds "SQLinDS") package [ver. 2.2.6]

---
This commit is contained in:
Bart Jablonski
2023-04-11 18:37:31 +02:00
parent 44be31bd84
commit 2f5cb056b1
28 changed files with 135 additions and 117 deletions

View File

@@ -42,7 +42,7 @@
- to unload, or
- to generate SAS packages.
Version 20230207.
Version 20230411.
See examples below.
A SAS package is a zip file containing a group of files
@@ -88,7 +88,7 @@
default is 0 - means No, 1 means Yes */
)/secure
/*** HELP END ***/
des = 'Macro to load SAS package, version 20230207. Run %loadPackage() for help info.'
des = 'Macro to load SAS package, version 20230411. Run %loadPackage() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -104,7 +104,7 @@ minoperator
%put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *load* SAS packages, version `20230207` #;
%put # Macro to *load* SAS packages, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -350,7 +350,7 @@ minoperator
*/
)/secure
/*** HELP END ***/
des = 'Macro to unload SAS package, version 20230207. Run %unloadPackage() for help info.'
des = 'Macro to unload SAS package, version 20230411. Run %unloadPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -365,7 +365,7 @@ des = 'Macro to unload SAS package, version 20230207. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to unload SAS packages, version `20230207` #;
%put # Macro to unload SAS packages, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -510,7 +510,7 @@ des = 'Macro to unload SAS package, version 20230207. Run %unloadPackage() for h
*/
)/secure
/*** HELP END ***/
des = 'Macro to get help about SAS package, version 20230207. Run %helpPackage() for help info.'
des = 'Macro to get help about SAS package, version 20230411. Run %helpPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -525,7 +525,7 @@ des = 'Macro to get help about SAS package, version 20230207. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get help about SAS packages, version `20230207` #;
%put # Macro to get help about SAS packages, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -655,7 +655,7 @@ TODO:
- add MD5(&packageName.) value hash instead "package" word in filenames [DONE]
*/
/* Macros to install SAS packages, version 20230207 */
/* Macros to install SAS packages, version 20230411 */
/* 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
@@ -680,7 +680,7 @@ TODO:
/secure
minoperator
/*** HELP END ***/
des = 'Macro to install SAS package, version 20230207. Run %%installPackage() for help info.'
des = 'Macro to install SAS package, version 20230411. Run %%installPackage() for help info.'
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do;
@@ -695,7 +695,7 @@ des = 'Macro to install SAS package, version 20230207. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to install SAS packages, version `20230207` #;
%put # Macro to install SAS packages, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1147,7 +1147,7 @@ des = 'Macro to install SAS package, version 20230207. Run %%installPackage() fo
/* Macro to list SAS packages in packages folder.
Version 20230207
Version 20230411
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1168,7 +1168,7 @@ des = 'Macro to install SAS package, version 20230207. Run %%installPackage() fo
/*+listPackages+*/
%macro listPackages()/secure PARMBUFF
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20230207.'
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20230411.'
;
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
%do;
@@ -1183,7 +1183,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 `20230207` #;
%put # Macro to list available SAS packages, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -1333,7 +1333,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
/* Macro to generate SAS packages.
Version 20230207
Version 20230411
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -1370,7 +1370,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 20230207. Run %generatePackage() for help info.'
des = 'Macro to generate SAS packages, version 20230411. Run %generatePackage() for help info.'
;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do;
@@ -1385,7 +1385,7 @@ des = 'Macro to generate SAS packages, version 20230207. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to generate SAS packages, version `20230207` #;
%put # Macro to generate SAS packages, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -2627,7 +2627,7 @@ data _null_;
do;
/* macro variable for test if cherry picking used FCMP */
put 'data _null_; ';
put ' call symputX("cherryPick_FCMP", 0, "L"); ';
put " call symputX('cherryPick_FCMP', exist('work.%lowcase(&packageName.fcmp)'), 'L'); ";
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='FUNCTIONS' then
@@ -2639,19 +2639,24 @@ data _null_;
do;
/* macro variable for test if cherry picking used PROTO */
put 'data _null_; ';
put ' call symputX("cherryPick_PROTO", 0, "L"); ';
put " call symputX('cherryPick_PROTO', exist('work.%lowcase(&packageName.proto)'), 'L'); ";
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='PROTO' then
do;
protoGrpNum+1; /* number of proto directory to create "packageXX" subgroup to prevent overwrite in case
of multiple proc proto dirs because multiple proc proto executed with the same
value of "package=" overwrites previously created content
*/
/* header for multiple functions in one PROTO run */
put "proc proto package = work.%lowcase(&packageName.proto).package ; ";
put "proc proto package = work.%lowcase(&packageName.proto).package" ProtoGrpNum /
" LABEL='Proc Proto C functions for &packageName. package, part" ProtoGrpNum "' ; ";
end;
if 1 = isFormat and upcase(type)=:'FORMAT' then
do;
/* macro variable for test if cherry picking used FORMAT */
put 'data _null_; ';
put ' call symputX("cherryPick_FORMAT", 0, "L"); ';
put " call symputX('cherryPick_FORMAT', cexist('work.%lowcase(&packageName.format)'), 'L'); ";
put 'run; ';
end;
if 1 = FIRST.type and upcase(type)='FORMATS' then
@@ -2820,7 +2825,7 @@ data _null_;
%end;
put +(-1) '`.;''' /
' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' /
' !! '' %put with the SAS Packages Framework version 20230207.;''' /
' !! '' %put with the SAS Packages Framework version 20230411.;''' /
' !! '' %put ****************************************************************************;''' /
' !! '' %GOTO theEndOfTheMacro;''' /
' !! '' %end;''' ;
@@ -2993,7 +2998,7 @@ data _null_;
%end;
put +(-1) '`.; '' !!' /
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !!' /
''' %put with the SAS Packages Framework version 20230207.; '' !! ' /
''' %put with the SAS Packages Framework version 20230411.; '' !! ' /
''' %put ****************************************************************************; '' !! ' /
''' %GOTO theEndOfTheMacro; '' !! ' /
''' %end; '' !! ' /
@@ -3609,7 +3614,7 @@ data _null_;
put "put @3 'localization (only if additional content was deployed during the installation process).';" / "put ;";
%end;
put 'put "***"; put "* SAS package generated by generatePackage, version 20230207 *"; put "***";';
put 'put "***"; put "* SAS package generated by generatePackage, version 20230411 *"; put "***";';
put 'run; ' /;
@@ -4584,7 +4589,7 @@ TODO: (in Polish)
*/
)/secure
/*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20230207. Run %loadPackages() for help info.'
des = 'Macro to load multiple SAS packages at one run, version 20230411. Run %loadPackages() for help info.'
parmbuff
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
@@ -4600,7 +4605,7 @@ parmbuff
%put ### This is short help information for the `loadPackageS` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro wrapper for the loadPackage macro, version `20230207` #;
%put # Macro wrapper for the loadPackage macro, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -4697,7 +4702,7 @@ parmbuff
hashing_file() function, SAS 9.4M6 */
)/secure
/*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20230207. Run %verifyPackage() for help info.'
des = 'Macro to verify SAS package with the hash digest, version 20230411. Run %verifyPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -4712,7 +4717,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20230207. Run %
%put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to verify SAS package with it hash digest, version `20230207` #;
%put # Macro to verify SAS package with it hash digest, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -4891,7 +4896,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20230207. Run %
*/
)/secure
/*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20230207. Run %previewPackage() for help info.'
des = 'Macro to preview content of a SAS package, version 20230411. Run %previewPackage() for help info.'
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do;
@@ -4906,7 +4911,7 @@ des = 'Macro to preview content of a SAS package, version 20230207. Run %preview
%put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get previwe of a SAS packages, version `20230207` #;
%put # Macro to get previwe of a SAS packages, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -5033,7 +5038,7 @@ des = 'Macro to preview content of a SAS package, version 20230207. Run %preview
when empty the "packages" value is used */
)/secure
/*** HELP END ***/
des = 'Macro to list directories pointed by "packages" fileref, version 20230207. Run %extendPackagesFileref(HELP) for help info.'
des = 'Macro to list directories pointed by "packages" fileref, version 20230411. Run %extendPackagesFileref(HELP) for help info.'
;
%if %QUPCASE(&packages.) = HELP %then
@@ -5049,7 +5054,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20230207
%put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20230207` #;
%put # Macro to list directories pointed by 'packages' fileref, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -5150,7 +5155,7 @@ filename packages list;
is provided in required version */
)/secure
/*** HELP END ***/
des = 'Macro to load additional content for a SAS package, version 20230207. Run %loadPackageAddCnt() for help info.'
des = 'Macro to load additional content for a SAS package, version 20230411. Run %loadPackageAddCnt() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -5166,7 +5171,7 @@ minoperator
%put ### This is short help information for the `loadPackageAddCnt` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to *load* additional content for a SAS package, version `20230207` #;
%put # Macro to *load* additional content for a SAS package, version `20230411` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;