8 Commits

Author SHA1 Message Date
SASPAC - SAS Packages Archive
01c12b68bf Merge pull request #32 from SASPAC/dev
The BasePlus package [ver. 1.35.1]
2023-11-14 15:41:40 +01:00
Bart Jablonski
5062239647 The BasePlus package [ver. 1.35.1]
The BasePlus package [ver. 1.35.1]

New `%downloadFilesTo()` macro added (and fixed).
Macro allows conveniently download data from internet or local locations to a directory pointed by user.

Documentation updated.

---

SHA256 digest for BasePlus: `F*BCD89EDF856762EB8E441BC53933774483258453D1F7D74185F8A1861E414B0E`
2023-11-14 15:40:32 +01:00
SASPAC - SAS Packages Archive
70121f1909 Merge pull request #31 from SASPAC/dev
The BasePlus package [ver. 1.35.1]
2023-11-14 15:29:30 +01:00
Bart Jablonski
9461acd02c The BasePlus package [ver. 1.35.1]
The BasePlus package [ver. 1.35.1]

New `%downloadFilesTo()` macro added (and fixed).
Macro allows conveniently download data from internet or local locations to a directory pointed by user.

Documentation updated.

---

SHA256 digest for BasePlus: `F*17A6D788704E33C3C2AE51BBAF881F8DE959548603BC95C05D3E165EE2D354E5`
2023-11-14 15:28:27 +01:00
SASPAC - SAS Packages Archive
813fd251e5 Merge pull request #30 from SASPAC/dev
The BasePlus package [ver. 1.35.0]
2023-11-14 14:46:48 +01:00
Bart Jablonski
8903128f28 The BasePlus package [ver. 1.35.0]
The BasePlus package [ver. 1.35.0]

New `%downloadFilesTo()` macro added.
Macro allows conveniently download data from internet or local locations to a directory pointed by user.

Documentation updated.

---

SHA256 digest for BasePlus: `F*62344EAA8C0DD95CCB164B5C7A91B33865B3D19CD5A2A3EDAC4C31E0541D04C9`
2023-11-14 14:44:47 +01:00
SASPAC - SAS Packages Archive
be6023b73a Merge pull request #29 from SASPAC/dev
The BasePlus package [ver. 1.35.0]
2023-11-14 14:41:14 +01:00
Bart Jablonski
9326cd148c The BasePlus package [ver. 1.35.0]
The BasePlus package [ver. 1.35.0]

New `%downloadFilesTo()` macro added.
Macro allows conveniently download data from internet or local locations to a directory pointed by user.

Documentation updated.

---

SHA256 digest for BasePlus: `F*62344EAA8C0DD95CCB164B5C7A91B33865B3D19CD5A2A3EDAC4C31E0541D04C9`
2023-11-14 14:37:10 +01:00
7 changed files with 12839 additions and 19 deletions

View File

@@ -52,7 +52,7 @@ libname NEW "%workPath()/new";
``` ```
and more. and more.
SHA256 digest for the latest version of `BasePlus`: F*D84CE41A550DC2D5C092C70C04A796E8329F34087A603BEF0CD366910C162E80 SHA256 digest for the latest version of `BasePlus`: F*BCD89EDF856762EB8E441BC53933774483258453D1F7D74185F8A1861E414B0E
[**Documentation for BasePlus**](./baseplus.md "Documentation for BasePlus") [**Documentation for BasePlus**](./baseplus.md "Documentation for BasePlus")

View File

