align:right

Modernising Legacy SAS Applications

If I go too fast:

align:right

Who We Are

  • UK Company
  • SAS Subcontractor
  • Focus on SAS Solutions
align:right

Services

  • Modernisation (AF/SCL + SAS/Intrnet)
  • Migration (STP web apps to Viya)
  • Manifestation
  • Support
align:right

Projects

  • 400 user AF/SCL modernisation, 8 months, Allianz UK
  • AF/SCL Data Management system, 8 months, UK Gov Dept
  • Demand Planning Tool, 3 months, Der Touristik (Germany)
  • SOAP Interface to Viya, 3 weeks, SKR (Sweden)

Plus many more

align:right

Products

Data Controller for SAS® SASensei SASjs

Angular

React

Typescript

Plus SCL Transcoding Kit

align:right

AF/SCL Apps

❌ AF + SCL
❌ Catalog Centric
❌ Manual Deployment

align:right

Web Apps

✅ JS + SAS
✅ GIT / DB Centric
✅ Continuous Integration

align:right

Project Concerns #1

Topic Suffering Prognosis
Inertia ❌ App worked fine for decades. Why change it? ✅ Vastly superior UX and lower maintenance / upgrade costs
Resource Availability ❌ We're all super busy and the developer quit in 1999. ✅ Code review + carefully planned video interviews for minimal customer impact
align:right

Project Concerns #2

Topic Suffering Prognosis
Scope Uncertainty ❌ The complexity will cost us 💰💰💰 and take ⏱️⏱️⏱️ ✅ Phase 0 estimation + regular (functional) deliveries
House of Cards ❌ Our data is sensitive, our infrastructure is brittle - systems access is difficult to obtain ✅ Deliver offsite with sample data, deploy onsite to new environment
align:right

4GL Apps Project Approach

  • PreSales
  • Delivery
  • Aftercare
align:right

4GL Apps Project Approach

PreSales

  • Preparation (code/doc review, exploratory interviews)
  • Initial Proposal (as is, to be, rough estimates)
align:right

Delivery

  • Phase 0 (confirm estimates, scope, initial env setup + interface, fixed price)
  • Phase 1-N (functional deliveries + docs + tests with each milestone)
align:right

4GL Apps Project Approach

Aftercare

  • Testing & Warranty (X days over X months)
  • Training
  • Ongoing Support & Maintenance (IF preferred vendor)
align:right

Documentation

Continuously delivered - NOT at the end of the project

align:right

End Result

A user-friendly, accessible, modern UI that can:

  • run on both Viya and EBI
  • be maintained by generic frontend / backend developers
  • be maintained by the client, or any vendor (not just 4GL Apps)
align:right

Tools

  • SASjs (DevOps for SAS) - Open Source
  • Data Controller (controlled data ingestion)
    • Resulted in a 30% cost saving (~3 months) on DWP project
  • SCL Transcoding Kit (re-use of SCL logic, where necessary)
align:right
       SCL

SCL Kit

Functions

align:right

SCL Kit

Submit Blocks

align:right

SCL Kit

Object Methods

align:right

SCL Kit

Method Blocks

align:right

SCL Kit

After / Before

align:right

SAS/FSP

  • FSBROWSE: View one record at a time
  • FSEDIT: Edit one record at a time
  • FSVIEW: View or edit a table of data

Much of the above functionality is available in Data Controller for SAS®. The remaining parts are fairly trivial to build as standalone web apps.

align:right

What is Data Controller?

  • Controlled Data Capture
  • Governance
  • Exploration

Designed for Regulated Industries

align:right

Why use Data Controller?

  • Eliminate entire Design/Dev/Test/Promote resource cost
  • Ingest 'invisible' data into SAS (silos, EUCs)
  • Automatic Data Quality at source
  • Showcase Lineage (SAS9)
align:right

Data Controller Demo

align:right

SASjs

The DevOps Framework for SAS Apps

align:right

Why use SASjs?

  • Maintain velocity as complexity increases
  • Faster, higher quality iterations
  • Rapid on-boarding 🧍🧍🧍
align:right

What is SASjs?

An Opinionated Approach to SAS Solution Development

  • Modular vs Monolithic
  • Local vs Remote Development
  • IDE vs GUI

Enables continuous deployment and test-driven, GIT-native development

align:right

SASjs Workflow

align:right

