Skip to content

Commit

Permalink
feat: repo option in mm_createstp.sas
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan Bowe committed Mar 9, 2020
1 parent bac0fae commit ab0ab44
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mc_all.sas
Original file line number Diff line number Diff line change
Expand Up @@ -4183,6 +4183,8 @@ filename &frefout temp;
filerefs are left open, to enable inspection after running the
macro (or importing into an xmlmap if needed).
@param frefout= fileref to use (enables change if there is a conflict)
@param repo= ServerContext is tied to a repo, if you are not using the
foundation repo then select a different one here
@returns outds dataset containing the following columns:
- stpuri
Expand Down Expand Up @@ -4210,7 +4212,13 @@ filename &frefout temp;
,minify=NO
,frefin=mm_in
,frefout=mm_out
,repo=foundation
)/*/STORE SOURCE*/;
%local oldrepo;
%let oldrepo=%upcase(%sysfunc(getoption(METAREPOSITORY)));
%if &oldrepo ne %upcase(&repo) %then %do;
options metarepository=&repo;
%end;

%local mD;
%if &mDebug=1 %then %let mD=;
Expand Down Expand Up @@ -4498,6 +4506,9 @@ run;
%else %do;
%put WARNING: STPTYPE=*&stptype* not recognised!;
%end;
%if &oldrepo ne %upcase(&repo) %then %do;
options metarepository=&oldrepo;
%end;
%mend;/**
@file mm_createwebservice.sas
@brief Create a Web Ready Stored Process
Expand Down
11 changes: 11 additions & 0 deletions meta/mm_createstp.sas
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
filerefs are left open, to enable inspection after running the
macro (or importing into an xmlmap if needed).
@param frefout= fileref to use (enables change if there is a conflict)
@param repo= ServerContext is tied to a repo, if you are not using the
foundation repo then select a different one here
@returns outds dataset containing the following columns:
- stpuri
Expand Down Expand Up @@ -94,7 +96,13 @@
,minify=NO
,frefin=mm_in
,frefout=mm_out
,repo=foundation
)/*/STORE SOURCE*/;
%local oldrepo;
%let oldrepo=%upcase(%sysfunc(getoption(METAREPOSITORY)));
%if &oldrepo ne %upcase(&repo) %then %do;
options metarepository=&repo;
%end;

%local mD;
%if &mDebug=1 %then %let mD=;
Expand Down Expand Up @@ -382,4 +390,7 @@ run;
%else %do;
%put WARNING: STPTYPE=*&stptype* not recognised!;
%end;
%if &oldrepo ne %upcase(&repo) %then %do;
options metarepository=&oldrepo;
%end;
%mend;

0 comments on commit ab0ab44

Please sign in to comment.