Skip to content

Commit

Permalink
Merge pull request #351 from sasjs/issue350
Browse files Browse the repository at this point in the history
feat: adding LogicalServerType option to mm_createstp.sas macro.
  • Loading branch information
allanbowe authored Oct 5, 2023
2 parents 3890aef + 2a30717 commit 2b6882c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
22 changes: 20 additions & 2 deletions all.sas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -15867,6 +15872,7 @@ filename &frefout temp;
,minify=NO
,frefin=mm_in
,frefout=mm_out
,LogicalServerType=Sps
)/*/STORE SOURCE*/;

%local mD;
Expand All @@ -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
*/
Expand Down Expand Up @@ -16115,8 +16132,9 @@ run;
' <TextStore IsHidden="0" Name="Stored Process" UsageVersion="0" '/
' TextRole="StoredProcessConfiguration" TextType="XML" '/
' StoredText="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&qu'@@
'ot;?&gt;&lt;StoredProcess&gt;&lt;ServerContext LogicalServerType=&quot;S'@@
'ps&quot; OtherAllowed=&quot;false&quot;/&gt;&lt;ResultCapabilities Packa'@@
'ot;?&gt;&lt;StoredProcess&gt;&lt;ServerContext LogicalServerType=&quot;'@@
"&LogicalServerType"@@
'&quot; OtherAllowed=&quot;false&quot;/&gt;&lt;ResultCapabilities Packa'@@
'ge=&quot;' @@ "&package" @@ '&quot; Streaming=&quot;' @@ "&streaming" @@
'&quot;/&gt;&lt;OutputParameters/&gt;&lt;/StoredProcess&gt;" />' /
" </Notes> "/
Expand Down
22 changes: 20 additions & 2 deletions meta/mm_createstp.sas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -106,6 +111,7 @@
,minify=NO
,frefin=mm_in
,frefout=mm_out
,LogicalServerType=Sps
)/*/STORE SOURCE*/;

%local mD;
Expand All @@ -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
*/
Expand Down Expand Up @@ -354,8 +371,9 @@ run;
' <TextStore IsHidden="0" Name="Stored Process" UsageVersion="0" '/
' TextRole="StoredProcessConfiguration" TextType="XML" '/
' StoredText="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&qu'@@
'ot;?&gt;&lt;StoredProcess&gt;&lt;ServerContext LogicalServerType=&quot;S'@@
'ps&quot; OtherAllowed=&quot;false&quot;/&gt;&lt;ResultCapabilities Packa'@@
'ot;?&gt;&lt;StoredProcess&gt;&lt;ServerContext LogicalServerType=&quot;'@@
"&LogicalServerType"@@
'&quot; OtherAllowed=&quot;false&quot;/&gt;&lt;ResultCapabilities Packa'@@
'ge=&quot;' @@ "&package" @@ '&quot; Streaming=&quot;' @@ "&streaming" @@
'&quot;/&gt;&lt;OutputParameters/&gt;&lt;/StoredProcess&gt;" />' /
" </Notes> "/
Expand Down

0 comments on commit 2b6882c

Please sign in to comment.