1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-11 06:24:35 +00:00

fix: ensuring audit table gets loaded in mp_loadformat. Adding test also. Closes #190

This commit is contained in:
Allan Bowe
2022-03-08 16:52:22 +00:00
parent 5ceaac195d
commit cc3435d13d
3 changed files with 15 additions and 1 deletions

View File

@@ -8872,6 +8872,9 @@ options ibufsize=&ibufsize;
,mdebug=&mdebug
)
proc append base=&auditlibds data=&storediffs;
run;
%if &locklibds ne 0 %then %do;
%mp_lockanytable(UNLOCK
,lib=%scan(&auditlibds,1,.)

View File

@@ -272,6 +272,9 @@ options ibufsize=&ibufsize;
,mdebug=&mdebug
)
proc append base=&auditlibds data=&storediffs;
run;
%if &locklibds ne 0 %then %do;
%mp_lockanytable(UNLOCK
,lib=%scan(&auditlibds,1,.)

View File

@@ -3,6 +3,7 @@
@brief Testing mp_loadformat.sas macro
<h4> SAS Macros </h4>
@li mddl_dc_difftable.sas
@li mp_loadformat.sas
@li mp_assert.sas
@li mp_assertscope.sas
@@ -12,6 +13,8 @@
/* prep format catalog */
libname perm (work);
%mddl_dc_difftable(libds=perm.audit)
data work.loadfmts;
length fmtname $32;
eexcl='Y';
@@ -49,7 +52,7 @@ run;
%mp_loadformat(perm.testcat
,work.stagedata
,loadtarget=YES
,auditlibds=0
,auditlibds=perm.audit
,locklibds=0
,delete_col=deleteme
,outds_add=add_test1
@@ -73,4 +76,9 @@ run;
iftrue=(%mf_nobs(mod_test1)=100),
desc=Test 1 - mod obs,
outds=work.test_results
)
%mp_assert(
iftrue=(%mf_nobs(perm.audit)=100),
desc=Test 1 - mod obs,
outds=work.test_results
)