Skip to content

Commit

Permalink
fix: incorrect filepath when using filerefs in mp_dirlist
Browse files Browse the repository at this point in the history
  • Loading branch information
allanbowe committed Oct 29, 2020
1 parent 6f06e55 commit d9a82c0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions all.sas
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,8 @@ data &outds (compress=no keep=file_or_folder filepath filename ext msg directory
dnum = dnum(did);
do i = 1 to dnum;
filename = dread(did, i);
rc = filename(fref2, cats(directory,'/',filename));
filepath=cats(directory,'/',filename);
rc = filename(fref2,filepath);
midd=dopen(fref2);
dmsg=sysmsg();
if did > 0 then file_or_folder='folder';
Expand All @@ -2064,7 +2065,6 @@ data &outds (compress=no keep=file_or_folder filepath filename ext msg directory
ext='';
file_or_folder='folder';
end;
filepath="&path/"!!filename;
output;
end;
rc = dclose(did);
Expand Down
9 changes: 6 additions & 3 deletions base/mf_getengine.sas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@brief Returns the engine type of a SAS library
@details Usage:
%put %mf_getEngine(SASHELP);
%put %mf_getengine(SASHELP);
returns:
> V9
Expand All @@ -21,9 +21,10 @@
@version 9.2
@author Allan Bowe
**/
%macro mf_getEngine(libref
**/ /** \cond */

%macro mf_getengine(libref
)/*/STORE SOURCE*/;
%local dsid engnum rc engine;

Expand All @@ -42,3 +43,5 @@
&engine

%mend;

/** \endcond */
4 changes: 2 additions & 2 deletions base/mp_dirlist.sas
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ data &outds (compress=no keep=file_or_folder filepath filename ext msg directory
dnum = dnum(did);
do i = 1 to dnum;
filename = dread(did, i);
rc = filename(fref2, cats(directory,'/',filename));
filepath=cats(directory,'/',filename);
rc = filename(fref2,filepath);
midd=dopen(fref2);
dmsg=sysmsg();
if did > 0 then file_or_folder='folder';
Expand All @@ -108,7 +109,6 @@ data &outds (compress=no keep=file_or_folder filepath filename ext msg directory
ext='';
file_or_folder='folder';
end;
filepath="&path/"!!filename;
output;
end;
rc = dclose(did);
Expand Down
1 change: 0 additions & 1 deletion base/mp_getddl.sas
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
datetime2 format or regular decimal type
@version 9.3
@author Allan Bowe
@source https://github.com/sasjs/core
**/

%macro mp_getddl(libref,ds,fref=getddl,flavour=SAS,showlog=NO,schema=
Expand Down

0 comments on commit d9a82c0

Please sign in to comment.