mirror of
https://github.com/sasjs/core.git
synced 2026-01-10 18:50:04 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e3b100170 | ||
|
|
414fe9ebde | ||
|
|
2bdd83b2e5 | ||
|
|
862b1896fe |
13
all.sas
13
all.sas
@@ -4861,7 +4861,7 @@ data;run;
|
|||||||
data &out_ds(compress=no
|
data &out_ds(compress=no
|
||||||
keep=file_or_folder filepath filename ext msg directory level
|
keep=file_or_folder filepath filename ext msg directory level
|
||||||
);
|
);
|
||||||
length directory filepath $500 fref fref2 $8 file_or_folder $6 filename $80
|
length directory filepath $2000 fref fref2 $8 file_or_folder $6 filename $255
|
||||||
ext $20 msg $200 foption $16;
|
ext $20 msg $200 foption $16;
|
||||||
if _n_=1 then call missing(of _all_);
|
if _n_=1 then call missing(of _all_);
|
||||||
retain level &level;
|
retain level &level;
|
||||||
@@ -13407,6 +13407,8 @@ run;
|
|||||||
change, plus ALL SUBSEQUENT CHANGES, will be reverted in the output table.
|
change, plus ALL SUBSEQUENT CHANGES, will be reverted in the output table.
|
||||||
@param [in] difftable The dataset containing the diffs. Definition available
|
@param [in] difftable The dataset containing the diffs. Definition available
|
||||||
in mddl_dc_difftable.sas
|
in mddl_dc_difftable.sas
|
||||||
|
@param [in] filtervar= (0) If provided, the contents of this macro variable
|
||||||
|
will be applied as an additional filter against &libds
|
||||||
@param [out] outds= (work.mp_stripdiffs) Output table containing the diffs.
|
@param [out] outds= (work.mp_stripdiffs) Output table containing the diffs.
|
||||||
Has the same format as the base datset, plus a
|
Has the same format as the base datset, plus a
|
||||||
`_____DELETE__THIS__RECORD_____` variable.
|
`_____DELETE__THIS__RECORD_____` variable.
|
||||||
@@ -13434,6 +13436,7 @@ run;
|
|||||||
%macro mp_stripdiffs(libds
|
%macro mp_stripdiffs(libds
|
||||||
,loadref
|
,loadref
|
||||||
,difftable
|
,difftable
|
||||||
|
,filtervar=0
|
||||||
,outds=work.mp_stripdiffs
|
,outds=work.mp_stripdiffs
|
||||||
,mdebug=0
|
,mdebug=0
|
||||||
)/*/STORE SOURCE*/;
|
)/*/STORE SOURCE*/;
|
||||||
@@ -13457,11 +13460,11 @@ run;
|
|||||||
,msg=%str(Invalid library.dataset reference - %superq(libds))
|
,msg=%str(Invalid library.dataset reference - %superq(libds))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* set up unique and temporary vars */
|
/* set up unique and temporary vars */
|
||||||
%local ds1 ds2 ds3 ds4 ds5 fref1;
|
%local ds1 ds2 ds3 ds4 ds5 fref1 filterstr;
|
||||||
%let fref1=%mf_getuniquefileref();
|
%let fref1=%mf_getuniquefileref();
|
||||||
|
%if &filtervar ne 0 %then %let filterstr=%superq(&filtervar);
|
||||||
|
%else %let filterstr=%str(1=1);
|
||||||
|
|
||||||
/* get timestamp of the diff to be reverted */
|
/* get timestamp of the diff to be reverted */
|
||||||
%local ts;
|
%local ts;
|
||||||
@@ -13546,7 +13549,7 @@ create table &outds as select "No " as _____DELETE__THIS__RECORD_____
|
|||||||
,b.%scan(¬pkcols,&x,%str( ))
|
,b.%scan(¬pkcols,&x,%str( ))
|
||||||
%end;
|
%end;
|
||||||
from &ds5 a
|
from &ds5 a
|
||||||
left join &libds b
|
left join &libds (where=(&filterstr)) b
|
||||||
on 1=1
|
on 1=1
|
||||||
%do x=1 %to %sysfunc(countw(&pk,%str( )));
|
%do x=1 %to %sysfunc(countw(&pk,%str( )));
|
||||||
and a.%scan(&pk,&x,%str( ))=b.%scan(&pk,&x,%str( ))
|
and a.%scan(&pk,&x,%str( ))=b.%scan(&pk,&x,%str( ))
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ data;run;
|
|||||||
data &out_ds(compress=no
|
data &out_ds(compress=no
|
||||||
keep=file_or_folder filepath filename ext msg directory level
|
keep=file_or_folder filepath filename ext msg directory level
|
||||||
);
|
);
|
||||||
length directory filepath $500 fref fref2 $8 file_or_folder $6 filename $80
|
length directory filepath $2000 fref fref2 $8 file_or_folder $6 filename $255
|
||||||
ext $20 msg $200 foption $16;
|
ext $20 msg $200 foption $16;
|
||||||
if _n_=1 then call missing(of _all_);
|
if _n_=1 then call missing(of _all_);
|
||||||
retain level &level;
|
retain level &level;
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
change, plus ALL SUBSEQUENT CHANGES, will be reverted in the output table.
|
change, plus ALL SUBSEQUENT CHANGES, will be reverted in the output table.
|
||||||
@param [in] difftable The dataset containing the diffs. Definition available
|
@param [in] difftable The dataset containing the diffs. Definition available
|
||||||
in mddl_dc_difftable.sas
|
in mddl_dc_difftable.sas
|
||||||
|
@param [in] filtervar= (0) If provided, the contents of this macro variable
|
||||||
|
will be applied as an additional filter against &libds
|
||||||
@param [out] outds= (work.mp_stripdiffs) Output table containing the diffs.
|
@param [out] outds= (work.mp_stripdiffs) Output table containing the diffs.
|
||||||
Has the same format as the base datset, plus a
|
Has the same format as the base datset, plus a
|
||||||
`_____DELETE__THIS__RECORD_____` variable.
|
`_____DELETE__THIS__RECORD_____` variable.
|
||||||
@@ -49,6 +51,7 @@
|
|||||||
%macro mp_stripdiffs(libds
|
%macro mp_stripdiffs(libds
|
||||||
,loadref
|
,loadref
|
||||||
,difftable
|
,difftable
|
||||||
|
,filtervar=0
|
||||||
,outds=work.mp_stripdiffs
|
,outds=work.mp_stripdiffs
|
||||||
,mdebug=0
|
,mdebug=0
|
||||||
)/*/STORE SOURCE*/;
|
)/*/STORE SOURCE*/;
|
||||||
@@ -72,11 +75,11 @@
|
|||||||
,msg=%str(Invalid library.dataset reference - %superq(libds))
|
,msg=%str(Invalid library.dataset reference - %superq(libds))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* set up unique and temporary vars */
|
/* set up unique and temporary vars */
|
||||||
%local ds1 ds2 ds3 ds4 ds5 fref1;
|
%local ds1 ds2 ds3 ds4 ds5 fref1 filterstr;
|
||||||
%let fref1=%mf_getuniquefileref();
|
%let fref1=%mf_getuniquefileref();
|
||||||
|
%if &filtervar ne 0 %then %let filterstr=%superq(&filtervar);
|
||||||
|
%else %let filterstr=%str(1=1);
|
||||||
|
|
||||||
/* get timestamp of the diff to be reverted */
|
/* get timestamp of the diff to be reverted */
|
||||||
%local ts;
|
%local ts;
|
||||||
@@ -161,7 +164,7 @@ create table &outds as select "No " as _____DELETE__THIS__RECORD_____
|
|||||||
,b.%scan(¬pkcols,&x,%str( ))
|
,b.%scan(¬pkcols,&x,%str( ))
|
||||||
%end;
|
%end;
|
||||||
from &ds5 a
|
from &ds5 a
|
||||||
left join &libds b
|
left join &libds (where=(&filterstr)) b
|
||||||
on 1=1
|
on 1=1
|
||||||
%do x=1 %to %sysfunc(countw(&pk,%str( )));
|
%do x=1 %to %sysfunc(countw(&pk,%str( )));
|
||||||
and a.%scan(&pk,&x,%str( ))=b.%scan(&pk,&x,%str( ))
|
and a.%scan(&pk,&x,%str( ))=b.%scan(&pk,&x,%str( ))
|
||||||
|
|||||||
@@ -8,6 +8,12 @@
|
|||||||
|
|
||||||
Requires the server to have SSH keys.
|
Requires the server to have SSH keys.
|
||||||
|
|
||||||
|
<h4> SAS Macros </h4>
|
||||||
|
@li mf_mkdir.sas
|
||||||
|
@li mp_gitadd.sas
|
||||||
|
@li mp_gitreleaseinfo.sas
|
||||||
|
@li mp_gitstatus.sas
|
||||||
|
|
||||||
<h4> SAS Macros </h4>
|
<h4> SAS Macros </h4>
|
||||||
@li mp_gitadd.sas
|
@li mp_gitadd.sas
|
||||||
@li mp_gitreleaseinfo.sas
|
@li mp_gitreleaseinfo.sas
|
||||||
@@ -124,6 +130,10 @@ data members(compress=char);
|
|||||||
keep name name2 path;
|
keep name name2 path;
|
||||||
run;
|
run;
|
||||||
|
|
||||||
|
proc sort data=members;
|
||||||
|
by name;
|
||||||
|
run;
|
||||||
|
|
||||||
%let temp_options = %sysfunc(getoption(source)) %sysfunc(getoption(notes));
|
%let temp_options = %sysfunc(getoption(source)) %sysfunc(getoption(notes));
|
||||||
options nosource nonotes;
|
options nosource nonotes;
|
||||||
data _null_;
|
data _null_;
|
||||||
|
|||||||
Reference in New Issue
Block a user