@@ -47,6 +47,7 @@
* [`%unzipLibrary()` macro](#unziplibrary-macro) * [`%unzipLibrary()` macro](#unziplibrary-macro)
* [`%zipArch()` macro](#ziparch-macro) * [`%zipArch()` macro](#ziparch-macro)
* [`%unzipArch()` macro](#unziparch-macro) * [`%unzipArch()` macro](#unziparch-macro)
* [`%downloadFilesTo()` macro](#downloadfilesto-macro)
* [`%LDSN()` macro](#ldsn-macro) * [`%LDSN()` macro](#ldsn-macro)
* [`%LDsNm()` macro](#ldsnm-macro) * [`%LDsNm()` macro](#ldsnm-macro)
* [`%LVarNm()` macro](#lvarnm-macro) * [`%LVarNm()` macro](#lvarnm-macro)
@@ -80,7 +81,7 @@
--- ---
# The BasePlus package [ver. 1.34.0] <a name="baseplus-package"></a> ############################################### # The BasePlus package [ver. 1.35.1] <a name="baseplus-package"></a> ###############################################
The **BasePlus** package implements useful The **BasePlus** package implements useful
functions and functionalities I miss in the BASE SAS. functions and functionalities I miss in the BASE SAS.
@@ -102,7 +103,8 @@ Kudos to all who inspired me to generate this package:
*Michal Ludwicki*, *Michal Ludwicki*,
*Quentin McMullen*, *Quentin McMullen*,
*Kurt Bremser*, *Kurt Bremser*,
*Leonid Batkhan*. *Leonid Batkhan*,
*Louise Hadden*.
--- ---
@@ -400,6 +402,16 @@ run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 26** Downloading data from the internet to a local dirrectory:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%downloadFilesTo(~/directoryA)
datalines4;
https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-189.pdf
https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-189.zip
;;;;
run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- ---
@@ -463,21 +475,22 @@ Package contains:
57. functions quicksortlight 57. functions quicksortlight
58. macro date 58. macro date
59. macro datetime 59. macro datetime
60. macro filepath 60. macro downloadfilesto
61. macro finddswithvarval 61. macro filepath
62. macro fmt 62. macro finddswithvarval
63. macro gettitle 63. macro fmt
64. macro infmt 64. macro gettitle
65. macro letters 65. macro infmt
66. macro libpath 66. macro letters
67. macro minclude 67. macro libpath
68. macro monthshift 68. macro minclude
69. macro replist 69. macro monthshift
70. macro time 70. macro replist
71. macro today 71. macro time
72. macro translate 72. macro today
73. macro tranwrd 73. macro translate
74. macro workpath 74. macro tranwrd
75. macro workpath
@@ -488,7 +501,7 @@ localization (only if additional content was deployed during the installation pr
* SAS package generated by generatePackage, version 20231107 * * SAS package generated by generatePackage, version 20231107 *
The SHA256 hash digest for package BasePlus: The SHA256 hash digest for package BasePlus:
`F*D84CE41A550DC2D5C092C70C04A796E8329F34087A603BEF0CD366910C162E80` `F*BCD89EDF856762EB8E441BC53933774483258453D1F7D74185F8A1861E414B0E`
--- ---
# Content description ############################################################################################ # Content description ############################################################################################
@@ -4051,6 +4064,125 @@ filename pR "%workPath()";
--- ---
## >>> `%downloadFilesTo()` macro: <<< <a name="downloadfilesto-macro"></a> #######################
The downloadFilesTo() macro copy files (in binary mode
using `filename()` function with options `lrecl=1 recfm=n`)
from list provided by user to a directory indicated
in the macro call.
Macro can be executed in two possible ways:
1) by providing list of files to download in a `datalines4`(`cards4`) list
directly after macro call:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%downloadFilesTo(</path/to/target/directory>)
datalines4;
<link to file1>
<link to file2>
...
<link to fileN>
;;;;
run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2) by create a dataset with a list of links and use of `DS=` and `DSvar=` parameters.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%downloadFilesTo(</path/to/target/directory>
, DS=<dataset with list>
, DSvar=<variable with list>
)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See examples below for the details.
The `%downloadFilesTo()` macro **does not** execute as a pure macro code.
Temporary dataset `work.______locationInfoData` is generated during processing.
### SYNTAX: ###################################################################
The basic syntax is the following, the `<...>` means optional parameters:
~~~~~~~~~~~~~~~~~~~~~~~sas
%downloadFilesTo(
target
<,DS=>
<,DSvar=link>
<,inDev=URL>
<,outDev=DISK>
<,inOptions=>
<,outOptions=>
)
~~~~~~~~~~~~~~~~~~~~~~~
**Arguments description**:
1. `target ` - *Required*, a path to target directory.
If empty the `WORK` location is used.
*. `DS= ` - *Optional*, name of data set with list
of files to download.
*. `DSvar= ` - *Optional*, name of variable in data set
with list of files to download.
*. `inDev=` - *Optional*, type of device used by the
`filename()` function to access incoming files.
Default value is `URL`.
*. `outDev=` - *Optional*, type of device used by the
`filename()` function to access outgoing files.
Default value is `DISK`.
*. `inOptions=` - *Optional*, list of additional options for the
`filename()` function to access incoming files.
Default value is empty.
*. `outOptions=` - *Optional*, list of additional options for the
`filename()` function to access outgoing files.
Default value is empty.
---
### EXAMPLES AND USECASES: ####################################################
**EXAMPLE 1.** Download data from web with diect list and then copy between directories:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
resetline;
%downloadFilesTo(~/directoryA)
datalines4;
https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-189.pdf
https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-189.zip
;;;;
run;
%downloadFilesTo(~/directoryB,inDev=DISK)
datalines4;
~/directoryA/WUSS-2023-Paper-189.pdf
~/directoryA/WUSS-2023-Paper-189.zip
;;;;
run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 2.** Download data from web using data set with list:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
resetline;
data listOfFiles;
infile cards;
input files :$1024.;
cards4;
https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-201.pdf
https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-109.pdf
;;;;
run;
%downloadFilesTo(R:\directoryC, DS=listOfFiles, DSvar=files)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
## >>> `%LDSN()` macro: <<< <a name="ldsn-macro"></a> ####################### ## >>> `%LDSN()` macro: <<< <a name="ldsn-macro"></a> #######################
The LDSN (Long DataSet Names) macro function The LDSN (Long DataSet Names) macro function

Binary file not shown.

6344
hist/1.35.0/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/1.35.0/baseplus.zip Normal file

Binary file not shown.

6344
hist/1.35.1/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/1.35.1/baseplus.zip Normal file

Binary file not shown.