mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2026-01-17 11:10:06 +00:00
SAS Packages Framework version 20231009
SAS Packages Framework version 20231009
Bug fix in `%generatePackage()` macro.
Documentation updated.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
default value 1 means "delete tests work" */
|
||||
)/ secure minoperator
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to generate SAS packages, version 20230904. Run %generatePackage() for help info.'
|
||||
des = 'Macro to generate SAS packages, version 20231009. 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 20230904. Run %generatePackage()
|
||||
%put ### This is short help information for the `generatePackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to generate SAS packages, version `20230904` #;
|
||||
%put # Macro to generate SAS packages, version `20231009` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -71,6 +71,7 @@ des = 'Macro to generate SAS packages, version 20230904. Run %generatePackage()
|
||||
%put # if there are dependencies in loading the package. #;
|
||||
%put # Has to be a single directory, if more than one are #;
|
||||
%put # provided than only the first is used. #;
|
||||
%put # If path to location contains spaces it should be quoted! #;
|
||||
%put # #;
|
||||
%put # - `testResults=` Location where tests results should be stored, #;
|
||||
%put # if null (the default) then the session WORK is used. #;
|
||||
@@ -809,6 +810,7 @@ title6 "MD5 hashed fileref of package lowcase name: &_PackageFileref_.";
|
||||
title8 "Required SAS packages: %qsysfunc(compress(%superq(packageReqPackages),%str(%'%")))" ; /* " */
|
||||
%end;
|
||||
|
||||
footnote1 "SAS Packages Framework, version 20231009";
|
||||
|
||||
proc print data = &filesWithCodes.(drop=base folderRef fileRef rc folderid _abort_ fileId additionalContent);
|
||||
run;
|
||||
@@ -835,6 +837,7 @@ title;
|
||||
%end;
|
||||
|
||||
title;
|
||||
footnote;
|
||||
options ¬esSourceOptions.;
|
||||
|
||||
|
||||
@@ -1521,7 +1524,7 @@ data _null_;
|
||||
%end;
|
||||
put +(-1) '`.;''' /
|
||||
' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' /
|
||||
' !! '' %put with the SAS Packages Framework version 20230904.;''' /
|
||||
' !! '' %put with the SAS Packages Framework version 20231009.;''' /
|
||||
' !! '' %put ****************************************************************************;''' /
|
||||
' !! '' %GOTO theEndOfTheMacro;''' /
|
||||
' !! '' %end;''' ;
|
||||
@@ -1694,7 +1697,7 @@ data _null_;
|
||||
%end;
|
||||
put +(-1) '`.; '' !!' /
|
||||
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !!' /
|
||||
''' %put with the SAS Packages Framework version 20230904.; '' !! ' /
|
||||
''' %put with the SAS Packages Framework version 20231009.; '' !! ' /
|
||||
''' %put ****************************************************************************; '' !! ' /
|
||||
''' %GOTO theEndOfTheMacro; '' !! ' /
|
||||
''' %end; '' !! ' /
|
||||
@@ -2310,7 +2313,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 20230904 *"; put "***";';
|
||||
put 'put "***"; put "* SAS package generated by generatePackage, version 20231009 *"; put "***";';
|
||||
|
||||
put 'run; ' /;
|
||||
|
||||
@@ -2703,7 +2706,20 @@ filename &zipReferrence. clear;
|
||||
%put NOTE-;
|
||||
/* in case the packages macrovariable is multi-directory the first directory will be selected */
|
||||
data _null_;
|
||||
call symputX("packages", dequote(kscanx(resolve(symget("packages")), 1, "()", "QS")) ,"L");
|
||||
length packages $ 32767;
|
||||
packages = resolve(symget("packages"));
|
||||
|
||||
/* check if path contains quotes */
|
||||
quotes = lengthn(compress(packages,"""'","K"));
|
||||
|
||||
/* issue error for unmatched quotes */
|
||||
if mod(quotes,2) then
|
||||
put "ERROR: Unbalanced quotes in the PACKAGES= parameter." / "ERROR- " PACKAGES= ;
|
||||
|
||||
if quotes > 0 then
|
||||
call symputX("packages", dequote(kscanx(packages, 1, "()", "QS")) ,"L");
|
||||
else
|
||||
call symputX("packages", packages ,"L");
|
||||
run;
|
||||
|
||||
/* check if systask is available */
|
||||
@@ -2719,7 +2735,9 @@ run;
|
||||
put 'NOTE-';
|
||||
|
||||
n=6;
|
||||
put @n "filename packages '&packages.';" /;
|
||||
length packages $ 32767;
|
||||
packages = quote(dequote(strip(symget('packages'))));
|
||||
put @n "filename packages " packages ";" /;
|
||||
|
||||
if fileexist("&packages./SPFinit.sas") then
|
||||
put @n '%include packages(SPFinit.sas);' /;
|
||||
|
||||
Reference in New Issue
Block a user