SAS Packages Framework, version 20230520

SAS Packages Framework, version 20230520

Fixes:
- Bug fixes for the "Additional Content" feature. In the `%loadPackageAddCnt()` and `%generatePackage()` macros lengths of the "file path" variables were extended.

Packages:
- The `BasePlus` package, version `1.24.1` was regenerated with latest version of the framework.
- The `%RainCloudPlot()` macro from the `BasePlus` packages was updated with new parameters (see the documentation).

Documentation:
- Documentation updated.
This commit is contained in:
Bart Jablonski
2023-05-20 17:23:53 +02:00
parent 72a77edb16
commit e55275d308
18 changed files with 188 additions and 82 deletions

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 20230411. Run %extendPackagesFileref(HELP) for help info.'
des = 'Macro to list directories pointed by "packages" fileref, version 20230520. 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 20230411
%put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20230411` #;
%put # Macro to list directories pointed by 'packages' fileref, version `20230520` #;
%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 20230411. Run %generatePackage() for help info.'
des = 'Macro to generate SAS packages, version 20230520. 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 20230411. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to generate SAS packages, version `20230411` #;
%put # Macro to generate SAS packages, version `20230520` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -724,7 +724,7 @@ run;
run;
data &filesWithCodes.addCnt;
length root dname $ 2048 filename $ 256 dir level 8;
length root dname $ 8192 filename $ 256 dir level 8;
root = "&filesLocation./&additionalContent.";
retain filename dname ' ' level 0 dir 1;
label
@@ -1478,7 +1478,7 @@ data _null_;
%end;
put +(-1) '`.;''' /
' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' /
' !! '' %put with the SAS Packages Framework version 20230411.;''' /
' !! '' %put with the SAS Packages Framework version 20230520.;''' /
' !! '' %put ****************************************************************************;''' /
' !! '' %GOTO theEndOfTheMacro;''' /
' !! '' %end;''' ;
@@ -1651,7 +1651,7 @@ data _null_;
%end;
put +(-1) '`.; '' !!' /
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !!' /
''' %put with the SAS Packages Framework version 20230411.; '' !! ' /
''' %put with the SAS Packages Framework version 20230520.; '' !! ' /
''' %put ****************************************************************************; '' !! ' /
''' %GOTO theEndOfTheMacro; '' !! ' /
''' %end; '' !! ' /
@@ -2267,7 +2267,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 20230411 *"; put "***";';
put 'put "***"; put "* SAS package generated by generatePackage, version 20230520 *"; put "***";';
put 'run; ' /;
@@ -2491,20 +2491,25 @@ filename _SPFOUT_ clear;
set &filesWithCodes.addCnt;
if dir=0;
rc1=filename("_SPFIN_" , catx('/',root,dname,filename), "disk", "lrecl=1 recfm=n");
length rc1txt $ 8192;
rc1txt=sysmsg();
rc2=filename("_SPFOUT_", "%sysfunc(pathname(work,L))/addcnt.zip", "ZIP"
,"lrecl=1 recfm=n member='" !! catx('/',dname,filename) !! "'");
length rc2txt $ 8192;
rc2txt=sysmsg();
do _N_ = 1 to 10;
rc3=fcopy("_SPFIN_","_SPFOUT_");
length rc3txt $ 8192;
rc3txt=sysmsg();
if fexist("_SPFOUT_") then leave;
else sleeprc=sleep(0.25,1);
end;
rc4=fexist("_SPFOUT_");
length rc4txt $ 8192;
rc4txt=sysmsg();
if rc4 = 0 then
@@ -2525,18 +2530,22 @@ filename _SPFOUT_ clear;
%put Status of inserting "addcnt.zip" into the package file:;
data _null_;
rc1=filename("_SPFIN_" , "%sysfunc(pathname(work,L))/addcnt.zip", "disk", "lrecl=1 recfm=n");
length rc1txt $ 8192;
rc1txt=sysmsg();
rc2=filename("_SPFOUT_", pathname("&zipReferrence.","F"), "ZIP", "lrecl=1 recfm=n member='addcnt.zip'");
length rc2txt $ 8192;
rc2txt=sysmsg();
do _N_ = 1 to 10;
rc3=fcopy("_SPFIN_","_SPFOUT_");
length rc3txt $ 8192;
rc3txt=sysmsg();
if fexist("_SPFOUT_") then leave;
else sleeprc=sleep(0.25,1);
end;
rc4=fexist("_SPFOUT_");
length rc4txt $ 8192;
rc4txt=sysmsg();
if rc4 then

View File

@@ -24,7 +24,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to get help about SAS package, version 20230411. Run %helpPackage() for help info.'
des = 'Macro to get help about SAS package, version 20230520. 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 20230411. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get help about SAS packages, version `20230411` #;
%put # Macro to get help about SAS packages, version `20230520` #;
%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 20230411 */
/* Macros to install SAS packages, version 20230520 */
/* 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

@@ -16,7 +16,7 @@
/secure
minoperator
/*** HELP END ***/
des = 'Macro to install SAS package, version 20230411. Run %%installPackage() for help info.'
des = 'Macro to install SAS package, version 20230520. Run %%installPackage() for help info.'
;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do;
@@ -31,7 +31,7 @@ des = 'Macro to install SAS package, version 20230411. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;;
%put # #;
%put # Macro to install SAS packages, version `20230411` #;
%put # Macro to install SAS packages, version `20230520` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -483,7 +483,7 @@ des = 'Macro to install SAS package, version 20230411. Run %%installPackage() fo
/* Macro to list SAS packages in packages folder.
Version 20230411
Version 20230520
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 20230411.'
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20230520.'
;
%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 `20230411` #;
%put # Macro to list available SAS packages, version `20230520` #;
%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 20230411
Version 20230520
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating

View File

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

View File

@@ -19,7 +19,7 @@
is provided in required version */
)/secure
/*** HELP END ***/
des = 'Macro to load additional content for a SAS package, version 20230411. Run %loadPackageAddCnt() for help info.'
des = 'Macro to load additional content for a SAS package, version 20230520. Run %loadPackageAddCnt() for help info.'
minoperator
;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
@@ -35,7 +35,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 `20230411` #;
%put # Macro to *load* additional content for a SAS package, version `20230520` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -220,14 +220,17 @@ minoperator
call symputx("AdditionalContent", 0, "L");
rc1=filename("in", pathname("&_PackageFileref_."), "ZIP", "lrecl=1 recfm=n member='addcnt.zip'");
length rc1txt $ 8192;
rc1txt=sysmsg();
if fexist("in") then
do;
rc2=filename("out", pathname("WORK")!!"/%lowcase(&packageName.)addcnt.zip", "disk", "lrecl=1 recfm=n");
length rc2txt $ 8192;
rc2txt=sysmsg();
rc3=fcopy("in","out");
length rc3txt $ 8192;
rc3txt=sysmsg();
if rc3 then put _N_ @12 (rc:) (=);
@@ -264,6 +267,7 @@ minoperator
end;
if did then
do i=1 to dnum(did);
length file $ 8192;
file = dread(did, i);
output;
keep file;
@@ -275,6 +279,7 @@ minoperator
set WORK.__&_TargetFileref_._zip___ end = EOF;
wc = countw(file,"/\");
length libText pathname_f $ 8192;
libText = pathname("outData", "L");
if scan(file, wc , "/\") = "" then
@@ -290,12 +295,17 @@ minoperator
rc = libname("test", libText);
rc = libname("test");
end;
rc1 = filename("in", pathname("f"), "zip", "member='" !! strip(file) !! "' lrecl=1 recfm=n");
pathname_f = pathname("f");
rc1 = filename("in", strip(pathname_f), "zip", "member='" !! strip(file) !! "' lrecl=1 recfm=n");
length rc1txt $ 8192;
rc1msg = sysmsg();
rc2 = filename("out", catx("/", libText, scan(file, j , "/\")), "disk", "lrecl=1 recfm=n");
length rc2txt $ 8192;
rc2msg = sysmsg();
rc3 = fcopy("in", "out");
length rc3txt $ 8192;
rc3msg = sysmsg();
loadingProblem + (rc3 & 1);

View File

@@ -11,7 +11,7 @@
*/
)/secure
/*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20230411. Run %loadPackages() for help info.'
des = 'Macro to load multiple SAS packages at one run, version 20230520. 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 `20230411` #;
%put # Macro wrapper for the loadPackage macro, version `20230520` #;
%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 20230411. Run %previewPackage() for help info.'
des = 'Macro to preview content of a SAS package, version 20230520. 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 20230411. Run %preview
%put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to get previwe of a SAS packages, version `20230411` #;
%put # Macro to get previwe of a SAS packages, version `20230520` #;
%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 20230411. Run %unloadPackage() for help info.'
des = 'Macro to unload SAS package, version 20230520. 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 20230411. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to unload SAS packages, version `20230411` #;
%put # Macro to unload SAS packages, version `20230520` #;
%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 20230411. Run %verifyPackage() for help info.'
des = 'Macro to verify SAS package with the hash digest, version 20230520. 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 20230411. Run %
%put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to verify SAS package with it hash digest, version `20230411` #;
%put # Macro to verify SAS package with it hash digest, version `20230520` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;