sasjs run command enables developers to submit SAS code for execution from the commandline.
sasjs run <sourcecode> [additional arguments]
Additional arguments may include:
-t) - the target environment in which to deploy the services. If not specified, default target will be used, mentioned in
sasjsconfig.json. The target can exist either in the local project configuration or in the global
This will create a session and execute some SAS code. The log will be returned as a file in the current directory. The source file must have a ".sas" extension.
Note - an additional variable macro variable will be added by the adapter, with the value of the target appLoc and the filename (equivalent to
%let _program=/My/AppLoc/runfilename.sas;). This is actually added as a session variable, so will not be visible in the logs.
sasjs run somecode.sas -t target
# create minimal SAS program cat > ./somecode.sas <<'EOL' %put hello from SASjs; EOL # run the SAS code on the target sasjs run somecode.sas -t myTarget
We plan to support the following:
- keeping sessions alive
- directing log output
- extracting items from the session
If there are items you are looking for, or have problems / ideas, do raise an issue.