Skip to content

Commit e27010e

Browse files
authored
Merge pull request #1389 from sasjs/1388-make-sas9-servername-configurable
feat: configurable serverName in SAS 9
2 parents 23aa346 + 4f509c2 commit e27010e

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

src/commands/build/build.ts

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,31 @@ async function getBuildInfo(target: Target, streamWeb: boolean) {
208208
*
209209
*/
210210
211-
%global appLoc serverName;
211+
%global appLoc;
212212
%let compiled_apploc=${appLoc};
213+
%let appLoc=%sysfunc(coalescec(&appLoc,&compiled_apploc));
213214
214-
${serverType === ServerType.Sas9 ? `%let serverName=${serverName};` : ''}
215215
216-
%let appLoc=%sysfunc(coalescec(&appLoc,&compiled_apploc));
216+
${
217+
serverType === ServerType.Sas9
218+
? `
219+
/**
220+
* The serverName represents the SAS 9 logical server context
221+
* There is no programmatic (SAS code) way to obtain this
222+
* So it is taken from the sasjsconfig file OR supplied at runtime, eg:
223+
*
224+
* %let apploc=/my/apploc;
225+
* %let serverName=SASAppDC;
226+
* %inc thisfile;
227+
*
228+
* /
229+
230+
%global serverName;
231+
%let compiled_serverName=${serverName};
232+
%let serverName=%sysfunc(coalescec(&serverName,&compiled_serverName));
233+
`
234+
: ''
235+
}
217236
218237
%let sasjs_clickmeservice=clickme;
219238
%let syscc=0;

0 commit comments

Comments
 (0)