Skip to content

Commit a6ab38f

Browse files
author
Allan Bowe
committed
fix: sas configuration
1 parent 3a7ec78 commit a6ab38f

File tree

4 files changed

+1637
-18
lines changed

4 files changed

+1637
-18
lines changed

sasjs/sasjsconfig.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
"serviceFolders": [
99
"sasjs/services/common",
1010
"sasjs/services/files"
11-
]
11+
],
12+
"initProgram": "sasjs/services/serviceinit.sas"
1213
},
1314
"streamConfig": {
14-
"assetPaths": [],
15+
"streamLogo": "assets/angular-logo.png",
16+
"streamServiceName": "Angular",
1517
"streamWeb": false,
16-
"streamWebFolder": "webv",
18+
"streamWebFolder": "web",
1719
"webSourcePath": "dist"
1820
},
1921
"defaultTarget": "viya",
@@ -38,19 +40,9 @@
3840
},
3941
{
4042
"name": "server",
43+
"serverUrl": " ",
4144
"serverType": "SASJS",
42-
"serverUrl": "",
43-
"appLoc": "/Public/app/angular-seed-app",
44-
"deployConfig": {
45-
"deployServicePack": true
46-
},
47-
"streamConfig": {
48-
"streamLogo": "assets/angular-logo.png",
49-
"streamServiceName": "Angular",
50-
"streamWeb": true,
51-
"streamWebFolder": "webv",
52-
"webSourcePath": "dist"
53-
}
45+
"appLoc": "/Public/app/angular-seed-app"
5446
}
5547
]
5648
}

sasjs/services/common/appinit.sas

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
@brief Initialisation service - runs on app startup
44
@details This is always the first service called when the app is opened.
55
6+
The deployed code includes the `serviceinit.sas`, as defined in the
7+
`sasjs/sasjsconfig.json` file.
8+
69
<h4> SAS Macros </h4>
710
811
**/
912

1013
proc sql;
1114
create table areas as select distinct area
12-
from sashelp.springs;
15+
from mydb.springs;
16+
1317
%webout(OPEN)
1418
%webout(OBJ,areas)
1519
%webout(CLOSE)

sasjs/services/common/getdata.sas

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
88
**/
99

10+
/* this macro converts the JS input to a WORK table - work.areas */
1011
%webout(FETCH)
1112

1213
proc sql;
13-
create table springs as select * from sashelp.springs
14-
where area in (select area from areas);
14+
create table springs as select *
15+
from mydb.springs
16+
where area in (select area from work.areas);
1517

18+
/* these macros open the JSON, send the table back, and close the JSON */
1619
%webout(OPEN)
1720
%webout(OBJ,springs)
1821
%webout(CLOSE)

0 commit comments

Comments
 (0)