Develop on one #SAS flavour - deploy to three!
1. #SASViya
2. SAS 9 EBI
3. SASjs Server
#SASjs is mostly TypeScript but there is one SAS Language library - @sasjs/core.
Each macro has a prefix - eg:
- Viya: `mv_*`
- SAS 9: `mm_*`
- Base: `mf_*` & `mp_*`
Cross Platform macros are prefixed `mx_*`:
* mx_createwebservice -> create web ready Job / STP
* mx_getcode -> fetch source code from Job / STP
* mx_testservice -> test a web service from a SAS session
Docs below.
https://core.sasjs.io/dir_fbd73da3281f521ea3654e12eb2e19c2.html
As a #SASViya developer, how do you get your local files onto a remote SAS server?
🗄️ - Right click / upload to Studio is a manual approach
🗄️ - SSH is ideal if your admin / firewall allow it
🗄️ - Bouncing files via GIT is a gross misuse, but it works
For everyone else - there's #SASjs
Using EITHER the CLI or VS Code Extension you can synchronise one or more local directories with a remote #SAS filesystem
Works on all flavours of SAS, and 100% MIT open source
4 ways to generate #datalineage in #SAS
1. DI Studio in SAS 9 EBI
2. Data Studio in Viya
3. Log Scanners
4. #SASjs Doc
There are many firms working on option 3 (ourselves included) however option 4 is a great solution if you'd like quick and TIDY results!
To implement - just set the relevant program headers and run `sasjs doc` or click the "docs" button in the SASjs VS Code Extension.
No SAS required - it works purely on SAS program logic!
With #SASjs your client terminal can execute #SAS code:
-> On Viya, EBI, or Foundation Server
-> Without local SAS
-> Without SSH
The command is `sasjs run` and the article below shows how you can use it on a Viya 4 instance!
#SASjs #SAS #sasviya #sashackathon #sasadmin
Data Controller for SAS® works on Base SAS!
Thanks to #SASjs Server - an open source REST API for SAS - you can run on desktop or your SAS Foundation server.
#DataController is actually lightning quick in this mode!
Do you run Foundation #SAS ? Looking to improve your #DataGovernance ?
Data Controller is free for 5 users. Also available on SAS EBI (Stored Processes) and #Viya (3.5 or 4).
PM for details
#SASjs #DataController #SAS #datagovernance #viya
If you are a #SAS App developer making the foray into Web Development, this article will be of interest.
It explores the process of cloning / building / deploying an app with the bare minimum of dependencies - just @sasjs/adapter and @sasjs/core.
You will need a local instance of NPM and optionally, @sasjs/cli to build and deploy. The example is on #Viya, but could just as easily be SAS 9 EBI, or even Foundation SAS running @sasjs/server.
https://medium.com/swlh/building-an-html5-javascript-css-app-with-sasjs-4cdbdb7c466f
#SAS #viya #SASjs #javascript #js
3 new #SAS Macros (and associated tests) have been added to the #SASjs Core library!
1. `mf_readfile()` -> this macro function will read a file and return the first line. Can be used, eg: `%put %mf_readfile(/tmp/my.file);`
2. `mf_getgitbranch()` -> returns the current branch of a local GIT repository
3. `mp_gitlog()` -> creates a dataset with the full commit history of a #git repo, filtered by default for the current branch
PR below with all the gory details
Did you know you can generate HTML docs directly from #SAS Program headers, using #SASjs & #Doxygen?
You could do it with just Doxygen, but SASjs makes it MUCH easier as follows:
* Auto-generates Doxyfile
* Inserts template header / footer
* Placeholder logo / favicon
* Convert README into homepage
Extra Features:
- Generate GraphViz Data Lineage
- Generate docs for a specific SASjs target
- Redirect output to specific directory
If you're a #SAS user and can make Berlin next Thursday (24th) - come mingle with myself and others at this SAS User Group Germany event.
The topic is "Open Source" featuring Katja Glass who will be talking about the recent COSA hackathon.
I'll be following up with a session to cover the goodies available for you in the #SASjs DevOps framework
Hope to see you there!
https://www.meetup.com/sas-user-group-germany/events/289540889/
#SASjs Lint is also a Formatter - it can update your #SAS code both in VS Codium and the SASjs CLI (`sasjs lint fix`).
Formatting fixes include:
* Adding the macro name to the macro end statement
* Inserting a default program header
* Removing trailing spaces
Until recently, the program header was a default doxygen header.
Now, that default can be changed! You can auto-insert any header you wish - just update the `defaultHeader` property.
See the README for details
#SASjs Server provides a REST API over Base #SAS.
Clients are configured using authorization-code flow, as follows:
# Setup
An ADMIN task - a client is created with a specific CLIENT ID, CLIENT SECRET, Access Token Expiry, and Refresh Token Expiry.
# Workflow
The user visits the SASjs Logon page to authorise the CLIENT (using any of various auth providers, such as LDAP). Then, using the AUTH CODE, the local app can obtain the ACCESS and REFRESH tokens.
#SASjs #SAS #sascommunity #sasadmin #sasdeveloper
SAS Apps need to be Accessible.
This requires consideration of many items, including:
* Decent Font Sizes
* Alt Texts
* Appropriate use of colour
* Responsive UI
* Keyboard Shortcuts
We've been improving SASjs Server with regard to this last point, and you can now navigate SASjs Drive using arrow keys as well as mouse!
A missing #SAS numeric value is usually a full stop (`.`) - unless `options missing=` is set to something else.
It is also possible to have additional categories of missing - known as "special missings".
There are 27 of them, each a single character - an underscore (`_`) or letters A to Z.
So in total there are 28 different types of missing for numeric vars in SAS!
These are now supported in the #SASjs adapter, and the functionality is available since version 4 of Data Controller for SAS®!
We just reached a milestone with #SASjs Server 🥳 🥳
LDAP Authentication!
No more manually configuring new #SAS users / groups - you can now pull them from your central auth provider.
We give full thanks and credit to the team at #ldapjs (http://ldapjs.org) for making the underlying (MIT open source) library available.
SASjs Server is an MIT Open Source Web Server and REST API over regular Foundation SAS.
Testing Tips for SAS App Developers
🧪 Use a framework! eg https://cli.sasjs.io/test
🧪 Leverage assertion macros, eg https://core.sasjs.io/mp__assertscope_8sas.html
🧪 Run tests in a pipeline & check results before merging to main
🧪 Report on your test coverage
🧪 Test frontend functionality, using tools like Cypress
🧪 Test for accessibility, using tools like Lighthouse CI
#SASjs Server lets you mock #SAS responses, which is flexible and very FAST.
How do YOU test your SAS?
Build Apps on Base #SAS - with #SASjs Server.
It's a lightweight MIT open-source NodeJS mid-tier you can run on a $4 VPS.
Features include:
* SASjs Studio - with SAS, JS, Python, and R runtimes
* SASjs Stored Programs - saved jobs / web services
* SASjs AppStream - 1-click app deployment
* SASjs Drive - remote file storage
* Permissions / User & Groups
* Full REST API
SASjs Server works with the SASjs CLI, SASjs Adapter, SASjs VS Code Extension, and SASjs Core.
You can now run R programs on SASjs Server! Alongside Python, JS and SAS..
Here's a short screenplay running some arbitrary R and capturing both the log and some web output.
Web output is created by writing to the file referenced in the ._WEBOUT variable.
Save your R program to SASjs Drive and it becomes an instant web service, available over the SASjs APIs!
Have you ever wondered if a file has been modified in a directory?
One approach for change detection is to implement a git repo, but this requires the git tool, and the creation of a .git folder.
A more fundamental approach would be to hash every file and store the results.
The latest macro to hit the core library (mp_hashdirectory) does exactly that - recursively hashing every file in a directory and producing an output table with the results.
Features and Capabilities of SASjs:
💪 Structured Projects (maintain velocity as codebase grows)
💪 Self Documenting Jobs & Services (easier maintenance)
💪 Opinionated development approach (faster on-boarding)
💪 GIT-Native DevOps (parallel feature development)
💪 Self-contained apps (easy to deploy & migrate)
💪 '00s of SAS AppDev Macros (faster delivery)
💪 Automated Deployments (faster iterations)
💪 Quick-Start templates (faster sprint 0)
💪 Built-in Testing (avoid regressions)
The next SASjs training event is on Tues 27th Sep with 10 places available
Learn how to use SASjs to Compile, Build, Deploy, Test, and Document your SAS projects.
After the previous session we are making the following improvements:
* Time increased to 1hr 45 mins
* Includes 15 minute Mibo social
* A co-presenter for assistance
Entry is FREE for open source SAS developers, or anyone who donates (any amount) to the SASjs project. PM for details