diff --git a/sas/package-lock.json b/sas/package-lock.json index ed58e17..2f31e5d 100644 --- a/sas/package-lock.json +++ b/sas/package-lock.json @@ -7,7 +7,7 @@ "name": "dc-sas", "dependencies": { "@sasjs/cli": "^4.11.1", - "@sasjs/core": "^4.51.3" + "@sasjs/core": "^4.51.4" } }, "node_modules/@coolaj86/urequest": { @@ -116,9 +116,9 @@ "integrity": "sha512-Grwydm5GxBsYk238PZw41XPjXVVQ9vWcvfZ06L2P0bQbvK0sGn7l69JA7H5MGr3QcaLpiD4Kg70cAh7PgE+JOw==" }, "node_modules/@sasjs/core": { - "version": "4.51.3", - "resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.3.tgz", - "integrity": "sha512-ATc6+Mk0oEN14Ih9jZYJAuNhU4wcXqDgD3oKGnCvW/jVVcMNRNuQlh6O2bBR9H31DnCW7W94MxhtPHud786+tg==" + "version": "4.51.4", + "resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.4.tgz", + "integrity": "sha512-NHaSNZY2Jm2omnVNQlrMLiUtZsZq8JpnqxZPVKSPDfpTNnq6RHmwTXEZp7AJQ9YdDfEmibU5I+EDWstsoOi5Vg==" }, "node_modules/@sasjs/lint": { "version": "2.3.1", @@ -1834,9 +1834,9 @@ } }, "@sasjs/core": { - "version": "4.51.3", - "resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.3.tgz", - "integrity": "sha512-ATc6+Mk0oEN14Ih9jZYJAuNhU4wcXqDgD3oKGnCvW/jVVcMNRNuQlh6O2bBR9H31DnCW7W94MxhtPHud786+tg==" + "version": "4.51.4", + "resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.4.tgz", + "integrity": "sha512-NHaSNZY2Jm2omnVNQlrMLiUtZsZq8JpnqxZPVKSPDfpTNnq6RHmwTXEZp7AJQ9YdDfEmibU5I+EDWstsoOi5Vg==" }, "@sasjs/lint": { "version": "2.3.1", diff --git a/sas/package.json b/sas/package.json index 69875f1..1135906 100644 --- a/sas/package.json +++ b/sas/package.json @@ -29,6 +29,6 @@ "private": true, "dependencies": { "@sasjs/cli": "^4.11.1", - "@sasjs/core": "^4.51.3" + "@sasjs/core": "^4.51.4" } } diff --git a/sas/sasjs/macros/mpe_checkrestore.sas b/sas/sasjs/macros/mpe_checkrestore.sas index 1ea3c2a..fa63379 100644 --- a/sas/sasjs/macros/mpe_checkrestore.sas +++ b/sas/sasjs/macros/mpe_checkrestore.sas @@ -39,6 +39,18 @@ %let &outresult=NO; %let &outreason=NOTFOUND; + /* check if there is actually a version to restore */ + %local chk; + %let chk=0; + proc sql noprint; + select count(*) into: chk from &dc_libref..mpe_audit + where load_ref="&table"; + %if &chk=0 %then %do; + %let allow_restore=NO; + %let reason=No entry for &table in MPE_AUDIT; + %return; + %end; + /* grab user groups */ %local user; %let user=%mf_getuser(); @@ -117,20 +129,7 @@ %return; %end; %else %do; - /* check if there is actually a version to restore */ - %local chk; - %let chk=0; - proc sql noprint; - select count(*) into: chk from &dc_libref..mpe_audit - where load_ref="&table"; - %if &chk=0 %then %do; - %let allow_restore=NO; - %let reason=No entry for &table in MPE_AUDIT; - %end; - %else %do; - %let allow_restore=YES; - %let reason=CHECKS PASSED; - %end; - %return; + %let allow_restore=YES; + %let reason=CHECKS PASSED; %end; %mend mpe_checkrestore;