Allan Bowe · @allan
0 followers · 35 posts · Server social.4gl.io

Develop on one flavour - deploy to three!

1.
2. SAS 9 EBI
3. SASjs Server

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.

core.sasjs.io/dir_fbd73da3281f

#SAS #sasviya #SASjs

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 34 posts · Server social.4gl.io

As a 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

Using EITHER the CLI or VS Code Extension you can synchronise one or more local directories with a remote filesystem

Works on all flavours of SAS, and 100% MIT open source

youtube.com/watch?v=bEX7QjHeON

#sasviya #SASjs #SAS

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 33 posts · Server social.4gl.io

4 ways to generate in

1. DI Studio in SAS 9 EBI
2. Data Studio in Viya
3. Log Scanners
4. 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!

youtube.com/watch?v=Sb1DqTLgVy

#datalineage #SAS #SASjs

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 30 posts · Server social.4gl.io

With your client terminal can execute 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!

communities.sas.com/t5/SAS-Hac

#SASjs #SAS #sasviya #sashackathon #sasadmin

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 27 posts · Server social.4gl.io

Data Controller for SAS® works on Base SAS!

Thanks to Server - an open source REST API for SAS - you can run on desktop or your SAS Foundation server.

is actually lightning quick in this mode!

Do you run Foundation ? Looking to improve your ?

Data Controller is free for 5 users. Also available on SAS EBI (Stored Processes) and (3.5 or 4).

PM for details

vid.4gl.io/w/auvPGmR5A3pgJVqFS

#SASjs #DataController #SAS #datagovernance #viya

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 26 posts · Server social.4gl.io

If you are a 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 , but could just as easily be SAS 9 EBI, or even Foundation SAS running @sasjs/server.

medium.com/swlh/building-an-ht

#SAS #viya #SASjs #javascript #js

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 22 posts · Server social.4gl.io

3 new Macros (and associated tests) have been added to the 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 repo, filtered by default for the current branch

PR below with all the gory details

github.com/sasjs/core/pull/319

#SAS #SASjs #git

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 21 posts · Server social.4gl.io

Did you know you can generate HTML docs directly from Program headers, using & ?

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

Docs: cli.sasjs.io/doc/

youtube.com/watch?v=ESNdCtXKRr

#SAS #SASjs #doxygen

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 20 posts · Server social.4gl.io

If you're a 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 DevOps framework

Hope to see you there!

meetup.com/sas-user-group-germ

#SAS #SASjs

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 19 posts · Server social.4gl.io

Lint is also a Formatter - it can update your 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

github.com/sasjs/lint#defaulth

#SASjs #SAS

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

Server provides a REST API over Base .

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

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

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!

vid.4gl.io/w/kHpsndp57HpiGVDyM

#SASjs #foss #SAS

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

A missing 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 adapter, and the functionality is available since version 4 of Data Controller for SAS®!

#SAS #SASjs

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

We just reached a milestone with Server 🥳 🥳

LDAP Authentication!

server.sasjs.io/auth

No more manually configuring new users / groups - you can now pull them from your central auth provider.

We give full thanks and credit to the team at (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.

#SASjs #SAS #ldapjs

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

Testing Tips for SAS App Developers

🧪 Use a framework! eg cli.sasjs.io/test
🧪 Leverage assertion macros, eg core.sasjs.io/mp__assertscope_
🧪 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

Server lets you mock responses, which is flexible and very FAST.

How do YOU test your SAS?

#SASjs #SAS

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

Build Apps on Base - with 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.

server.sasjs.io/api/index.html

#SAS #SASjs

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

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!

vid.4gl.io/w/sTXCLSwCPBMdefhn1

#SAS #r #SASjs

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

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.

core.sasjs.io/mp__hashdirector

#SAS #viya #SASjs

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

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)

#SAS #SASjs #viya

Last updated 2 years ago

Allan Bowe · @allan
0 followers · 17 posts · Server social.4gl.io

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

eventbrite.com/e/using-sasjs-t

#SAS #SASjs #viya

Last updated 2 years ago