SASjs Tools

align:right

SASjs Stats

  • ~ 55k downloads
  • ~ 20 contributors
  • 35 Repositories
align:right

SASjs Core

  • ~250 macros for application development
  • Documentation + Tests
  • Base SAS, Viya, Metadata, SASjs Server, FCMP, LUA

https://core.sasjs.io

align:right

SASjs Server - Use Cases for Viya Apps

  • Portal for secure / organised frontend deployment
  • Create mocked Stored Programs in JS, Python or R
    • Build frontend / run pipelines, where SAS unavailable
  • Build on Base SAS / Deploy to Viya

https://server.sasjs.io

align:right

SASjs Adapter

Authentication & Communication

align:right

SASjs VS Code Extension

FOSS - VS Codium and Theia support. Key Features:

  • Code Execution in all flavours of SAS
  • Code Documentation (sasjs doc)
  • Directory Synchronisation (sasjs fs sync)
  • Linting and Formatting (sasjs lint)
align:right

sasjs doc

  • Doc-Site from SAS Headers
  • DoxyConfig Manager
  • Lineage

Both CLI and VS Code Extension

Demo: xieliaing and jobs (for lineage)

align:right

sasjs lint

  • Configurable severity level (ERROR / WARNING)
  • Use in GIT HOOK or pipeline
  • 16 rules / settings and counting

Both CLI and VS Code Extension

Demo: jobs

align:right

SASjs CLI - Execution

  • sasjs run > Execute arbitrary SAS code
  • sasjs job execute > Run a Job
  • sasjs flow execute > Run a collection of Jobs

Requires authentication - let's look at deployment first

align:right

sasjs cbd (compile, build, deploy)

  • Run the same project on different server types
  • Eliminate need for physical directories (SASAUTOS)
  • Package frontend as streaming app

Demo - Mario, React

align:right

SASjs Primary Artefacts

Type I/O Returns
Job Data Inputs / Outputs Success / Error
Service Web Inputs / Outputs JSON / Other Content Types
Test N/A Pass / Fail Object

Services & Tests are compiled with %webout() macros, for generating JSON in SASjs format. See also: https://cli.sasjs.io/artefacts/

align:right

SASjs Secondary Artefacts

These items are bundled into each Primary Artefact when listed in the program header:

  • SAS Macros - one macro per file, lowercase filenames
  • SAS Includes - sas snippets, fcmp, lua, datalines, ddl etc
  • Binary Files - excel, pdf, images, mp3, mp4, zip
  • initProgram - executes before the Job / Service / Test
  • termProgram - executes after the Job / Service / Test
align:right

SASjs Config File

Every SASjs Project has a sasjs/sasjsconfig.json file, for configuration of:

  • Primary / Secondary Artefact folders
  • Macro Variables
  • Target attributes / connection settings
align:right

🎯 SASjs Target 🎯

A location on a SAS server

Core attributes:

  • name > Alias for SASjs commands, eg: sasjs deploy -t dev3
  • serverUrl > Protocol + Host + Port
  • serverType > either SASVIYA, SAS9 or SASJS
  • appLoc > Root deployment folder in SAS Drive or Metadata
align:right

sasjs cbd Syntax

  • sasjs compile: Self-contained Jobs, Services, Tests
  • sasjs build: Deployment pack (JSON / SAS Program)
  • sasjs deploy: Send to target

Compile/Build/Deploy project to myTarget: sasjs cbd -t mytarget

align:right

Running Tests

align:right

sasjs test Syntax

Execute all tests (default target): sasjs test

Execute tests in "macros" folder: sasjs test /macros/

Prevent pipeline fail: sasjs test --ignoreFail

Execute all tests starting with "mv_" and save the output in 'myresults' folder

sasjs test mv_ --outDirectory /somedir/myresults

align:right

Resources

align:right

AF/SCL Resources

align:right

Contact

📅 https://4gl.io/cal
💬 https://4gl.io/chat
🎺 https://4gl.io/social
🔗 https://www.linkedin.com/in/allanbowe

npx @marp-team/marp-cli slides/fans23.md -o fans23/index.html --html=true

a bit about my background

How we do it, replace frontend, re-use backend as stateless services

Each project has improved SASjs and Data Controller

_Open source Mid-Tier & REST API over Foundation SAS_ LDAP, Permissions, Users & Groups, Stored Programs etc