SAS Packages Framework, version 20241129

SAS Packages Framework, version 20241129

Bug Fix in:
- `%generatePackage()` macro, and
- `%splitCodeForPackage()` macro.

---
This commit is contained in:
Bart Jablonski
2024-11-29 17:01:10 +01:00
parent 006377b255
commit c4e21e86b6
15 changed files with 99 additions and 99 deletions

View File

@@ -3,7 +3,7 @@
Macro to generate SAS packages.
Version 20241102
Version 20241129
A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating
@@ -43,7 +43,7 @@
file name be created */
)/ secure minoperator
/*** HELP END ***/
des = 'Macro to generate SAS packages, version 20241102. Run %generatePackage() for help info.'
des = 'Macro to generate SAS packages, version 20241129. Run %generatePackage() for help info.'
;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do;
@@ -58,7 +58,7 @@ des = 'Macro to generate SAS packages, version 20241102. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #;
%put #-------------------------------------------------------------------------------#;
%put # #;
%put # Macro to generate SAS packages, version `20241102` #;
%put # Macro to generate SAS packages, version `20241129` #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #;
@@ -871,7 +871,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 20241102";
footnote1 "SAS Packages Framework, version 20241129";
proc print
data = &filesWithCodes.(drop=base folderRef fileRef rc folderid _abort_ fileId additionalContent)
@@ -1696,7 +1696,7 @@ data _null_;
%end;
put +(-1) '`.;''' /
' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' /
' !! '' %put with the SAS Packages Framework version 20241102.;''' /
' !! '' %put with the SAS Packages Framework version 20241129.;''' /
' !! '' %put ****************************************************************************;''' /
' !! '' %GOTO theEndOfTheMacro;''' /
' !! '' %end;''' ;
@@ -1861,7 +1861,7 @@ data _null_;
%end;
put +(-1) '`.; '' !!' /
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !!' /
''' %put with the SAS Packages Framework version 20241102.; '' !! ' /
''' %put with the SAS Packages Framework version 20241129.; '' !! ' /
''' %put ****************************************************************************; '' !! ' /
''' %GOTO theEndOfTheMacro; '' !! ' /
''' %end; '' !! ' /
@@ -2377,20 +2377,20 @@ data _null_;
end;
/* delete data sets */
put "proc fedsql noprint;";
put "proc SQL noprint;";
EOF = 0;
do until(EOF);
set &filesWithCodes. end = EOF;
if not (upcase(type) in: ('DATA')) then continue;
put '%put NOTE- Element of type ' type 'generated from the file "' file +(-1) '" will be deleted;';
put '%put NOTE- ;';
put 'drop table ' fileshort ' FORCE;' /;
put '%sysfunc(ifc(%sysfunc(exist(' fileshort ')),drop table ' fileshort ',));' /;
end;
put "quit;" /;
/* delete PROC DS2 packages or threads */
put 'data _null_; call symputx("_DS2_2_del_",0,"L"); run;';
put "proc fedsql noprint;";
put "proc SQL noprint;";
EOF = 0;
do until(EOF);
set &filesWithCodes. end = EOF;
@@ -2399,10 +2399,10 @@ data _null_;
/ '%put NOTE- ;'
/ '%let _DS2_2_del_ = %sysfunc(open(' fileshort '));'
/ '%sysfunc(ifc(&_DS2_2_del_. AND %sysfunc(ATTRC(&_DS2_2_del_.,LABEL))='
/ '%str(' "Package: &packageName. ; Type: " type "; Name: " fileshort +(-1) '),drop table ' fileshort ' FORCE,)) ;'
/ '%str(' "Package: &packageName. ; Type: " type "; Name: " fileshort +(-1) '),drop table ' fileshort ',)) '
/ '%let _DS2_2_del_ = %sysfunc(close(&_DS2_2_del_.));'
;
put ';' /;
put ';' /; /* this is semicolon closing drop table statement */
end;
put "quit;" /;
@@ -2668,7 +2668,7 @@ data _null_;
%end;
put 'put " " / @3 "--------------------------------------------------------------------" / " ";'
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20241102`*";'
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20241129`*";'
/ 'put " " / @3 "--------------------------------------------------------------------";';
put 'run; ' /;
@@ -3197,7 +3197,7 @@ run;
%if %Qupcase(&sascfgFile.) = DEF %then /* the DEF value points to the sasv9.cfg file in the sasroot directory */
%do;
%let SASCONFIG = -config ""&SASROOT./sasv9.cfg"";
%let SASCONFIG = -config "&SASROOT./sasv9.cfg";
%put NOTE: The following SAS config file will be used:;
%put NOTE- &=SASCONFIG.;
%end;
@@ -3205,7 +3205,7 @@ run;
%do;
%if %sysfunc(fileexist(&sascfgFile.)) %then
%do;
%let SASCONFIG = -config ""&SASCFGFILE."";
%let SASCONFIG = -config "&SASCFGFILE.";
%put NOTE: The following SAS config file will be used:;
%put NOTE- &=SASCONFIG.;
%end;
@@ -3706,7 +3706,7 @@ data &filesWithCodes.markdown;
%end;
put " " / "--------------------------------------------------------------------" / " "
/ "*SAS package generated by SAS Package Framework, version `20241102`*"
/ "*SAS package generated by SAS Package Framework, version `20241129`*"
/ " " / "--------------------------------------------------------------------" / " ";
put "# The `&packageName.` package content";