mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2025-12-11 03:04:35 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b76f52b78 | ||
|
|
c40c0bd9dc | ||
|
|
ba2ca42015 | ||
|
|
55b7b507cf | ||
|
|
b47b1fb536 | ||
|
|
73f0ba2d4c | ||
|
|
c38cb1e70d | ||
|
|
0a738cc639 | ||
|
|
3cf49b5221 |
@@ -16,7 +16,7 @@ Don't forget to **STAR** (:star:) the repository! :-)
|
||||
|
||||
### Current version:
|
||||
|
||||
**The latest version** of SPF is **`20231210`**.
|
||||
**The latest version** of SPF is **`20240529`**.
|
||||
|
||||
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).
|
||||
|
||||
|
||||
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
when empty the "packages" value is used */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to list directories pointed by "packages" fileref, version 20231210. Run %extendPackagesFileref(HELP) for help info.'
|
||||
des = 'Macro to list directories pointed by "packages" fileref, version 20240529. 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 20231210
|
||||
%put ### This is short help information for the `extendPackagesFileref` macro #;
|
||||
%put #-----------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to list directories pointed by 'packages' fileref, version `20231210` #;
|
||||
%put # Macro to list directories pointed by 'packages' fileref, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
Macro to generate SAS packages.
|
||||
|
||||
Version 20231210
|
||||
Version 20240529
|
||||
|
||||
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 20231210. Run %generatePackage() for help info.'
|
||||
des = 'Macro to generate SAS packages, version 20240529. 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 20231210. Run %generatePackage()
|
||||
%put ### This is short help information for the `generatePackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to generate SAS packages, version `20231210` #;
|
||||
%put # Macro to generate SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -634,6 +634,7 @@ data &filesWithCodes.;
|
||||
put;
|
||||
_abort_ + 1;
|
||||
end;
|
||||
length fileshort $ 256;
|
||||
fileshort = substr(file, 1, length(file) - 4); /* filename.sas -> filename */
|
||||
|
||||
if strip(reverse(file)) in: ('sas.') then output; /* ignore not ".sas" files */
|
||||
@@ -854,7 +855,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 20231210";
|
||||
footnote1 "SAS Packages Framework, version 20240529";
|
||||
|
||||
proc print data = &filesWithCodes.(drop=base folderRef fileRef rc folderid _abort_ fileId additionalContent);
|
||||
run;
|
||||
@@ -1575,7 +1576,7 @@ data _null_;
|
||||
%end;
|
||||
put +(-1) '`.;''' /
|
||||
' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' /
|
||||
' !! '' %put with the SAS Packages Framework version 20231210.;''' /
|
||||
' !! '' %put with the SAS Packages Framework version 20240529.;''' /
|
||||
' !! '' %put ****************************************************************************;''' /
|
||||
' !! '' %GOTO theEndOfTheMacro;''' /
|
||||
' !! '' %end;''' ;
|
||||
@@ -1740,7 +1741,7 @@ data _null_;
|
||||
%end;
|
||||
put +(-1) '`.; '' !!' /
|
||||
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !!' /
|
||||
''' %put with the SAS Packages Framework version 20231210.; '' !! ' /
|
||||
''' %put with the SAS Packages Framework version 20240529.; '' !! ' /
|
||||
''' %put ****************************************************************************; '' !! ' /
|
||||
''' %GOTO theEndOfTheMacro; '' !! ' /
|
||||
''' %end; '' !! ' /
|
||||
@@ -1894,7 +1895,7 @@ data _null_;
|
||||
/ ' putlog / @7 "Should you have any problem with finding the file consider moving";'
|
||||
/ ' putlog @7 "it to a location of your choice with the help of the following snippet:";'
|
||||
/ ' putlog / @7 " filename KMFin " "''%sysfunc(pathname(WORK))/%lowcase(&packageName..kmf)''" " lrecl=1 recfm=n;";'
|
||||
/ ' putlog @7 " filename KMFout ""</directory/of/your/choice>/testpackageclean.kmf"" lrecl=1 recfm=n;";'
|
||||
/ ' putlog / @7 " filename KMFout " "''</directory/of/your/choice>/%lowcase(&packageName..kmf)''" " lrecl=1 recfm=n;";'
|
||||
/ ' putlog @7 '' %put *%sysfunc(fcopy(KMFin, KMFout))*(0=success)*;'';'
|
||||
/ ' putlog / "0a"x / " ";'
|
||||
|
||||
@@ -2131,7 +2132,7 @@ data _null_;
|
||||
if not (upcase(type)=:'MACRO') then continue;
|
||||
put ' %put NOTE- Element of type ' type 'generated from the file "' file +(-1) '" will be deleted;';
|
||||
put ' %put NOTE- ;';
|
||||
put ' ,"' fileshort upcase32. '"' /;
|
||||
put ' ,"' fileshort upcase64. '"' /;
|
||||
end;
|
||||
/**/
|
||||
put ' )';
|
||||
@@ -2149,7 +2150,7 @@ data _null_;
|
||||
if not (upcase(type)=:'FORMAT') then continue;
|
||||
put ' %put NOTE- Element of type ' type 'generated from the file "' file +(-1) '" will be deleted;';
|
||||
put ' %put NOTE- ;';
|
||||
put ' ,"' fileshort upcase32. '"' /;
|
||||
put ' ,"' fileshort upcase64. '"' /;
|
||||
isFormat + 1;
|
||||
end;
|
||||
put ' )';
|
||||
@@ -2389,6 +2390,7 @@ data _null_;
|
||||
set &filesWithCodes. end = EOFDS nobs = NOBS;
|
||||
if upcase(type) in: ('TEST') then continue; /* exclude tests */
|
||||
|
||||
length fileshort2 $ 256;
|
||||
select;
|
||||
when (upcase(type) in ("DATA" "LAZYDATA")) fileshort2 = cats("'", fileshort, "'" );
|
||||
when (upcase(type) =: "MACRO" ) fileshort2 = cats('''%', fileshort, "()'");
|
||||
@@ -2527,7 +2529,7 @@ data _null_;
|
||||
%end;
|
||||
|
||||
put 'put " " / @3 "--------------------------------------------------------------------" / " ";'
|
||||
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20231210`*";'
|
||||
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20240529`*";'
|
||||
/ 'put " " / @3 "--------------------------------------------------------------------";';
|
||||
|
||||
put 'run; ' /;
|
||||
@@ -2564,6 +2566,7 @@ data _null_;
|
||||
set &filesWithCodes. end = EOFDS;
|
||||
if upcase(type) in: ('TEST') then continue; /* exclude tests */
|
||||
|
||||
length fileshort2 $ 256;
|
||||
select;
|
||||
when (upcase(type) in ("DATA" "LAZYDATA")) fileshort2 = cats("'", fileshort, "'" );
|
||||
when (upcase(type) =: "MACRO" ) fileshort2 = cats('''%', fileshort, "()'");
|
||||
@@ -3504,11 +3507,11 @@ data &filesWithCodes.markdown;
|
||||
packageHashC=symget("packageHashC");
|
||||
drop package:;
|
||||
|
||||
put " " / "---" / " "
|
||||
put " " / 64*"-" / " "
|
||||
/ ' *' packageTitle +(-1)'* '
|
||||
/ " " / 64*"-" / " "
|
||||
/ "### Version information:"
|
||||
/ " "
|
||||
/ ' *' packageTitle +(-1)'* '
|
||||
/ " "
|
||||
/ "- Package: &packageName."
|
||||
/ "- Version: &packageVersion."
|
||||
/ "- Generated: " packageGenerated
|
||||
@@ -3563,7 +3566,7 @@ data &filesWithCodes.markdown;
|
||||
%end;
|
||||
|
||||
put " " / "--------------------------------------------------------------------" / " "
|
||||
/ "*SAS package generated by SAS Package Framework, version `20231210`*"
|
||||
/ "*SAS package generated by SAS Package Framework, version `20240529`*"
|
||||
/ " " / "--------------------------------------------------------------------" / " ";
|
||||
|
||||
put "# The `&packageName.` package content";
|
||||
@@ -3573,10 +3576,30 @@ data &filesWithCodes.markdown;
|
||||
/* content is created during package creation */
|
||||
set &filesWithCodes. end = EOFDS nobs = NOBS curobs = CUROBS;
|
||||
if upcase(type) in: ('TEST') then continue; /* exclude tests */
|
||||
|
||||
|
||||
/*
|
||||
To exclude file from being added to the documentation
|
||||
insert the "excluding" text(see below) as a comment
|
||||
in the FIRST line of the file.
|
||||
Do not add spaces.
|
||||
|
||||
For each file the first line is read in and checked.
|
||||
*/
|
||||
length _FILEVARPATH_ $ 4096;
|
||||
_FILEVARPATH_=catx("/",base,folder,file);
|
||||
infile _dummy_ FILEVAR=_FILEVARPATH_;
|
||||
input;
|
||||
if strip(_infile_) IN (
|
||||
'/*##DoNotUse4Documentation##*/'
|
||||
'/*##ExcludeFromDocumentation##*/'
|
||||
'/*##ExcludeFromMarkdownDoc##*/'
|
||||
)
|
||||
then continue; /* exclude file from documentation */
|
||||
|
||||
type2=type;
|
||||
length link $ 256;
|
||||
link=catx("-",compress(fileshort,,"KAD"),type,CUROBS);
|
||||
length fileshort $ 256;
|
||||
select;
|
||||
when (upcase(type) =: "MACRO" ) fileshort2 = cats('`%', fileshort, "()`");
|
||||
when (upcase(type) =: "FORMAT" ) do; fileshort2 = cats("`$", fileshort, ".`"); type2='format/informat'; end;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to get help about SAS package, version 20231210. Run %helpPackage() for help info.'
|
||||
des = 'Macro to get help about SAS package, version 20240529. Run %helpPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -43,7 +43,7 @@ des = 'Macro to get help about SAS package, version 20231210. Run %helpPackage()
|
||||
%put ### This is short help information for the `helpPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to get help about SAS packages, version `20231210` #;
|
||||
%put # Macro to get help about SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*+installPackage+*/
|
||||
/* Macros to install SAS packages, version 20231210 */
|
||||
/* Macros to install SAS packages, version 20240529 */
|
||||
/* 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
|
||||
@@ -22,7 +22,7 @@
|
||||
/secure
|
||||
minoperator
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to install SAS package, version 20231210. Run %%installPackage() for help info.'
|
||||
des = 'Macro to install SAS package, version 20240529. Run %%installPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
|
||||
%do;
|
||||
@@ -37,7 +37,7 @@ des = 'Macro to install SAS package, version 20231210. Run %%installPackage() fo
|
||||
%put ### This is short help information for the `installPackage` macro #;
|
||||
%put #--------------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to install SAS packages, version `20231210` #;
|
||||
%put # Macro to install SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
Macro to list SAS packages in packages folder.
|
||||
|
||||
Version 20231210
|
||||
Version 20240529
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
%macro listPackages()/secure PARMBUFF
|
||||
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20231210.'
|
||||
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20240529.'
|
||||
;
|
||||
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
|
||||
%do;
|
||||
@@ -37,7 +37,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 `20231210` #;
|
||||
%put # Macro to list available SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load SAS package, version 20231210. Run %loadPackage() for help info.'
|
||||
des = 'Macro to load SAS package, version 20240529. Run %loadPackage() for help info.'
|
||||
minoperator
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
@@ -50,7 +50,7 @@ minoperator
|
||||
%put ### This is short help information for the `loadPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to *load* SAS packages, version `20231210` #;
|
||||
%put # Macro to *load* SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
is provided in required version */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load additional content for a SAS package, version 20231210. Run %loadPackageAddCnt() for help info.'
|
||||
des = 'Macro to load additional content for a SAS package, version 20240529. 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 `20231210` #;
|
||||
%put # Macro to *load* additional content for a SAS package, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load multiple SAS packages at one run, version 20231210. Run %loadPackages() for help info.'
|
||||
des = 'Macro to load multiple SAS packages at one run, version 20240529. 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 `20231210` #;
|
||||
%put # Macro wrapper for the loadPackage macro, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to preview content of a SAS package, version 20231210. Run %previewPackage() for help info.'
|
||||
des = 'Macro to preview content of a SAS package, version 20240529. 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 20231210. Run %preview
|
||||
%put ### This is short help information for the `previewPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to get previwe of a SAS packages, version `20231210` #;
|
||||
%put # Macro to get preview of a SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to unload SAS package, version 20231210. Run %unloadPackage() for help info.'
|
||||
des = 'Macro to unload SAS package, version 20240529. 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 20231210. Run %unloadPackage() for h
|
||||
%put ### This is short help information for the `unloadPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to unload SAS packages, version `20231210` #;
|
||||
%put # Macro to unload SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
hashing_file() function, SAS 9.4M6 */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to verify SAS package with the hash digest, version 20231210. Run %verifyPackage() for help info.'
|
||||
des = 'Macro to verify SAS package with the hash digest, version 20240529. 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 20231210. Run %
|
||||
%put ### This is short help information for the `verifyPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to verify SAS package with it hash digest, version `20231210` #;
|
||||
%put # Macro to verify SAS package with it hash digest, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -22,7 +22,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 **`20231210`**.
|
||||
In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20240529`**.
|
||||
|
||||
**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).
|
||||
|
||||
@@ -40,7 +40,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 `20231210`
|
||||
Macro to install SAS packages, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -149,7 +149,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 `20231210`
|
||||
Macro to get help about SAS packages, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -225,7 +225,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 `20231210`
|
||||
Macro to *load* SAS packages, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -377,7 +377,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 `20231210`
|
||||
Macro wrapper for the loadPackage macro, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -426,7 +426,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 `20231210`
|
||||
Macro to unload SAS packages, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -491,7 +491,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 `20231210`
|
||||
Macro to list available SAS packages, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -532,7 +532,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 `20231210`
|
||||
Macro to verify SAS package with it hash digest, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -586,7 +586,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 `20231210`
|
||||
Macro to get preview of a SAS packages, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -653,7 +653,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 `20231210`
|
||||
Macro to generate SAS packages, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -868,7 +868,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 `20231210`
|
||||
Macro to list directories pointed by 'packages' fileref, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -908,7 +908,7 @@ filename packages ("D:/NEW_DIR" %extendPackagesFileref()); %* add new directory;
|
||||
## This is short help information for the `loadPackageAddCnt` macro <a name="loadpackageaddcnt"></a>
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Macro to load *additional content* for a SAS package, version `20231210`
|
||||
Macro to load *additional content* for a SAS package, version `20240529`
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
|
||||
101
SPF/SPFinit.sas
101
SPF/SPFinit.sas
@@ -12,7 +12,7 @@
|
||||
/* */
|
||||
/* Here is the official version: */
|
||||
/*
|
||||
Copyright (c) 2019 - 2023 Bartosz Jablonski (yabwon@gmail.com)
|
||||
Copyright (c) 2019 - 2024 Bartosz Jablonski (yabwon@gmail.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -42,7 +42,7 @@
|
||||
- to unload, or
|
||||
- to generate SAS packages.
|
||||
|
||||
Version 20231210.
|
||||
Version 20240529.
|
||||
See examples below.
|
||||
|
||||
A SAS package is a zip file containing a group of files
|
||||
@@ -89,7 +89,7 @@
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load SAS package, version 20231210. Run %loadPackage() for help info.'
|
||||
des = 'Macro to load SAS package, version 20240529. Run %loadPackage() for help info.'
|
||||
minoperator
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
@@ -105,7 +105,7 @@ minoperator
|
||||
%put ### This is short help information for the `loadPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to *load* SAS packages, version `20231210` #;
|
||||
%put # Macro to *load* SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -360,7 +360,7 @@ minoperator
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to unload SAS package, version 20231210. Run %unloadPackage() for help info.'
|
||||
des = 'Macro to unload SAS package, version 20240529. Run %unloadPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -375,7 +375,7 @@ des = 'Macro to unload SAS package, version 20231210. Run %unloadPackage() for h
|
||||
%put ### This is short help information for the `unloadPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to unload SAS packages, version `20231210` #;
|
||||
%put # Macro to unload SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -524,7 +524,7 @@ des = 'Macro to unload SAS package, version 20231210. Run %unloadPackage() for h
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to get help about SAS package, version 20231210. Run %helpPackage() for help info.'
|
||||
des = 'Macro to get help about SAS package, version 20240529. Run %helpPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -539,7 +539,7 @@ des = 'Macro to get help about SAS package, version 20231210. Run %helpPackage()
|
||||
%put ### This is short help information for the `helpPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to get help about SAS packages, version `20231210` #;
|
||||
%put # Macro to get help about SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -678,7 +678,7 @@ TODO:
|
||||
*/
|
||||
|
||||
/*+installPackage+*/
|
||||
/* Macros to install SAS packages, version 20231210 */
|
||||
/* Macros to install SAS packages, version 20240529 */
|
||||
/* 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
|
||||
@@ -701,7 +701,7 @@ TODO:
|
||||
/secure
|
||||
minoperator
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to install SAS package, version 20231210. Run %%installPackage() for help info.'
|
||||
des = 'Macro to install SAS package, version 20240529. Run %%installPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
|
||||
%do;
|
||||
@@ -716,7 +716,7 @@ des = 'Macro to install SAS package, version 20231210. Run %%installPackage() fo
|
||||
%put ### This is short help information for the `installPackage` macro #;
|
||||
%put #--------------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to install SAS packages, version `20231210` #;
|
||||
%put # Macro to install SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -1170,7 +1170,7 @@ des = 'Macro to install SAS package, version 20231210. Run %%installPackage() fo
|
||||
|
||||
Macro to list SAS packages in packages folder.
|
||||
|
||||
Version 20231210
|
||||
Version 20240529
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -1189,7 +1189,7 @@ des = 'Macro to install SAS package, version 20231210. Run %%installPackage() fo
|
||||
|
||||
|
||||
%macro listPackages()/secure PARMBUFF
|
||||
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20231210.'
|
||||
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20240529.'
|
||||
;
|
||||
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
|
||||
%do;
|
||||
@@ -1204,7 +1204,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 `20231210` #;
|
||||
%put # Macro to list available SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -1355,7 +1355,7 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
|
||||
Macro to generate SAS packages.
|
||||
|
||||
Version 20231210
|
||||
Version 20240529
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -1395,7 +1395,7 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
file name be created */
|
||||
)/ secure minoperator
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to generate SAS packages, version 20231210. Run %generatePackage() for help info.'
|
||||
des = 'Macro to generate SAS packages, version 20240529. Run %generatePackage() for help info.'
|
||||
;
|
||||
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
|
||||
%do;
|
||||
@@ -1410,7 +1410,7 @@ des = 'Macro to generate SAS packages, version 20231210. Run %generatePackage()
|
||||
%put ### This is short help information for the `generatePackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to generate SAS packages, version `20231210` #;
|
||||
%put # Macro to generate SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -1986,6 +1986,7 @@ data &filesWithCodes.;
|
||||
put;
|
||||
_abort_ + 1;
|
||||
end;
|
||||
length fileshort $ 256;
|
||||
fileshort = substr(file, 1, length(file) - 4); /* filename.sas -> filename */
|
||||
|
||||
if strip(reverse(file)) in: ('sas.') then output; /* ignore not ".sas" files */
|
||||
@@ -2206,7 +2207,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 20231210";
|
||||
footnote1 "SAS Packages Framework, version 20240529";
|
||||
|
||||
proc print data = &filesWithCodes.(drop=base folderRef fileRef rc folderid _abort_ fileId additionalContent);
|
||||
run;
|
||||
@@ -2927,7 +2928,7 @@ data _null_;
|
||||
%end;
|
||||
put +(-1) '`.;''' /
|
||||
' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' /
|
||||
' !! '' %put with the SAS Packages Framework version 20231210.;''' /
|
||||
' !! '' %put with the SAS Packages Framework version 20240529.;''' /
|
||||
' !! '' %put ****************************************************************************;''' /
|
||||
' !! '' %GOTO theEndOfTheMacro;''' /
|
||||
' !! '' %end;''' ;
|
||||
@@ -3092,7 +3093,7 @@ data _null_;
|
||||
%end;
|
||||
put +(-1) '`.; '' !!' /
|
||||
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !!' /
|
||||
''' %put with the SAS Packages Framework version 20231210.; '' !! ' /
|
||||
''' %put with the SAS Packages Framework version 20240529.; '' !! ' /
|
||||
''' %put ****************************************************************************; '' !! ' /
|
||||
''' %GOTO theEndOfTheMacro; '' !! ' /
|
||||
''' %end; '' !! ' /
|
||||
@@ -3246,7 +3247,7 @@ data _null_;
|
||||
/ ' putlog / @7 "Should you have any problem with finding the file consider moving";'
|
||||
/ ' putlog @7 "it to a location of your choice with the help of the following snippet:";'
|
||||
/ ' putlog / @7 " filename KMFin " "''%sysfunc(pathname(WORK))/%lowcase(&packageName..kmf)''" " lrecl=1 recfm=n;";'
|
||||
/ ' putlog @7 " filename KMFout ""</directory/of/your/choice>/testpackageclean.kmf"" lrecl=1 recfm=n;";'
|
||||
/ ' putlog / @7 " filename KMFout " "''</directory/of/your/choice>/%lowcase(&packageName..kmf)''" " lrecl=1 recfm=n;";'
|
||||
/ ' putlog @7 '' %put *%sysfunc(fcopy(KMFin, KMFout))*(0=success)*;'';'
|
||||
/ ' putlog / "0a"x / " ";'
|
||||
|
||||
@@ -3483,7 +3484,7 @@ data _null_;
|
||||
if not (upcase(type)=:'MACRO') then continue;
|
||||
put ' %put NOTE- Element of type ' type 'generated from the file "' file +(-1) '" will be deleted;';
|
||||
put ' %put NOTE- ;';
|
||||
put ' ,"' fileshort upcase32. '"' /;
|
||||
put ' ,"' fileshort upcase64. '"' /;
|
||||
end;
|
||||
/**/
|
||||
put ' )';
|
||||
@@ -3501,7 +3502,7 @@ data _null_;
|
||||
if not (upcase(type)=:'FORMAT') then continue;
|
||||
put ' %put NOTE- Element of type ' type 'generated from the file "' file +(-1) '" will be deleted;';
|
||||
put ' %put NOTE- ;';
|
||||
put ' ,"' fileshort upcase32. '"' /;
|
||||
put ' ,"' fileshort upcase64. '"' /;
|
||||
isFormat + 1;
|
||||
end;
|
||||
put ' )';
|
||||
@@ -3741,6 +3742,7 @@ data _null_;
|
||||
set &filesWithCodes. end = EOFDS nobs = NOBS;
|
||||
if upcase(type) in: ('TEST') then continue; /* exclude tests */
|
||||
|
||||
length fileshort2 $ 256;
|
||||
select;
|
||||
when (upcase(type) in ("DATA" "LAZYDATA")) fileshort2 = cats("'", fileshort, "'" );
|
||||
when (upcase(type) =: "MACRO" ) fileshort2 = cats('''%', fileshort, "()'");
|
||||
@@ -3879,7 +3881,7 @@ data _null_;
|
||||
%end;
|
||||
|
||||
put 'put " " / @3 "--------------------------------------------------------------------" / " ";'
|
||||
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20231210`*";'
|
||||
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20240529`*";'
|
||||
/ 'put " " / @3 "--------------------------------------------------------------------";';
|
||||
|
||||
put 'run; ' /;
|
||||
@@ -3916,6 +3918,7 @@ data _null_;
|
||||
set &filesWithCodes. end = EOFDS;
|
||||
if upcase(type) in: ('TEST') then continue; /* exclude tests */
|
||||
|
||||
length fileshort2 $ 256;
|
||||
select;
|
||||
when (upcase(type) in ("DATA" "LAZYDATA")) fileshort2 = cats("'", fileshort, "'" );
|
||||
when (upcase(type) =: "MACRO" ) fileshort2 = cats('''%', fileshort, "()'");
|
||||
@@ -4856,11 +4859,11 @@ data &filesWithCodes.markdown;
|
||||
packageHashC=symget("packageHashC");
|
||||
drop package:;
|
||||
|
||||
put " " / "---" / " "
|
||||
put " " / 64*"-" / " "
|
||||
/ ' *' packageTitle +(-1)'* '
|
||||
/ " " / 64*"-" / " "
|
||||
/ "### Version information:"
|
||||
/ " "
|
||||
/ ' *' packageTitle +(-1)'* '
|
||||
/ " "
|
||||
/ "- Package: &packageName."
|
||||
/ "- Version: &packageVersion."
|
||||
/ "- Generated: " packageGenerated
|
||||
@@ -4915,7 +4918,7 @@ data &filesWithCodes.markdown;
|
||||
%end;
|
||||
|
||||
put " " / "--------------------------------------------------------------------" / " "
|
||||
/ "*SAS package generated by SAS Package Framework, version `20231210`*"
|
||||
/ "*SAS package generated by SAS Package Framework, version `20240529`*"
|
||||
/ " " / "--------------------------------------------------------------------" / " ";
|
||||
|
||||
put "# The `&packageName.` package content";
|
||||
@@ -4925,10 +4928,30 @@ data &filesWithCodes.markdown;
|
||||
/* content is created during package creation */
|
||||
set &filesWithCodes. end = EOFDS nobs = NOBS curobs = CUROBS;
|
||||
if upcase(type) in: ('TEST') then continue; /* exclude tests */
|
||||
|
||||
|
||||
/*
|
||||
To exclude file from being added to the documentation
|
||||
insert the "excluding" text(see below) as a comment
|
||||
in the FIRST line of the file.
|
||||
Do not add spaces.
|
||||
|
||||
For each file the first line is read in and checked.
|
||||
*/
|
||||
length _FILEVARPATH_ $ 4096;
|
||||
_FILEVARPATH_=catx("/",base,folder,file);
|
||||
infile _dummy_ FILEVAR=_FILEVARPATH_;
|
||||
input;
|
||||
if strip(_infile_) IN (
|
||||
'/*##DoNotUse4Documentation##*/'
|
||||
'/*##ExcludeFromDocumentation##*/'
|
||||
'/*##ExcludeFromMarkdownDoc##*/'
|
||||
)
|
||||
then continue; /* exclude file from documentation */
|
||||
|
||||
type2=type;
|
||||
length link $ 256;
|
||||
link=catx("-",compress(fileshort,,"KAD"),type,CUROBS);
|
||||
length fileshort $ 256;
|
||||
select;
|
||||
when (upcase(type) =: "MACRO" ) fileshort2 = cats('`%', fileshort, "()`");
|
||||
when (upcase(type) =: "FORMAT" ) do; fileshort2 = cats("`$", fileshort, ".`"); type2='format/informat'; end;
|
||||
@@ -5172,7 +5195,7 @@ TODO: (in Polish)
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load multiple SAS packages at one run, version 20231210. Run %loadPackages() for help info.'
|
||||
des = 'Macro to load multiple SAS packages at one run, version 20240529. Run %loadPackages() for help info.'
|
||||
parmbuff
|
||||
;
|
||||
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
|
||||
@@ -5188,7 +5211,7 @@ parmbuff
|
||||
%put ### This is short help information for the `loadPackageS` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro wrapper for the loadPackage macro, version `20231210` #;
|
||||
%put # Macro wrapper for the loadPackage macro, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -5285,7 +5308,7 @@ parmbuff
|
||||
hashing_file() function, SAS 9.4M6 */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to verify SAS package with the hash digest, version 20231210. Run %verifyPackage() for help info.'
|
||||
des = 'Macro to verify SAS package with the hash digest, version 20240529. Run %verifyPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -5300,7 +5323,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20231210. Run %
|
||||
%put ### This is short help information for the `verifyPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to verify SAS package with it hash digest, version `20231210` #;
|
||||
%put # Macro to verify SAS package with it hash digest, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -5479,7 +5502,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20231210. Run %
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to preview content of a SAS package, version 20231210. Run %previewPackage() for help info.'
|
||||
des = 'Macro to preview content of a SAS package, version 20240529. Run %previewPackage() for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -5494,7 +5517,7 @@ des = 'Macro to preview content of a SAS package, version 20231210. Run %preview
|
||||
%put ### This is short help information for the `previewPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to get previwe of a SAS packages, version `20231210` #;
|
||||
%put # Macro to get preview of a SAS packages, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -5621,7 +5644,7 @@ des = 'Macro to preview content of a SAS package, version 20231210. Run %preview
|
||||
when empty the "packages" value is used */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to list directories pointed by "packages" fileref, version 20231210. Run %extendPackagesFileref(HELP) for help info.'
|
||||
des = 'Macro to list directories pointed by "packages" fileref, version 20240529. Run %extendPackagesFileref(HELP) for help info.'
|
||||
;
|
||||
|
||||
%if %QUPCASE(&packages.) = HELP %then
|
||||
@@ -5637,7 +5660,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20231210
|
||||
%put ### This is short help information for the `extendPackagesFileref` macro #;
|
||||
%put #-----------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to list directories pointed by 'packages' fileref, version `20231210` #;
|
||||
%put # Macro to list directories pointed by 'packages' fileref, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -5738,7 +5761,7 @@ filename packages list;
|
||||
is provided in required version */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load additional content for a SAS package, version 20231210. Run %loadPackageAddCnt() for help info.'
|
||||
des = 'Macro to load additional content for a SAS package, version 20240529. Run %loadPackageAddCnt() for help info.'
|
||||
minoperator
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
@@ -5754,7 +5777,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 `20231210` #;
|
||||
%put # Macro to *load* additional content for a SAS package, version `20240529` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
|
||||
@@ -86,7 +86,7 @@ SHA256 digest for macroArray: F*3F3893F1FCD78719543703E4353F4CC19811D247C016F220
|
||||
|
||||
---
|
||||
|
||||
- **BasePlus**\[1.37.0\] adds a bunch of functionalities I am missing in BASE SAS, such as:
|
||||
- **BasePlus**\[1.42.0\] adds a bunch of functionalities I am missing in BASE SAS, such as:
|
||||
```sas
|
||||
call arrMissToRight(myArray);
|
||||
call arrFillMiss(17, myArray);
|
||||
@@ -116,7 +116,7 @@ format x bool.;
|
||||
|
||||
%put %monthShift(2023,1,-5);
|
||||
```
|
||||
SHA256 digest for BasePlus: F*8155BFE82F7833E4B0DA24D81DBDFC58463906D6032B1F0161772DADE84BE790
|
||||
SHA256 digest for BasePlus: F*6012D1475AE22A4445C032D8EAE092BE515D8CD2AE390CC087F5987ACB8BCB13
|
||||
|
||||
[Documentation for BasePlus](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md "Documentation for BasePlus")
|
||||
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/* 202406710 */
|
||||
BasePlus: F*6012D1475AE22A4445C032D8EAE092BE515D8CD2AE390CC087F5987ACB8BCB13
|
||||
|
||||
/* 20240609 */
|
||||
BasePlus: F*6760DDF382E7CA9A1291F028FA7F2BACB68A3D31CEA3A85104E13EA08645AEF1
|
||||
|
||||
/* 20240606 */
|
||||
BasePlus: F*BD0333B92D7CB639A136CD4994DE0C63F8396E449E45BC714D71D2E15318F42D
|
||||
|
||||
/* 20240529 */
|
||||
BasePlus: F*3C3A2050E3FF46E1FC0F936634A66FC3F294A3531EFE0A7DC9CE74F2EF17C687
|
||||
|
||||
/* 20240312 */
|
||||
BasePlus: F*209FB8198270DEAB6151CE31391A352A065B4EE2689F40433FA9550A7F4AAC18
|
||||
|
||||
/* 20240309 */
|
||||
BasePlus: F*8155BFE82F7833E4B0DA24D81DBDFC58463906D6032B1F0161772DADE84BE790
|
||||
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
# Documentation for the `BasePlus` package.
|
||||
|
||||
---
|
||||
----------------------------------------------------------------
|
||||
|
||||
*The BASE SAS plus a bunch of functionalities I am missing in BASE SAS*
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
### Version information:
|
||||
|
||||
*The BASE SAS plus a bunch of functionalities I am missing in BASE SAS*
|
||||
|
||||
- Package: BasePlus
|
||||
- Version: 1.37.0
|
||||
- Generated: 2024-03-09T13:28:58
|
||||
- Version: 1.42.0
|
||||
- Generated: 2024-07-10T22:42:55
|
||||
- Author(s): Bartosz Jablonski (yabwon@gmail.com), Quentin McMullen (qmcmullen@gmail.com)
|
||||
- Maintainer(s): Bartosz Jablonski (yabwon@gmail.com)
|
||||
- License: MIT
|
||||
- File SHA256: `F*8155BFE82F7833E4B0DA24D81DBDFC58463906D6032B1F0161772DADE84BE790` for this version
|
||||
- Content SHA256: `C*7A4A85EB6C2C23E6A171DDCD8F61D7ED40E9A6751F9579DF893E148A95FFE188` for this version
|
||||
- File SHA256: `F*6012D1475AE22A4445C032D8EAE092BE515D8CD2AE390CC087F5987ACB8BCB13` for this version
|
||||
- Content SHA256: `C*3A52B9CB12C454868DAF29AE1E73F8E296E730EA6BF1B9CD22C1A990985EE191` for this version
|
||||
|
||||
---
|
||||
|
||||
# The `BasePlus` package, version: `1.37.0`;
|
||||
# The `BasePlus` package, version: `1.42.0`;
|
||||
|
||||
---
|
||||
|
||||
|
||||
# The BasePlus package [ver. 1.37.0] <a name="baseplus-package"></a> ###############################################
|
||||
# The BasePlus package [ver. 1.42.0] <a name="baseplus-package"></a> ###############################################
|
||||
|
||||
The **BasePlus** package implements useful
|
||||
functions and functionalities I miss in the BASE SAS.
|
||||
@@ -349,7 +351,7 @@ run;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**EXAMPLE 26** Downloading data from the internet to a local dirrectory:
|
||||
**EXAMPLE 26** Downloading data from the internet to a local directory:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%downloadFilesTo(~/directoryA)
|
||||
datalines4;
|
||||
@@ -362,7 +364,7 @@ run;
|
||||
**EXAMPLE 27** Conditional value assignment:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%let x = A B C;
|
||||
%let y = %iffunc((%scan(&x.,1)=A),Stats with "A"., Does not start with "A".);
|
||||
%let y = %iffunc((%scan(&x.,1)=A),Starts with "A"., Does not start with "A".);
|
||||
%put &=y.;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -382,7 +384,7 @@ localization (only if additional content was deployed during the installation pr
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
*SAS package generated by SAS Package Framework, version `20231210`*
|
||||
*SAS package generated by SAS Package Framework, version `20240529`*
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
@@ -451,22 +453,23 @@ The `BasePlus` package consists of the following content:
|
||||
61. [`%filepath()` macro ](#filepath-macro-61 )
|
||||
62. [`%finddswithvarval()` macro ](#finddswithvarval-macro-62 )
|
||||
63. [`%fmt()` macro ](#fmt-macro-63 )
|
||||
64. [`%gettitle()` macro ](#gettitle-macro-64 )
|
||||
65. [`%iffunc()` macro ](#iffunc-macro-65 )
|
||||
66. [`%infmt()` macro ](#infmt-macro-66 )
|
||||
67. [`%letters()` macro ](#letters-macro-67 )
|
||||
68. [`%libpath()` macro ](#libpath-macro-68 )
|
||||
69. [`%minclude()` macro ](#minclude-macro-69 )
|
||||
70. [`%monthshift()` macro ](#monthshift-macro-70 )
|
||||
71. [`%replist()` macro ](#replist-macro-71 )
|
||||
72. [`%time()` macro ](#time-macro-72 )
|
||||
73. [`%today()` macro ](#today-macro-73 )
|
||||
74. [`%translate()` macro ](#translate-macro-74 )
|
||||
75. [`%tranwrd()` macro ](#tranwrd-macro-75 )
|
||||
76. [`%workpath()` macro ](#workpath-macro-76 )
|
||||
64. [`%generateoneliners()` macro ](#generateoneliners-macro-64 )
|
||||
65. [`%gettitle()` macro ](#gettitle-macro-65 )
|
||||
66. [`%iffunc()` macro ](#iffunc-macro-66 )
|
||||
67. [`%infmt()` macro ](#infmt-macro-67 )
|
||||
68. [`%letters()` macro ](#letters-macro-68 )
|
||||
69. [`%libpath()` macro ](#libpath-macro-69 )
|
||||
70. [`%minclude()` macro ](#minclude-macro-70 )
|
||||
71. [`%monthshift()` macro ](#monthshift-macro-71 )
|
||||
72. [`%replist()` macro ](#replist-macro-72 )
|
||||
73. [`%time()` macro ](#time-macro-73 )
|
||||
74. [`%today()` macro ](#today-macro-74 )
|
||||
75. [`%translate()` macro ](#translate-macro-75 )
|
||||
76. [`%tranwrd()` macro ](#tranwrd-macro-76 )
|
||||
77. [`%workpath()` macro ](#workpath-macro-77 )
|
||||
|
||||
|
||||
95. [License note](#license)
|
||||
99. [License note](#license)
|
||||
|
||||
---
|
||||
|
||||
@@ -516,8 +519,8 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
## >>> `%dedupListC()` macro: <<< <a name="deduplistc-macro"></a> #######################
|
||||
|
||||
The `%dedupListC()` macro deletes duplicated values from
|
||||
a *COMMA separated* list of values. List, including separators,
|
||||
can be no longer than a value carried by a single macrovariable.
|
||||
a *COMMA-separated* list of values. List, including separators,
|
||||
can be no longer than a value carried by a single macro variable.
|
||||
|
||||
Returned value is *unquoted*. Leading and trailing spaces are ignored.
|
||||
|
||||
@@ -534,7 +537,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
**Arguments description**:
|
||||
|
||||
1. `list` - A list of *comma separated* values.
|
||||
1. `list` - A list of *comma-separated* values.
|
||||
|
||||
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
@@ -577,8 +580,8 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
## >>> `%dedupListP()` macro: <<< <a name="deduplistp-macro"></a> #######################
|
||||
|
||||
The `%dedupListP()` macro deletes duplicated values from
|
||||
a *PIPE(`|`) separated* list of values. List, including separators,
|
||||
can be no longer than a value carried by a single macrovariable.
|
||||
a *PIPE(`|`)-separated* list of values. List, including separators,
|
||||
can be no longer than a value carried by a single macro variable.
|
||||
|
||||
Returned value is *unquoted*. Leading and trailing spaces are ignored.
|
||||
|
||||
@@ -595,7 +598,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
**Arguments description**:
|
||||
|
||||
1. `list` - A list of *pipe separated* values.
|
||||
1. `list` - A list of *pipe-separated* values.
|
||||
|
||||
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
@@ -638,8 +641,8 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
## >>> `%dedupListS()` macro: <<< <a name="deduplists-macro"></a> #######################
|
||||
|
||||
The `%dedupListS()` macro deletes duplicated values from
|
||||
a *SPACE separated* list of values. List, including separators,
|
||||
can be no longer than a value carried by a single macrovariable.
|
||||
a *SPACE-separated* list of values. List, including separators,
|
||||
can be no longer than a value carried by a single macro variable.
|
||||
|
||||
Returned value is *unquoted*.
|
||||
|
||||
@@ -650,13 +653,13 @@ The `%dedupListS()` macro executes like a pure macro code.
|
||||
The basic syntax is the following, the `<...>` means optional parameters:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%dedupListS(
|
||||
list of space separated values
|
||||
list of space-separated values
|
||||
)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**Arguments description**:
|
||||
|
||||
1. `list` - A list of *space separated* values.
|
||||
1. `list` - A list of *space-separated* values.
|
||||
|
||||
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
@@ -692,9 +695,9 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
## >>> `%dedupListX()` macro: <<< <a name="deduplistx-macro"></a> #######################
|
||||
|
||||
The `%dedupListX()` macro deletes duplicated values from
|
||||
a *X separated* list of values, where the `X` represents
|
||||
a *X-separated* list of values, where the `X` represents
|
||||
a *single character* separator. List, including separators,
|
||||
can be no longer than a value carried by a single macrovariable.
|
||||
can be no longer than a value carried by a single macro variable.
|
||||
|
||||
**Caution.** The value of `X` *has to be* in **the first** byte of the list,
|
||||
just after the opening bracket, i.e. `(X...)`.
|
||||
@@ -714,7 +717,7 @@ XlistXofXxXseparatedXvalues
|
||||
|
||||
**Arguments description**:
|
||||
|
||||
1. `list` - A list of *X separated* values.
|
||||
1. `list` - A list of *X-separated* values.
|
||||
|
||||
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
@@ -773,7 +776,7 @@ and subdirectories of a given `root` directory.
|
||||
|
||||
The extracted info may be just a list of files and subdirectories or, if
|
||||
the `details=` parameter is set to 1, additional operating system information
|
||||
is extracted (information is OSS dependent and gives different results for Linux
|
||||
is extracted (information is OS-dependent and gives different results for Linux
|
||||
and for Windows)
|
||||
|
||||
The extracted info can be narrowed down to files (`keepFiles=1`) or to
|
||||
@@ -835,7 +838,8 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
in long format, `1` = yes, `0` = no.
|
||||
|
||||
* `fileExt=` - *Optional*, if not missing then indicates
|
||||
file extension to filter out results.
|
||||
a list of space-separated file extensions
|
||||
to filter out results.
|
||||
|
||||
* `maxDepth=0` - *Optional*, if not zero then indicates
|
||||
maximum depth of search in the root path.
|
||||
@@ -1093,12 +1097,12 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
%put *%str(%')%bquote(%getVars(sashelp.class,sep=''))%str(%')*;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
c) coma separated double quote list:
|
||||
c) comma-separated double quote list:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%put *"%getVars(sashelp.class,sep=%str(", "))"*;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
d) coma separated single quote list:
|
||||
d) comma-separated single quote list:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%put *%str(%')%getVars(sashelp.class,sep=', ')%str(%')*;
|
||||
%let x = %str(%')%getVars(sashelp.class,sep=', ')%str(%');
|
||||
@@ -1163,12 +1167,12 @@ a) one single or double qiote:
|
||||
%put *%QgetVars(sashelp.class,quote='')*;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
c) coma separated double quote list:
|
||||
c) comma-separated double quote list:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%put *%getVars(sashelp.class,sep=%str(,),quote=%str(%"))*;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
d) coma separated single quote list:
|
||||
d) comma-separated single quote list:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%let x = %getVars(sashelp.class,sep=%str(,),quote=%str(%'));
|
||||
%put &=x.;
|
||||
@@ -1484,8 +1488,8 @@ run;
|
||||
This approach reduces some limitations the LDSN has.
|
||||
|
||||
The **additional** feature of the `%LDSNM()` is that when the macro is called
|
||||
a global macrovariable, which name is the same as hashed dataset name, is created.
|
||||
The macrovariable value is the text of the argument of the macro. For example
|
||||
a global macro variable, which name is the same as hashed dataset name, is created.
|
||||
The macro variable value is the text of the argument of the macro. For example
|
||||
the following macro call:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
@@ -1495,9 +1499,9 @@ data %LDSNM(John "x" 'y' dog);
|
||||
run;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
creates `DSN_BF1F8C4D6495B34A_` macrovariable with value: `JOHN "X" 'Y' DOG`.
|
||||
creates `DSN_BF1F8C4D6495B34A_` macro variable with value: `JOHN "X" 'Y' DOG`.
|
||||
|
||||
The macrovariable is useful when combined with `symget()` function and
|
||||
The macro variable is useful when combined with `symget()` function and
|
||||
the `indsname=` option to get the original text string value back,
|
||||
like in this example:
|
||||
|
||||
@@ -1535,7 +1539,7 @@ The `%LDSN()` macro executes like a pure macro code.
|
||||
`data %LDSN(); run;` or `data %LDSN( ); run;` are resolved
|
||||
to empty string, so the result is equivalent to `data; run;`
|
||||
|
||||
- created macrovariable is _global_ in scope.
|
||||
- created macro variable is _global_ in scope.
|
||||
|
||||
### SYNTAX: ###################################################################
|
||||
|
||||
@@ -1546,8 +1550,8 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The text string is concider as *"only dataset name"*, i.e. macro does not
|
||||
assume it contain library as prefix or data set options as sufix.
|
||||
The text string is consider as *"only dataset name"*, i.e. macro does not
|
||||
assume it contain library as prefix or data set options as suffix.
|
||||
See the `%LDSN()` macro for comparison.
|
||||
|
||||
---
|
||||
@@ -1778,9 +1782,9 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
## >>> `%QdedupListX()` macro: <<< <a name="qdeduplistx-macro"></a> #######################
|
||||
|
||||
The `%QdedupListX()` macro deletes duplicated values from
|
||||
a *X separated* list of values, where the `X` represents
|
||||
a *X-separated* list of values, where the `X` represents
|
||||
a *single character* separator. List, including separators,
|
||||
can be no longer than a value carried by a single macrovariable.
|
||||
can be no longer than a value carried by a single macro variable.
|
||||
|
||||
**Caution.** The value of `X` *has to be* in **the first** byte of the list,
|
||||
just after the opening bracket, i.e. `(X...)`.
|
||||
@@ -1800,7 +1804,7 @@ XlistXofXxXseparatedXvalues
|
||||
|
||||
**Arguments description**:
|
||||
|
||||
1. `list` - A list of *X separated* values.
|
||||
1. `list` - A list of *X-separated* values.
|
||||
|
||||
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
@@ -1910,9 +1914,9 @@ See examples in `%getVars()` help for the details.
|
||||
|
||||
The zipEvalf() and QzipEvalf() macro functions
|
||||
allow to use a function on elements of pair of
|
||||
space separated lists.
|
||||
space-separated lists.
|
||||
|
||||
For two space separated lists of text strings the corresponding
|
||||
For two space-separated lists of text strings the corresponding
|
||||
elements are taken and the macro applies a function, provided by user,
|
||||
to calculate result of the function on taken elements.
|
||||
|
||||
@@ -1944,9 +1948,9 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
**Arguments description**:
|
||||
|
||||
1. `first` - *Required*, a space separated list of texts.
|
||||
1. `first` - *Required*, a space-separated list of texts.
|
||||
|
||||
2. `second` - *Required*, a space separated list of texts.
|
||||
2. `second` - *Required*, a space-separated list of texts.
|
||||
|
||||
* `function = cat` - *Optional*, default value is `cat`,
|
||||
a function which will be applied
|
||||
@@ -1963,18 +1967,18 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
* `argBf =` - *Optional*, default value is empty,
|
||||
arguments of the function inserted
|
||||
*before* elements the first list.
|
||||
If multiple should be comma separated.
|
||||
If multiple should be comma-separated.
|
||||
|
||||
* `argMd =` - *Optional*, default value is empty,
|
||||
arguments of the function inserted
|
||||
*between* elements the first list and
|
||||
the second list.
|
||||
If multiple should be comma separated.
|
||||
If multiple should be comma-separated.
|
||||
|
||||
* `argAf =` - *Optional*, default value is empty,
|
||||
arguments of the function inserted
|
||||
*after* elements the second list.
|
||||
If multiple should be comma separated.
|
||||
If multiple should be comma-separated.
|
||||
|
||||
* `format=` - *Optional*, default value is empty,
|
||||
indicates a format which should be used
|
||||
@@ -1995,8 +1999,8 @@ See examples in `%zipEvalf()` help for the details.
|
||||
|
||||
## >>> `%RainCloudPlot()` macro: <<< <a name="raincloudplot-macro"></a> #######################
|
||||
|
||||
The RainCloudPlot() macro allow to plot Rain Cloud plots, i.e. pots of
|
||||
kernel density estimates, jitter data values, and box-and-whiskers plot.
|
||||
The RainCloudPlot() macro allow to plot Rain Cloud plots, i.e.
|
||||
plots of kernel density estimates, jitter data values, and box-and-whiskers plot.
|
||||
|
||||
See examples below for the details.
|
||||
|
||||
@@ -2015,6 +2019,11 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
<,roundFactor=>
|
||||
<,rainDropSize=>
|
||||
<,boxPlotSymbolSize=>
|
||||
<,boxPlotLineSize=>
|
||||
<,boxPlotFill=>
|
||||
<,meanShiftLine=>
|
||||
<,meanShiftStep=>
|
||||
<,meanShiftColors=>
|
||||
<,colorsList=>
|
||||
<,monochrome=>
|
||||
<,antialiasMax=>
|
||||
@@ -2022,6 +2031,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
<,footnote=>
|
||||
<,catLabels=>
|
||||
<,xLabels=>
|
||||
<,xBothAxis=>
|
||||
<,catLabelPos=>
|
||||
<,xLabelPos=>
|
||||
<,catLabelAttrs=>
|
||||
@@ -2035,17 +2045,26 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
<,catAxisValueAttrs=>
|
||||
<,xaxisValueAttrs=>
|
||||
<,xaxisTickstyle=>
|
||||
<,xaxisValues=>
|
||||
<,xaxisValuesDisplay=>
|
||||
<,xaxisValuesFormat=>
|
||||
<,xaxisValuesRotate=>
|
||||
<,xaxisOther=>
|
||||
<,sganno=>
|
||||
<,odsGraphicsOptions=>
|
||||
<,sgPlotOptions=>
|
||||
<,vertical=>
|
||||
|
||||
<,VSCALE=>
|
||||
<,KERNEL_K=>
|
||||
<,KERNEL_C=>
|
||||
<,VSCALEmax=>
|
||||
<,minRange=>
|
||||
<,maxRange=>
|
||||
|
||||
<,cleanTempData=>
|
||||
<,codePreview=>
|
||||
<,reuseN=>
|
||||
)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -2086,6 +2105,28 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
* `boxPlotSymbolSize` - *Optional*, default value `8px`.
|
||||
Size of symbols on the box plot.
|
||||
If two values are provided, e.g., `16px 8px`,
|
||||
the first is used for diamond size (the mean),
|
||||
the second for "min/max" bars.
|
||||
|
||||
* `boxPlotLineSize` - *Optional*, default value `1px`.
|
||||
Thickness of lines of the box plot.
|
||||
|
||||
* `boxPlotFill` - *Optional*, default value `1`.
|
||||
Transparency of the box plot.
|
||||
Ranges from 0.0 (opaque) to 1.0 (full translucent).
|
||||
|
||||
* `meanShiftLine` - *Optional*, default value `0`.
|
||||
Indicates if a line connecting mean symbol
|
||||
on the Box Plot should be added.
|
||||
|
||||
* `meanShiftStep` - *Optional*, default value `0.1`.
|
||||
Sets how smooth gradient should be
|
||||
on the "mean-shift" line.
|
||||
|
||||
* `meanShiftColors` - *Optional*, default value is empty.
|
||||
List of colours for plotting the "mean-shift" line.
|
||||
Empty indicates that the `colorsList` value will be used.
|
||||
|
||||
* `colorsList` - *Optional*, default value is empty.
|
||||
List of colours for plotting.
|
||||
@@ -2116,6 +2157,10 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
When empty a data variable name is used.
|
||||
For details see notes below.
|
||||
|
||||
* `xBothAxis` - *Optional*, default value is `1`.
|
||||
Indicates if both (top and bottom) axis (horizontal) should be printed.
|
||||
If not `1` then only bottom axis is displayed.
|
||||
|
||||
* `catLabelPos` - *Optional*, default value `DATACENTER`.
|
||||
Indicates position of the label on group axis (vertical).
|
||||
Allowed values are `BOTTOM`, `CENTER`, `DATACENTER`, and `TOP`.
|
||||
@@ -2139,7 +2184,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
Indicates if the right vertical axis should be displayed.
|
||||
|
||||
* `y2axisLevels` - *Optional*, default value `4`.
|
||||
Indicates if the number of expected levels of values printed
|
||||
Sets the number of expected levels of values printed
|
||||
on the right vertical axis.
|
||||
|
||||
* `y2axisValueAttrs` - *Optional*, default value `Color=Grey`.
|
||||
@@ -2162,11 +2207,34 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
Allowed values are `OUTSIDE`, `INSIDE`, `ACROSS`, and `INBETWEEN`.
|
||||
*For SAS previous to* **9.4M5** *set to missing!*
|
||||
|
||||
* `xaxisValues` - *Optional*, default value is empty.
|
||||
It is a wrapper to provide value for
|
||||
the `XAXIS` statement, for `Values` option.
|
||||
|
||||
* `xaxisValuesDisplay` - *Optional*, default value is empty.
|
||||
It is a wrapper to provide value for
|
||||
the `XAXIS` statement, for `ValuesDisplay` option.
|
||||
|
||||
* `xaxisValuesFormat` - *Optional*, default value is empty.
|
||||
It is a wrapper to provide value for
|
||||
the `XAXIS` statement, for `ValuesFormat` option.
|
||||
Instead using `w.d` format, use its alias `Fw.d`.
|
||||
|
||||
* `xaxisValuesRotate` - *Optional*, default value is empty.
|
||||
It is a wrapper to provide value for
|
||||
the `XAXIS` statement, for `ValuesRotate` option.
|
||||
|
||||
* `xaxisOther` - *Optional*, default value is empty.
|
||||
It is a wrapper to provide value for
|
||||
the `XAXIS` statement options not mentioned above.
|
||||
You can use it to provide, e.g., `GRID`, 'MINOR',
|
||||
`MINORGRID`, `GRIDATTRS=`, or `MINORGRIDATTRS=`.
|
||||
|
||||
* `sganno` - *Optional*, default value is empty.
|
||||
keeps name of a data set for the `sganno=` option
|
||||
of the SGPLOT procedure.
|
||||
|
||||
* `sgPlotOptions` - *Optional*, default value is `noautolegend noborder`.
|
||||
* `sgPlotOptions` - *Optional*, default value is `noautolegend noborder subpixel`.
|
||||
List of additional options values for SGPLOT procedure.
|
||||
|
||||
* `odsGraphicsOptions` - *Optional*, default value is empty.
|
||||
@@ -2174,6 +2242,12 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
By default only the: `width=`, `height=`, and `antialiasmax=`
|
||||
are modified.
|
||||
|
||||
* `vertical` - *Optional*, default value is `0`.
|
||||
Set value to `1` to plot "clouds & boxes" vertically.
|
||||
**NOTE:** *Before setting the parameter to `1`, first
|
||||
prepare the plot in the "horizontal" version since all
|
||||
other parameters assume that orientation(!) and then are
|
||||
converted accordingly.*
|
||||
|
||||
***Stat related options***:
|
||||
|
||||
@@ -2200,6 +2274,14 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
for `VSCALE=PROPORTION` between 0 and 1, and
|
||||
for `VSCALE=COUNT` between 0 and N (sample size).
|
||||
|
||||
* `minRange` - *Optional*, default value is `.` (numerical missing).
|
||||
Indicates minimum value for x-axis on the plot, by default calculated form data.
|
||||
Is a global parameter used for all plots.
|
||||
|
||||
* `maxRange` - *Optional*, default value is `.` (numerical missing).
|
||||
Indicates maximum value for x-axis on the plot, by default calculated form data.
|
||||
Is a global parameter used for all plots.
|
||||
|
||||
***Other options***:
|
||||
|
||||
* `cleanTempData` - *Optional*, default value `1`.
|
||||
@@ -2208,6 +2290,11 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
* `codePreview` - *Optional*, default value `0`.
|
||||
Indicates if source code should be MPRINTed to log.
|
||||
|
||||
* `reuseN` - *Optional*, default value `6`.
|
||||
Indicates how many times colours list should be repeated
|
||||
so that colours could be reused in case the number of groups
|
||||
is greater than the colours list length.
|
||||
|
||||
---
|
||||
|
||||
### NOTES: ###################################################################
|
||||
@@ -2222,10 +2309,10 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
Use the `%str()` or `%nrstr()` macro-function to handle special characters.
|
||||
The `%unquote()` is used when resolving the parameter.
|
||||
|
||||
* The `catLabels` and `xLabels` should be quoted comma separated lists enclosed with brackets,
|
||||
* The `catLabels` and `xLabels` should be quoted comma-separated lists enclosed with brackets,
|
||||
e.g. `catLabels=("Continent of Origin", "Car Type")`, see Example below.
|
||||
|
||||
* The `catLabelAttrs` and `xLabelAttrs` should be space separated lists of `key=value` pairs,
|
||||
* The `catLabelAttrs` and `xLabelAttrs` should be space-separated lists of `key=value` pairs,
|
||||
e.g. `xLabelAttrs=size=12 color=Pink weight=bold`, see Example below.
|
||||
|
||||
* Kernel density estimates and basic statistics are calculated with `PROC UNIVARIATE`.
|
||||
@@ -2236,6 +2323,10 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
* SAS notes (`NOTE:`) are disabled for the execution time.
|
||||
|
||||
* Before setting the `vertical=` parameter to `1`, first prepare the plot
|
||||
in the "horizontal" version since all other parameters assume that orientation(!)
|
||||
and then are converted accordingly.
|
||||
|
||||
* List of predefined colours is:
|
||||
`BlueViolet`, `RoyalBlue`, `OliveDrab`, `Gold`, `HotPink`, `Crimson`,
|
||||
`MediumPurple`, `CornflowerBlue`, `YellowGreen`, `Goldenrod`, `Orchid`, `IndianRed`.
|
||||
@@ -2389,6 +2480,35 @@ The output can be seen in the `md` file.
|
||||
The output can be seen in the `md` file.
|
||||

|
||||
|
||||
|
||||
**EXAMPLE 4.** Rain Cloud plot for `sashelp.cars` dataset
|
||||
with groups by Drive Train for Weight (LBS)
|
||||
variable ploted "vertically":
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
|
||||
%RainCloudPlot(
|
||||
sashelp.cars
|
||||
, DriveTrain
|
||||
, Weight
|
||||
, HeightPX=400
|
||||
, colorslist=Red Green Blue
|
||||
, y2axisLevels=5
|
||||
, catLabels=("DriveTrain")
|
||||
, xLabels="Weight (LBS)"
|
||||
, xLabelAttrs=size=12 color=Black weight=bold
|
||||
, y2axisLines=1
|
||||
, vscale=percent
|
||||
, vscalemax=50
|
||||
, vertical = 1
|
||||
, title = %nrstr(title1 J=C HEIGHT=3 "The VERTICAL plotting is cool, ...";)
|
||||
, footnote = %nrstr(footnote1 J=L HEIGHT=2 "... isn't it?";)
|
||||
)
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The output can be seen in the `md` file.
|
||||

|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2646,12 +2766,12 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
## >>> `%symdelGlobal()` macro: <<< <a name="symdelglobal-macro"></a> #######################
|
||||
|
||||
The `%symdelGlobal()` macro deletes all global macrovariables
|
||||
The `%symdelGlobal()` macro deletes all global macro variables
|
||||
created by the user. The only exceptions are read only variables
|
||||
and variables the one which starts with SYS, AF, or FSP.
|
||||
In that case a warning is printed in the log.
|
||||
|
||||
One temporary global macrovariable `________________98_76_54_32_10_`
|
||||
One temporary global macro variable `________________98_76_54_32_10_`
|
||||
and a dataset, in `work` library, named `_%sysfunc(datetime(),hex7.)`
|
||||
are created and deleted during the process.
|
||||
|
||||
@@ -2676,7 +2796,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
|
||||
**EXAMPLE 1.** Basic use-case one.
|
||||
Delete global macrovariables, info notes
|
||||
Delete global macro variables, info notes
|
||||
and warnings are printed in the log.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
@@ -2696,7 +2816,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**EXAMPLE 2.** Basic use-case two.
|
||||
Delete global macrovariables in quite mode
|
||||
Delete global macro variables in quite mode
|
||||
No info notes and warnings are printed in the log.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
@@ -2722,7 +2842,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
## >>> `%unzipArch()` macro: <<< <a name="unziparch-macro"></a> #######################
|
||||
|
||||
The unzipArch() macro allows to unzip content of a ZIP archive.
|
||||
Macro is OS independent, the `XCMD` option is not required.
|
||||
Macro is OS-independent, the `XCMD` option is not required.
|
||||
|
||||
The `dlCreateDir` option is used under the hood.
|
||||
|
||||
@@ -2955,7 +3075,7 @@ run;
|
||||
## >>> `%zipArch()` macro: <<< <a name="ziparch-macro"></a> #######################
|
||||
|
||||
The zipArch() macro allows to ZIP content of a directory.
|
||||
Macro is OS independent, the `XCMD` option is not required.
|
||||
Macro is OS-independent, the `XCMD` option is not required.
|
||||
|
||||
Content of zipped archive can be listed in the log.
|
||||
|
||||
@@ -3092,9 +3212,9 @@ run;
|
||||
|
||||
The zipEvalf() and QzipEvalf() macro functions
|
||||
allow to use a function on elements of pair of
|
||||
space separated lists.
|
||||
space-separated lists.
|
||||
|
||||
For two space separated lists of text strings the corresponding
|
||||
For two space-separated lists of text strings the corresponding
|
||||
elements are taken and the macro applies a function, provided by user,
|
||||
to calculate result of the function on taken elements.
|
||||
|
||||
@@ -3126,9 +3246,9 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
**Arguments description**:
|
||||
|
||||
1. `first` - *Required*, a space separated list of texts.
|
||||
1. `first` - *Required*, a space-separated list of texts.
|
||||
|
||||
2. `second` - *Required*, a space separated list of texts.
|
||||
2. `second` - *Required*, a space-separated list of texts.
|
||||
|
||||
* `function = cat` - *Optional*, default value is `cat`,
|
||||
a function which will be applied
|
||||
@@ -3145,18 +3265,18 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
* `argBf =` - *Optional*, default value is empty,
|
||||
arguments of the function inserted
|
||||
*before* elements the first list.
|
||||
If multiple should be comma separated.
|
||||
If multiple should be comma-separated.
|
||||
|
||||
* `argMd =` - *Optional*, default value is empty,
|
||||
arguments of the function inserted
|
||||
*between* elements the first list and
|
||||
the second list.
|
||||
If multiple should be comma separated.
|
||||
If multiple should be comma-separated.
|
||||
|
||||
* `argAf =` - *Optional*, default value is empty,
|
||||
arguments of the function inserted
|
||||
*after* elements the second list.
|
||||
If multiple should be comma separated.
|
||||
If multiple should be comma-separated.
|
||||
|
||||
* `format=` - *Optional*, default value is empty,
|
||||
indicates a format which should be used
|
||||
@@ -3205,7 +3325,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
**EXAMPLE 5.** Use with macrovariables:
|
||||
**EXAMPLE 5.** Use with macro variables:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%let abc = 10 100 1000;
|
||||
%put *
|
||||
@@ -5388,11 +5508,13 @@ Macro can be executed in two possible ways:
|
||||
run;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
2) by create a dataset with a list of links and use of `DS=` and `DSvar=` parameters.
|
||||
2) by create a dataset with a list of links and use of `DS=`, `DSvar=`,
|
||||
and `DSout=` parameters:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%downloadFilesTo(</path/to/target/directory>
|
||||
, DS=<dataset with list>
|
||||
, DSvar=<variable with list>
|
||||
, DSout=<variable with names for downloaded files>
|
||||
)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -5410,6 +5532,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
target
|
||||
<,DS=>
|
||||
<,DSvar=link>
|
||||
<,DSout=scan(link,-1,"/\")>
|
||||
<,inDev=URL>
|
||||
<,outDev=DISK>
|
||||
<,inOptions=>
|
||||
@@ -5428,6 +5551,10 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
*. `DSvar= ` - *Optional*, name of variable in data set
|
||||
with list of files to download.
|
||||
|
||||
*. `DSout=` - *Optional*, name of variable in data set
|
||||
with list of names for to downloaded files.
|
||||
Default value is: `scan(link,-1,"/\")` it is
|
||||
an expression to cut last part of the link.
|
||||
|
||||
*. `inDev=` - *Optional*, type of device used by the
|
||||
`filename()` function to access incoming files.
|
||||
@@ -5451,8 +5578,8 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
|
||||
**EXAMPLE 1.** Download data from web with diect list and then copy between directories:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
**EXAMPLE 1.** Download data from web with direct list and then copy between directories:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
resetline;
|
||||
%downloadFilesTo(~/directoryA)
|
||||
datalines4;
|
||||
@@ -5467,11 +5594,11 @@ datalines4;
|
||||
~/directoryA/WUSS-2023-Paper-189.zip
|
||||
;;;;
|
||||
run;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
**EXAMPLE 2.** Download data from web using data set with list:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
resetline;
|
||||
data listOfFiles;
|
||||
infile cards;
|
||||
@@ -5483,7 +5610,7 @@ https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-109.pdf
|
||||
run;
|
||||
|
||||
%downloadFilesTo(R:\directoryC, DS=listOfFiles, DSvar=files)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
---
|
||||
|
||||
@@ -5727,7 +5854,125 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%gettitle()` macro <a name="gettitle-macro-64"></a> ######
|
||||
## `%generateoneliners()` macro <a name="generateoneliners-macro-64"></a> ######
|
||||
|
||||
## >>> `%GenerateOneLiners()` macro: <<< <a name="generateoneliners-macro"></a> #######################
|
||||
|
||||
The `%GenerateOneLiners()` macro is a "macro-generator" dedicated
|
||||
to "lazy typers".
|
||||
|
||||
It allows to generate macro wrappers for functions
|
||||
that have the following form:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%macro FUNCTION()/parmbuff;
|
||||
%sysfunc(FUNCTION&syspbuff)
|
||||
%mend FUNCTION;
|
||||
|
||||
%macro qFUNCTION()/parmbuff;
|
||||
%qsysfunc(FUNCTION&syspbuff)
|
||||
%mend qFUNCTION;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
See examples below for the details.
|
||||
|
||||
The `%GenerateOneLiners()` macro is not pure macro code.
|
||||
|
||||
### SYNTAX: ###################################################################
|
||||
|
||||
The basic syntax is the following, the `<...>` means optional parameters:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%GenerateOneLiners(
|
||||
<,listOfFunctions=>
|
||||
<,prefix=>
|
||||
)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**Arguments description**:
|
||||
|
||||
1. `listOfFunctions` - *Required*, is a space separated list of
|
||||
valid SAS functions. Default value is:
|
||||
`CATX CATQ CATT CAT COMPRESS REVERSE REPEAT`.
|
||||
|
||||
2. `prefix` - *Optional*, a prefix added to the name
|
||||
of a created macro.
|
||||
|
||||
---
|
||||
|
||||
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
|
||||
**EXAMPLE 1.** Create list of macrofunctions for
|
||||
`CATX CATQ CATT CAT COMPRESS REVERSE REPEAT`:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%GenerateOneLiners(prefix=_)
|
||||
|
||||
%let a = 1,2,3,4,5,6;
|
||||
%put %_CATX(%str( ),&a.);
|
||||
%put %_CATQ(2A,&a.);
|
||||
%put %_QCATQ(1AMD,%str(,),&a.);
|
||||
|
||||
%let x=a 1 b 2 c 3 d 4 e 5 f 6 g;
|
||||
%put %_COMPRESS(&x.);
|
||||
%put %_COMPRESS(&x.,,ka);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**EXAMPLE 2.** Create list of macrofunctions for
|
||||
`SUM MEAN MEDIAN VAR STD USS CSS RANGE IQR MAD SUMABS`:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%GenerateOneLiners(
|
||||
listOfFunctions=SUM MEAN MEDIAN VAR STD USS CSS RANGE IQR MAD SUMABS
|
||||
, prefix=_)
|
||||
|
||||
%put
|
||||
%_SUM(1,2,3,4,5,6)
|
||||
%_MEAN(1,2,3,4,5,6)
|
||||
%_MEDIAN(1,2,3,4,5,6)
|
||||
%_VAR(1,2,3,4,5,6)
|
||||
;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**EXAMPLE 3.** Some other lists:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%GenerateOneLiners(prefix=_
|
||||
, listOfFunctions=CDF PDF RAND QUANTILE SQUANTILE SDF logCDF logPDF logSDF RMS
|
||||
)
|
||||
|
||||
%GenerateOneLiners(prefix=_
|
||||
, listOfFunctions=YEAR QTR MONTH WEEK DAY HOUR MINUTE SECOND
|
||||
)
|
||||
|
||||
%GenerateOneLiners(prefix=_
|
||||
, listOfFunctions=PCTL1 PCTL2 PCTL3 PCTL4 PCTL5 PCTL
|
||||
)
|
||||
|
||||
%GenerateOneLiners(prefix=_
|
||||
, listOfFunctions=YYQ MDY HMS INTCK INTNX SLEEP
|
||||
)
|
||||
|
||||
%GenerateOneLiners(prefix=_
|
||||
, listOfFunctions=WHICHC WHICHN
|
||||
)
|
||||
|
||||
%GenerateOneLiners(prefix=_
|
||||
, listOfFunctions=SYMEXIST SYMGLOBL SYMLOCAL
|
||||
)
|
||||
|
||||
%GenerateOneLiners(prefix=_
|
||||
, listOfFunctions=PRXCHANGE PRXMATCH PRXPAREN PRXPARSE
|
||||
)
|
||||
|
||||
%GenerateOneLiners(prefix=_
|
||||
, listOfFunctions=MD5 SHA256 HASHING
|
||||
)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
---
|
||||
|
||||
|
||||
---
|
||||
|
||||
## `%gettitle()` macro <a name="gettitle-macro-65"></a> ######
|
||||
|
||||
## >>> `%getTitle()` macro: <<< <a name="gettitle-macro"></a> #######################
|
||||
|
||||
@@ -5759,7 +6004,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
1. `number` - *Optional*, default value is empty,
|
||||
indicates numbers of titles to be extracted.
|
||||
Space separated list is expected.
|
||||
Space-separated list is expected.
|
||||
If empty or `_ALL_` extract all non-missing.
|
||||
|
||||
*. `type` - *Optional*, default value is `T`.
|
||||
@@ -5813,7 +6058,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%iffunc()` macro <a name="iffunc-macro-65"></a> ######
|
||||
## `%iffunc()` macro <a name="iffunc-macro-66"></a> ######
|
||||
|
||||
## >>> `%iffunc()` macro: <<< <a name="iffunc-macro"></a> #######################
|
||||
|
||||
@@ -5918,7 +6163,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
**EXAMPLE 4.** Macro-Functions works too:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%let x = A B C;
|
||||
%put %iffunc((%scan(&x.,1)=A),Stats with "A"., Does not start with "A".);
|
||||
%put %iffunc((%scan(&x.,1)=A),Starts with "A"., Does not start with "A".);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -6014,7 +6259,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%infmt()` macro <a name="infmt-macro-66"></a> ######
|
||||
## `%infmt()` macro <a name="infmt-macro-67"></a> ######
|
||||
|
||||
## >>> `%infmt()` macro: <<< <a name="infmt-macro"></a> #######################
|
||||
|
||||
@@ -6071,7 +6316,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%letters()` macro <a name="letters-macro-67"></a> ######
|
||||
## `%letters()` macro <a name="letters-macro-68"></a> ######
|
||||
|
||||
## >>> `%letters()` macro: <<< <a name="letters-macro"></a> #######################
|
||||
|
||||
@@ -6126,7 +6371,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
### EXAMPLES AND USECASES: ####################################################
|
||||
|
||||
**EXAMPLE 1.** Space separated list of capital letters from A to Z:
|
||||
**EXAMPLE 1.** Space-separated list of capital letters from A to Z:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%put %letters(1:26:1);
|
||||
|
||||
@@ -6189,7 +6434,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%libpath()` macro <a name="libpath-macro-68"></a> ######
|
||||
## `%libpath()` macro <a name="libpath-macro-69"></a> ######
|
||||
|
||||
## >>> `%libPath()` macro: <<< <a name="libpath-macro"></a> #######################
|
||||
|
||||
@@ -6234,7 +6479,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%minclude()` macro <a name="minclude-macro-69"></a> ######
|
||||
## `%minclude()` macro <a name="minclude-macro-70"></a> ######
|
||||
|
||||
## >>> `%mInclude()` macro: <<< <a name="minclude-macro"></a> #######################
|
||||
|
||||
@@ -6249,7 +6494,7 @@ Link: `https://blogs.sas.com/content/sgf/2023/05/30/embedding-any-code-anywhere-
|
||||
|
||||
The implementation presented, in contrary to inspiration source, is
|
||||
based on the `doSubL()` function and a list of global
|
||||
macrovariables of the form `______<N>` (six underscores and a number).
|
||||
macro variables of the form `______<N>` (six underscores and a number).
|
||||
|
||||
See examples below for the details.
|
||||
|
||||
@@ -6279,7 +6524,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
Sets the `lrecl` value for the file width.
|
||||
|
||||
*. `symdel=1` - *Optional*, default value is `1`.
|
||||
Indicates if the global macrovariables
|
||||
Indicates if the global macro variables
|
||||
`______1` to `______N` should be deleted
|
||||
when the macro ends.
|
||||
|
||||
@@ -6447,7 +6692,7 @@ quit;
|
||||
|
||||
---
|
||||
|
||||
## `%monthshift()` macro <a name="monthshift-macro-70"></a> ######
|
||||
## `%monthshift()` macro <a name="monthshift-macro-71"></a> ######
|
||||
|
||||
## >>> `%monthShift()` macro: <<< <a name="monthshift-macro"></a> #######################
|
||||
|
||||
@@ -6596,7 +6841,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%replist()` macro <a name="replist-macro-71"></a> ######
|
||||
## `%replist()` macro <a name="replist-macro-72"></a> ######
|
||||
|
||||
## >>> `%repList()` macro: <<< <a name="replist-macro"></a> #######################
|
||||
|
||||
@@ -6624,9 +6869,9 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
**Arguments description**:
|
||||
|
||||
1. `list` - *Required*, a list of elements to be repeated.
|
||||
List can be space or comma separated.
|
||||
List can be space or comma-separated.
|
||||
Elements can be in quotes.
|
||||
For comma separated list add brackets
|
||||
For comma-separated list add brackets
|
||||
e.g., `%repList((A,B,C,D),times=5)`.
|
||||
The list separators are: `<{[( ,;)]}>`.
|
||||
|
||||
@@ -6712,7 +6957,7 @@ run;
|
||||
|
||||
---
|
||||
|
||||
## `%time()` macro <a name="time-macro-72"></a> ######
|
||||
## `%time()` macro <a name="time-macro-73"></a> ######
|
||||
|
||||
## >>> `%time()` macro: <<< <a name="time-macro"></a> #######################
|
||||
|
||||
@@ -6755,7 +7000,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%today()` macro <a name="today-macro-73"></a> ######
|
||||
## `%today()` macro <a name="today-macro-74"></a> ######
|
||||
|
||||
## >>> `%today()` macro: <<< <a name="today-macro"></a> #######################
|
||||
|
||||
@@ -6798,7 +7043,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%translate()` macro <a name="translate-macro-74"></a> ######
|
||||
## `%translate()` macro <a name="translate-macro-75"></a> ######
|
||||
|
||||
## >>> `%translate()` macro: <<< <a name="translate-macro"></a> #######################
|
||||
|
||||
@@ -6862,7 +7107,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%tranwrd()` macro <a name="tranwrd-macro-75"></a> ######
|
||||
## `%tranwrd()` macro <a name="tranwrd-macro-76"></a> ######
|
||||
|
||||
## >>> `%tranwrd()` macro: <<< <a name="tranwrd-macro"></a> #######################
|
||||
|
||||
@@ -6929,7 +7174,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
|
||||
|
||||
---
|
||||
|
||||
## `%workpath()` macro <a name="workpath-macro-76"></a> ######
|
||||
## `%workpath()` macro <a name="workpath-macro-77"></a> ######
|
||||
|
||||
## >>> `%workPath()` macro: <<< <a name="workpath-macro"></a> #######################
|
||||
|
||||
|
||||
Binary file not shown.
BIN
packages/baseplus_RainCloudPlot_Ex4.png
Normal file
BIN
packages/baseplus_RainCloudPlot_Ex4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
Reference in New Issue
Block a user