From 2a3071708a1e2cb513b5dd561b66e0724f621403 Mon Sep 17 00:00:00 2001 From: Allan Date: Thu, 5 Oct 2023 16:06:11 +0100 Subject: [PATCH] feat: adding LogicalServerType option to mm_createstp.sas macro. Closes #350 --- all.sas | 22 ++++++++++++++++++++-- meta/mm_createstp.sas | 22 ++++++++++++++++++++-- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/all.sas b/all.sas index 7dde2f65..37de39c3 100644 --- a/all.sas +++ b/all.sas @@ -15828,6 +15828,11 @@ filename &frefout temp; a conflict) @param [in] repo= ServerContext is tied to a repo, if you are not using the foundation repo then select a different one here + @param [in] LogicalServerType= (Sps) Server Type to use. Valid options: + @li Any - Uses the default server. + @li Sps - Stored Process Server, best choice for web app development. Runs + under a system account identity (eg sassrv). + @li Wks - Workspace Server. Runs under the end user identity. @returns outds dataset containing the following columns: - stpuri @@ -15867,6 +15872,7 @@ filename &frefout temp; ,minify=NO ,frefin=mm_in ,frefout=mm_out + ,LogicalServerType=Sps )/*/STORE SOURCE*/; %local mD; @@ -15883,6 +15889,17 @@ filename &frefout temp; %mp_dropmembers(%scan(&outds,2,.)) +/* check LogicalServerType validity */ +%mp_abort( + iftrue=( + &LogicalServerType ne Sps + and &LogicalServerType ne Wks + and &LogicalServerType ne Any + ) + ,mac=&sysmacroname + ,msg=%str(Invalid value for LogicalServerType (&LogicalServerType)) +) + /** * check tree exists */ @@ -16115,8 +16132,9 @@ run; ' ' / " "/ diff --git a/meta/mm_createstp.sas b/meta/mm_createstp.sas index 2c8b0680..f252ce41 100755 --- a/meta/mm_createstp.sas +++ b/meta/mm_createstp.sas @@ -67,6 +67,11 @@ a conflict) @param [in] repo= ServerContext is tied to a repo, if you are not using the foundation repo then select a different one here + @param [in] LogicalServerType= (Sps) Server Type to use. Valid options: + @li Any - Uses the default server. + @li Sps - Stored Process Server, best choice for web app development. Runs + under a system account identity (eg sassrv). + @li Wks - Workspace Server. Runs under the end user identity. @returns outds dataset containing the following columns: - stpuri @@ -106,6 +111,7 @@ ,minify=NO ,frefin=mm_in ,frefout=mm_out + ,LogicalServerType=Sps )/*/STORE SOURCE*/; %local mD; @@ -122,6 +128,17 @@ %mp_dropmembers(%scan(&outds,2,.)) +/* check LogicalServerType validity */ +%mp_abort( + iftrue=( + &LogicalServerType ne Sps + and &LogicalServerType ne Wks + and &LogicalServerType ne Any + ) + ,mac=&sysmacroname + ,msg=%str(Invalid value for LogicalServerType (&LogicalServerType)) +) + /** * check tree exists */ @@ -354,8 +371,9 @@ run; ' ' / " "/