The SASjs Config file provides the settings and structure for your SASjs project.
{
"macroFolders": [
"macros"
],
"programFolders": [
"programs"
],
"binaryFolders": [
"binaries"
],
"defaultTarget": "viya",
"targets": [
{
"name": "viya",
"serverType": "SASVIYA",
"serverUrl": "https://sas.sasjs.com",
"appLoc": "/Public/app",
"contextName": "SAS Job Execution compute context",
"deployConfig": {
"deployServicePack": true,
"deployScripts": [
"sasjsbuild/myviyadeploy.sas"
]
},
"serviceConfig": {
"serviceFolders": [
"targets/viya/services/admin"
],
"initProgram": "build/serviceinit.sas",
"termProgram": "build/serviceinit.sas",
"macroVars": {
"name": "viyavalue",
"extravar": "this too"
}
},
"jobConfig": {
"jobFolders": [],
"initProgram": "",
"termProgram": "",
"macroVars": {}
},
"streamConfig": {
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "webv",
"webSourcePath": "dist"
},
"testConfig": {
"initProgram": "sasjs/tests/testinit.sas",
"termProgram": "sasjs/tests/testterm.sas",
"macroVars": {
"testVar": "testValue"
},
"testSetUp": "sasjs/tests/testsetup.sas",
"testTearDown": "sasjs/tests/testteardown.sas"
},
"macroFolders": [
"targets/viya/macros"
],
"programFolders": [],
"binaryFolders": [
"binaries"
]
},
{
"name": "sas9",
"serverType": "SAS9",
"serverUrl": "https://sas.sasjs.com:7980",
"appLoc": "/User Folders/&sysuserid/My Folder",
"serverName": "Foundation",
"repositoryName": "SASApp",
"buildConfig": {
"buildOutputFileName": "mysas9deploy.sas",
"initProgram": "",
"termProgram": "",
"macroVars": {}
},
"deployConfig": {
"deployScripts": [
"build/deploysas9.sh"
],
"deployServicePack": false
},
"serviceConfig": {
"serviceFolders": [
"targets/sas9/services/admin"
],
"initProgram": "",
"termProgram": "build/servicetermother.sas",
"macroVars": {}
},
"streamConfig": {
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "web9",
"webSourcePath": "dist"
},
"testConfig": {
"initProgram": "sasjs/tests/testinit.sas",
"termProgram": "sasjs/tests/testterm.sas",
"macroVars": {
"testVar": "testValue"
},
"testSetUp": "sasjs/tests/testsetup.sas",
"testTearDown": "sasjs/tests/testteardown.sas"
},
"macroFolders": [
"targets/sas9/macros"
],
"programFolders": [],
"binaryFolders": [
"binaries"
]
}
]
}
These local folders are searched for Binary Files when running sasjs compile. Folders are relative to the sasjs/sasjsconfig.json file.
No Additional Items[
"binaries",
"../../more_binaries"
]
The name of the folder containing the compiled output. The sasjs build
command will take all of the subfolders here as inputs to create the build pack. By default this will be named sasjsbuild
. In global, the default is ~/.sasjsbuild
.
"sasjsbuild"
".sasjsbuild"
The name of the folder containing the output (eg logs, ODS output) from sasjs run
. By default this will be named sasjsresults
. In global, the default is ~/.sasjsresults
.
"sasjsresults"
".sasjsresults"
If a target is not specified, this target is used by default. The default target must exist in the (local) targets array.
"viya"
SASjs uses doxygen to auto-generate HTML documentation using the headers in your SAS programs, macros, services & jobs. For more info, see https://cli.sasjs.io/doc. Some properties are taken from package.json (such as the project Name).
{
"displayMacroCore": true,
"outDirectory": "/some/output/directory",
"dataControllerUrl": "https://mysasserver.com/web/datacontroller/#",
"enableLineage": true,
"doxyContent": {
"readMe": "../../my/custom/homepage.md",
"path": "my/custom/doxy/folder"
}
}
The CLI will autocompile macro dependencies that exist in the SASjs Macro Core library. These will also show in the documentation under 'node_modules'. If you'd prefer not to show these in the rendered docs, set this value to false.
true
The location to which the generated HTML SAS documentation is written. If missing, or left blank, the files will be written to the sasjsbuild/doc
directory (default behaviour).
"/my/preferred/docs/directory"
Provide the full URL to Data Controller so that sasjs doc
can link the lineage diagram directly to the table viewer in Data Controller.
If left blank, or undefined, no links will be generated.
"https://yourserver.co.uk/dcviya/#"
If true, sasjs doc will generate and display Data Lineage from Jobs and Services.
Configuration of the Doxyfile variables
{
"favIcon": "favicon.ico",
"footer": "new_footer.html",
"header": "new_header.html",
"layout": "DoxygenLayout.xml",
"logo": "logo.png",
"readMe": "../../README.md",
"stylesheet": "new_stylesheet.css",
"path": "sasjs/doxy"
}
The favicon used in the doxygen documentation
The header HTML file used in the doxygen documentation
The layout XML file used to build the doxygen documentation
The logo file used by doxygen
The file used to generate the doxygen homepage (defaults to the readme.md)
The CSS file used to extend Doxygen
The path to the Doxygen configuration files (relative to sasjs/sasjsconfig.json)
Configure https agent by setting all supported attribute such as key
, cert
, ca
, rejectUnauthorized
and requestCert
{
"allowInsecureRequests": false,
"caPath": "path/to/caFile",
"keyPath": "path/to/keyFile",
"certPath": "path/to/certFile",
"requestCert": false,
"rejectUnauthorized": true
}
If you are having certificate errors connecting to SAS, that cannot be properly resolved, try setting this value to true. This option only has an effect if rejectUnauthorized is not present.
true
false
Optionally override the trusted CA certificates. Default is to trust the well-known CAs curated by Mozilla. Mozilla's CAs are completely replaced when CAs are explicitly specified using this option.
"path/to/caFile"
Private keys in PEM format. PEM allows the option of private keys being encrypted. Encrypted keys will be decrypted with options.passphrase. Multiple keys using different algorithms can be provided either as an array of unencrypted key strings or buffers, or an array of objects in the form {pem:
"path/to/keyFile"
Cert chains in PEM format. One cert chain should be provided per private key. Each cert chain should consist of the PEM formatted certificate for a provided private key, followed by the PEM formatted intermediate certificates (if any), in order, and not including the root CA (the root CA must be pre-known to the peer, see ca). When providing multiple cert chains, they do not have to be in the same order as their private keys in key. If the intermediate certificates are not provided, the peer will not be able to validate the certificate, and the handshake will fail.
"path/to/certFile"
If true the server will request a certificate from clients that connect and attempt to verify that certificate. Defaults to false.
true
false
Dictates which files get compiled into the build program (.sas), used to deploy services into SAS 9 or Viya environments (without a client/secret). You may use this config to include build specific macros, programs or macro variables - which is run a single time, on deployment - for things like database creation, or exporting a SAS 9 SPK after service creation.
{
"initProgram": "build/buildinit.sas",
"termProgram": "build/buildterm.sas",
"macroVars": {
"name": "value",
"numvar": "42"
},
"buildOutputFileName": "buildpack.sas"
}
The name of the generated .sas program, which can be used to deploy the app using only SAS Studio. By default, this will be the name of the target.
"viya.sas"
"sas9.sas"
The path to a .sas program that will be inserted at the start of the build .sas program (created when running sasjs build
).
The path to a .sas program that will be inserted at the end of the build .sas program (created when running sasjs build
).
The deployConfig object enables settings that relate to the deployment of a SAS app - be that Viya, or SAS 9, or a pure Base environment.
{
"deployScripts": [
"build/deployscript.sh"
]
}
{
"deployScripts": [
"build/deployscript.sh"
],
"deployServicePack": true
}
These scripts are executed when running sasjs deploy
. If the file is a .sas file, it is executed on the SAS server (Viya only). Otherwise it is executed locally. These scripts are run AFTER the deployment of the servicepack, if deployServicePack:true
(Viya only).
[
"build/deployscript.sh",
"build/myprogram.sas"
]
If set to true
the json pack produced by sasjs build
will be auto-deployed to the appLoc
of the specified target (creating all jobs and services in the SAS folder tree). Currently only Viya is supported for this flag.
The serviceConfig object defines how SASjs web services are compiled. Web services differ from jobs in that they include some fixed pre-code (eg the macros to stream out the result json).
{
"serviceFolders": [
"services/common",
"services/admin"
],
"initProgram": "build/serviceinit.sas",
"termProgram": "build/serviceterm.sas",
"macroVars": {
"mac1": "value",
"mac2": "42"
}
}
When running sasjs compile
, all programs in the folders defined in this array are compiled and placed into same-named folders under sasjsbuild/services
. They will be compiled as services (so, with the service pre-code). Folders can be absolute, or relative to the sasjs
folder.
[
"services/common",
"services/admin"
]
The serviceConfig initProgram
is a .sas file that is inserted at the start of every SAS service (after compiled macros and any macroVars
, and before the service itself).
"build/serviceinit.sas"
The serviceConfig termProgram is inserted at the end of every service as part of sasjs compile
.
"build/serviceterm.sas"
This object allows sasjs compile
to insert specific macro variables at the start of every service. In this case, the code generated would be:
%let mac1=value;
%let mac2=42;
{
"mac1": "value",
"mac2": "42"
}
The jobConfig object defines how SASjs Jobs are compiled.
{
"jobFolders": [
"jobs/extract",
"jobs/load"
],
"initProgram": "jobs/jobinit.sas",
"termProgram": "jobs/jobterm.sas",
"macroVars": {
"mac1": "value",
"mac2": "42"
}
}
When running sasjs compile
, all programs in the local folders defined in this array are compiled and placed into same-named folders under sasjsbuild/jobs
. Folders can be absolute, or relative to the local project /sasjs
folder.
[
"jobs/extract",
"jobs/transform",
"jobs/load"
]
The jobConfig initProgram
is a local .sas file that is inserted at the start of every SAS Job (after compiled macros and any macroVars
, and before the Job itself).
"jobs/jobinit.sas"
The jobConfig termProgram is inserted at the end of every Job as part of sasjs compile
.
"jobs/jobterm.sas"
This object allows sasjs compile
to insert specific macro variables at the start of every Job. In this case, the code generated would be:
%let mac1=value;
%let mac2=42;
{
"mac1": "value",
"mac2": "42"
}
SASjs allows a local web app to be compiled such that all html, css, javascript, and other assets such as png or mp4 are converted into web services and streamed directly from SAS.
This approach is convenient as it bypasses the need to deploy to a web server.
{
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "webv",
"webSourcePath": "dist",
"streamLogo": "logo.png"
}
An array of local folders. All assets placed in these folders are converted into web services - example file types could be png, svg, mp3, mp4, excel - anything really.
No Additional Items[
"/myassets"
]
Provide the location of a square image, under the webSourcePath. Used as the display icon on the appStream page.
"logo.png"
"favicon.ico"
When set to true
, frontend files saved in the webSourcePath
will be converted to streaming services in the streamWebFolder
in SAS.
true
This is the target SAS folder (relative to the appLoc) where the compiled web assets will be created.
Active when streamConfig
is true
. Is the source (or build, or dist) LOCAL folder, relative to the sasjs
folder, which contains the frontend to be deployed. All assets (PNG, JS, CSS, HTML etc) are taken from here and converted to streaming services in streamWebFolder
. In Viya and SAS 9, any relative URLS will be modified such that the links still work and the assets still load.
"dist"
"build"
The name of the service containing the index.html
for a streaming web app. Defaults to clickme
and is always deployed under the appLoc/services SAS Folder.
Create tests for Macros, Services & Jobs by simply adding a '.test.sas' extension.
The testConfig initProgram
is a local .sas file that is inserted at the start of every Test (after compiled macros and any macroVars
, and before the Test itself).
"sasjs/tests/testinit.sas"
The testConfig termProgram is inserted at the end of every Test as part of sasjs compile
.
"jobs/jobterm.sas"
This object allows sasjs compile
to insert specific macro variables at the start of every Test. In this case, the code generated would be:
%let mac1=value;
%let mac2=42;
{
"mac1": "value",
"mac2": "42"
}
This program is the first to execute as part of 'sasjs test'. It does not contain the testInit, testTerm or macroVariables. It IS compiled.
"sasjs/tests/testsetup.sas"
The last program to execute as part of 'sasjs test'.
"sasjs/tests/testteardown.sas"
These local folders are searched for SAS Macros when running sasjs compile
. Folders are relative to the sasjs/sasjsconfig.json
file.
[
"macros",
"../../more_macros"
]
These local folders are searched for SAS Programs when running sasjs compile
. Folders are relative to the sasjs/sasjsconfig.json
file.
[
"programs",
"../../more_programs"
]
The contents of this folder are simply copied to the sasjsbuild directory AFTER the rest of the project is compiled. Useful for synchronising random / generic content with SAS logical folders.
Maps the local filesystem to remote (SAS) physical directories.
No Additional Items[
{
"local": "C:\\temp\\local\\fs1",
"remote": "/opt/data/fs1"
},
{
"local": "C:\\temp\\elsewhere",
"remote": "/opt/somewhere"
}
]
A target is an alias for a deployment location, and includes at a minimum, the serverUrl
, serverType
and appLoc
. This array allows multiple targets to be defined (eg dev / test / prod). Any properties defined here will override same-named properties in the sasjsconfig root.
A target provides the configuration specific to a particular deployment, eg DEV / TEST, or SAS9 / SASVIYA.
{
"name": "viya",
"serverType": "SASVIYA",
"serverUrl": "https://sas.sasjs.com",
"appLoc": "/Public/app",
"contextName": "SAS Job Execution compute context",
"buildConfig": {
"buildOutputFileName": "myviyadeploy.sas",
"initProgram": "build/buildinitviya.sas",
"termProgram": "targets/viya/viyabuildterm.sas",
"macroVars": {
"name": "viyavalue",
"extravar": "this too"
}
},
"deployConfig": {
"deployServicePack": true,
"deployScripts": [
"sasjsbuild/myviyadeploy.sas"
]
},
"serviceConfig": {
"serviceFolders": [
"targets/viya/services/admin"
],
"initProgram": "build/serviceinit.sas",
"termProgram": "build/serviceinit.sas",
"macroVars": {
"name": "viyavalue",
"extravar": "this too"
}
},
"jobConfig": {
"jobFolders": [],
"initProgram": "",
"termProgram": "",
"macroVars": {}
},
"streamConfig": {
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "webv",
"webSourcePath": "dist"
},
"testConfig": {
"initProgram": "sasjs/tests/testinit.sas",
"termProgram": "sasjs/tests/testterm.sas",
"macroVars": {
"testVar": "testValue"
},
"testSetUp": "sasjs/tests/testsetup.sas",
"testTearDown": "sasjs/tests/testteardown.sas"
},
"macroFolders": [
"targets/viya/macros"
],
"programFolders": []
}
A target name can only contain alphanumeric characters and dashes. It cannot contain spaces. It is used as the alias when referencing the target using the -t
attribute in many of the SASjs commands.
"viya"
The serverType can be either SAS9, SASVIYA or SASJS.
"SASVIYA"
The appLoc provides the root SAS folder location under which all jobs and services are deployed and executed. The SAS folder could be metadata in SAS 9, or SAS Drive in Viya.
"/Public/app"
These local folders are searched for Binary Files when running sasjs compile. Folders are relative to the sasjs/sasjsconfig.json file.
No Additional Items[
"binaries",
"../../more_binaries"
]
Dictates which files get compiled into the build program (.sas), used to deploy services into SAS 9 or Viya environments (without a client/secret). You may use this config to include build specific macros, programs or macro variables - which is run a single time, on deployment - for things like database creation, or exporting a SAS 9 SPK after service creation.
{
"initProgram": "build/buildinit.sas",
"termProgram": "build/buildterm.sas",
"macroVars": {
"name": "value",
"numvar": "42"
},
"buildOutputFileName": "buildpack.sas"
}
The name of the generated .sas program, which can be used to deploy the app using only SAS Studio. By default, this will be the name of the target.
"viya.sas"
"sas9.sas"
The path to a .sas program that will be inserted at the start of the build .sas program (created when running sasjs build
).
The path to a .sas program that will be inserted at the end of the build .sas program (created when running sasjs build
).
The name of the compute context used to execute SAS code. The context determines the way in which the SAS session is spawned (eg user credentials, autoexec code, system options etc).
Contexts can be created / modified / deleted using the sasjs context
command.
"SAS Job Execution compute context"
The deployConfig object enables settings that relate to the deployment of a SAS app - be that Viya, or SAS 9, or a pure Base environment.
{
"deployScripts": [
"build/deployscript.sh"
]
}
{
"deployScripts": [
"build/deployscript.sh"
],
"deployServicePack": true
}
These scripts are executed when running sasjs deploy
. If the file is a .sas file, it is executed on the SAS server (Viya only). Otherwise it is executed locally. These scripts are run AFTER the deployment of the servicepack, if deployServicePack:true
(Viya only).
[
"build/deployscript.sh",
"build/myprogram.sas"
]
If set to true
the json pack produced by sasjs build
will be auto-deployed to the appLoc
of the specified target (creating all jobs and services in the SAS folder tree). Currently only Viya is supported for this flag.
Configure https agent by setting all supported attribute such as key
, cert
, ca
, rejectUnauthorized
and requestCert
{
"allowInsecureRequests": false,
"caPath": "path/to/caFile",
"keyPath": "path/to/keyFile",
"certPath": "path/to/certFile",
"requestCert": false,
"rejectUnauthorized": true
}
If you are having certificate errors connecting to SAS, that cannot be properly resolved, try setting this value to true. This option only has an effect if rejectUnauthorized is not present.
true
false
Optionally override the trusted CA certificates. Default is to trust the well-known CAs curated by Mozilla. Mozilla's CAs are completely replaced when CAs are explicitly specified using this option.
"path/to/caFile"
Private keys in PEM format. PEM allows the option of private keys being encrypted. Encrypted keys will be decrypted with options.passphrase. Multiple keys using different algorithms can be provided either as an array of unencrypted key strings or buffers, or an array of objects in the form {pem:
"path/to/keyFile"
Cert chains in PEM format. One cert chain should be provided per private key. Each cert chain should consist of the PEM formatted certificate for a provided private key, followed by the PEM formatted intermediate certificates (if any), in order, and not including the root CA (the root CA must be pre-known to the peer, see ca). When providing multiple cert chains, they do not have to be in the same order as their private keys in key. If the intermediate certificates are not provided, the peer will not be able to validate the certificate, and the handshake will fail.
"path/to/certFile"
If true the server will request a certificate from clients that connect and attempt to verify that certificate. Defaults to false.
true
false
The serverUrl is the location to which the app is deployed, and against which any server based operations are performed. If SAS is served from a particular port, that port should also be included here.
"https://sas.sasjs.com"
"https://sas.sasjs.com:8080"
The serviceConfig object defines how SASjs web services are compiled. Web services differ from jobs in that they include some fixed pre-code (eg the macros to stream out the result json).
{
"serviceFolders": [
"services/common",
"services/admin"
],
"initProgram": "build/serviceinit.sas",
"termProgram": "build/serviceterm.sas",
"macroVars": {
"mac1": "value",
"mac2": "42"
}
}
When running sasjs compile
, all programs in the folders defined in this array are compiled and placed into same-named folders under sasjsbuild/services
. They will be compiled as services (so, with the service pre-code). Folders can be absolute, or relative to the sasjs
folder.
[
"services/common",
"services/admin"
]
The serviceConfig initProgram
is a .sas file that is inserted at the start of every SAS service (after compiled macros and any macroVars
, and before the service itself).
"build/serviceinit.sas"
The serviceConfig termProgram is inserted at the end of every service as part of sasjs compile
.
"build/serviceterm.sas"
This object allows sasjs compile
to insert specific macro variables at the start of every service. In this case, the code generated would be:
%let mac1=value;
%let mac2=42;
{
"mac1": "value",
"mac2": "42"
}
The jobConfig object defines how SASjs Jobs are compiled.
{
"jobFolders": [
"jobs/extract",
"jobs/load"
],
"initProgram": "jobs/jobinit.sas",
"termProgram": "jobs/jobterm.sas",
"macroVars": {
"mac1": "value",
"mac2": "42"
}
}
When running sasjs compile
, all programs in the local folders defined in this array are compiled and placed into same-named folders under sasjsbuild/jobs
. Folders can be absolute, or relative to the local project /sasjs
folder.
[
"jobs/extract",
"jobs/transform",
"jobs/load"
]
The jobConfig initProgram
is a local .sas file that is inserted at the start of every SAS Job (after compiled macros and any macroVars
, and before the Job itself).
"jobs/jobinit.sas"
The jobConfig termProgram is inserted at the end of every Job as part of sasjs compile
.
"jobs/jobterm.sas"
This object allows sasjs compile
to insert specific macro variables at the start of every Job. In this case, the code generated would be:
%let mac1=value;
%let mac2=42;
{
"mac1": "value",
"mac2": "42"
}
SASjs uses doxygen to auto-generate HTML documentation using the headers in your SAS programs, macros, services & jobs. For more info, see https://cli.sasjs.io/doc. Some properties are taken from package.json (such as the project Name).
{
"displayMacroCore": true,
"outDirectory": "/some/output/directory",
"dataControllerUrl": "https://mysasserver.com/web/datacontroller/#",
"enableLineage": true,
"doxyContent": {
"readMe": "../../my/custom/homepage.md",
"path": "my/custom/doxy/folder"
}
}
The CLI will autocompile macro dependencies that exist in the SASjs Macro Core library. These will also show in the documentation under 'node_modules'. If you'd prefer not to show these in the rendered docs, set this value to false.
true
The location to which the generated HTML SAS documentation is written. If missing, or left blank, the files will be written to the sasjsbuild/doc
directory (default behaviour).
"/my/preferred/docs/directory"
Provide the full URL to Data Controller so that sasjs doc
can link the lineage diagram directly to the table viewer in Data Controller.
If left blank, or undefined, no links will be generated.
"https://yourserver.co.uk/dcviya/#"
If true, sasjs doc will generate and display Data Lineage from Jobs and Services.
Configuration of the Doxyfile variables
{
"favIcon": "favicon.ico",
"footer": "new_footer.html",
"header": "new_header.html",
"layout": "DoxygenLayout.xml",
"logo": "logo.png",
"readMe": "../../README.md",
"stylesheet": "new_stylesheet.css",
"path": "sasjs/doxy"
}
The favicon used in the doxygen documentation
The header HTML file used in the doxygen documentation
The layout XML file used to build the doxygen documentation
The logo file used by doxygen
The file used to generate the doxygen homepage (defaults to the readme.md)
The CSS file used to extend Doxygen
The path to the Doxygen configuration files (relative to sasjs/sasjsconfig.json)
SASjs allows a local web app to be compiled such that all html, css, javascript, and other assets such as png or mp4 are converted into web services and streamed directly from SAS.
This approach is convenient as it bypasses the need to deploy to a web server.
{
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "webv",
"webSourcePath": "dist",
"streamLogo": "logo.png"
}
An array of local folders. All assets placed in these folders are converted into web services - example file types could be png, svg, mp3, mp4, excel - anything really.
No Additional Items[
"/myassets"
]
Provide the location of a square image, under the webSourcePath. Used as the display icon on the appStream page.
"logo.png"
"favicon.ico"
When set to true
, frontend files saved in the webSourcePath
will be converted to streaming services in the streamWebFolder
in SAS.
true
This is the target SAS folder (relative to the appLoc) where the compiled web assets will be created.
Active when streamConfig
is true
. Is the source (or build, or dist) LOCAL folder, relative to the sasjs
folder, which contains the frontend to be deployed. All assets (PNG, JS, CSS, HTML etc) are taken from here and converted to streaming services in streamWebFolder
. In Viya and SAS 9, any relative URLS will be modified such that the links still work and the assets still load.
"dist"
"build"
The name of the service containing the index.html
for a streaming web app. Defaults to clickme
and is always deployed under the appLoc/services SAS Folder.
Maps the local filesystem to remote (SAS) physical directories.
No Additional Items[
{
"local": "C:\\temp\\local\\fs1",
"remote": "/opt/data/fs1"
},
{
"local": "C:\\temp\\elsewhere",
"remote": "/opt/somewhere"
}
]
The contents of this folder are simply copied to the sasjsbuild directory AFTER the rest of the project is compiled. Useful for synchronising random / generic content with SAS logical folders.
Create tests for Macros, Services & Jobs by simply adding a '.test.sas' extension.
The testConfig initProgram
is a local .sas file that is inserted at the start of every Test (after compiled macros and any macroVars
, and before the Test itself).
"sasjs/tests/testinit.sas"
The testConfig termProgram is inserted at the end of every Test as part of sasjs compile
.
"jobs/jobterm.sas"
This object allows sasjs compile
to insert specific macro variables at the start of every Test. In this case, the code generated would be:
%let mac1=value;
%let mac2=42;
{
"mac1": "value",
"mac2": "42"
}
This program is the first to execute as part of 'sasjs test'. It does not contain the testInit, testTerm or macroVariables. It IS compiled.
"sasjs/tests/testsetup.sas"
The last program to execute as part of 'sasjs test'.
"sasjs/tests/testteardown.sas"
These local folders are searched for SAS Macros when running sasjs compile
. Folders are relative to the sasjs/sasjsconfig.json
file.
[
"macros",
"../../more_macros"
]
These local folders are searched for SAS Programs when running sasjs compile
. Folders are relative to the sasjs/sasjsconfig.json
file.
[
"programs",
"../../more_programs"
]
The name of the folder containing the compiled output. The sasjs build
command will take all of the subfolders here as inputs to create the build pack. By default this will be named sasjsbuild
. In global, the default is ~/.sasjsbuild
.
"sasjsbuild"
".sasjsbuild"
The name of the folder containing the output (eg logs, ODS output) from sasjs run
. By default this will be named sasjsresults
. In global, the default is ~/.sasjsresults
.
"sasjsresults"
".sasjsresults"
[
{
"name": "sas9target",
"serverType": "SAS9",
"serverUrl": "https://mysas9server",
"appLoc": "/Shared Folders/myApp"
}
]
[
{
"name": "viya",
"serverType": "SASVIYA",
"serverUrl": "https://sas.sasjs.com",
"appLoc": "/Public/app",
"contextName": "SAS Job Execution compute context",
"buildConfig": {
"buildOutputFileName": "myviyadeploy.sas",
"initProgram": "build/buildinitviya.sas",
"termProgram": "targets/viya/viyabuildterm.sas",
"macroVars": {
"name": "viyavalue",
"extravar": "this too"
}
},
"deployConfig": {
"deployServicePack": true,
"deployScripts": [
"sasjsbuild/myviyadeploy.sas"
]
},
"serviceConfig": {
"serviceFolders": [
"targets/viya/services/admin"
],
"initProgram": "build/serviceinit.sas",
"termProgram": "build/serviceinit.sas",
"macroVars": {
"name": "viyavalue",
"extravar": "this too"
}
},
"streamConfig": {
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "webv",
"webSourcePath": "dist"
},
"testConfig": {
"initProgram": "sasjs/tests/testinit.sas",
"termProgram": "sasjs/tests/testterm.sas",
"macroVars": {
"testVar": "testValue"
},
"testSetUp": "sasjs/tests/testsetup.sas",
"testTearDown": "sasjs/tests/testteardown.sas"
},
"macroFolders": [
"targets/viya/macros"
]
},
{
"name": "sas9",
"serverType": "SAS9",
"serverUrl": "https://sas.sasjs.com:7980",
"appLoc": "/User Folders/&sysuserid/My Folder",
"serverName": "Foundation",
"repositoryName": "SASApp",
"buildConfig": {
"buildOutputFileName": "mysas9deploy.sas",
"initProgram": "",
"termProgram": "",
"macroVars": {}
},
"deployConfig": {
"deployScripts": [
"build/deploysas9.sh"
],
"deployServicePack": false
},
"serviceConfig": {
"serviceFolders": [
"targets/sas9/services/admin"
],
"initProgram": "",
"termProgram": "build/servicetermother.sas",
"macroVars": {}
},
"streamConfig": {
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "web9",
"webSourcePath": "dist"
},
"testConfig": {
"initProgram": "sasjs/tests/testinit.sas",
"termProgram": "sasjs/tests/testterm.sas",
"macroVars": {
"testVar": "testValue"
},
"testSetUp": "sasjs/tests/testsetup.sas",
"testTearDown": "sasjs/tests/testteardown.sas"
},
"macroFolders": [
"targets/sas9/macros"
],
"programFolders": []
}
]