{"componentChunkName":"component---src-templates-template-tsx","path":"/macro-dash","result":{"data":{"site":{"meta":{"title":"SAS Apps - Unleash Your Analytics","description":"Custom Interfaces to the world's most powerful Analytics Platform","siteUrl":"https://sasapps.io","author":"Allan Bowe","twitter":"","adsense":""}},"post":{"id":"4772795c-6554-50af-b555-d5955f262510","html":"<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 750px; margin-bottom: 1.0725rem;\"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 92.5531914893617%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAIAAAAf7rriAAAACXBIWXMAAAsSAAALEgHS3X78AAAC5UlEQVQ4y3WU23PSQBTGGUsICbmRkJBASLJJIKElUGqLkhLCpViBtlxqrdbL+OCDPvigz9ZxxvH/9izR2jp25jcnJ5vz7X672d1UzgxzZpex7oLCTPlhORiNl++IUjtnde9gbDDDFCjpSo/SY0rvZ/UIIqYcSTsrtX1ptC+K/ivWGFOVPl2JMWacswcYEIOyHE0bl2fbzxbBxcpbz+vnp7X1rPHyfPvF2l5N/edLe3mMFhN0NkHriTkc6X6kB0OhNk6xDjwiWjXpkpsrubTmYEo2rSJKQ1nVyqomJL8pIUpBpGDQSk3wJinWHbJWRHCIlj2qUEtI8y5xH0KVyLukvM0nYsY6FP2JEb7VH13pnReV7pucfkAIVkasZkT3P+SdrFL/LWbRISl5lLZHqbt0aY8u72flOlTcEUhVgNzEW2JnwFdH8EIVA6rYgA+EYN4ooZrEiZPmTYI3H7AWJBkBZZWNbQZFSvuZun+lHrwGYGRCsG8Mb3EIz7DgcVaXrPR6/V076GyJflb2k5GHnBND92AVmjJSLXGY4AQRW6xSip+vT8Xtk9LuXGmdZdUmicVPkgULt3Ia+Elzxm0I3vIH74zuK+3hRaG5VlrrNI8e0MU0q4MpvnaUYuxYbJxwTp93B3+I/0Z/KgWLQnMht1aF5hI2Bl/FTvP+UaExg+0ZGqPP7ukPZ/7dOdkwv803e/YVM8U4s2/29NqeXbuLn/LeJRZz1THnHcMcBP/pvdSngncsBstS+F5qriCH35Sijcdc7YkZf5AaZ5R+QFce3QeptfP1uXdyLQYLUtuFE5Wi9Y7UOg8W11rnDW3CiTv8B9h/4A6Wphy+V/avclYkt59X+h8Zu49tM1ZPbJyydpycUiaRmQkhzg0QD6zhJ7XzmlRbyt6lM/nCoI0YDFB6h94o8RLYfdkfqjsDiHJ9onljdWck1WIYPCnAnaJechmE/wC9sFaXw1cKdsFZIYdCBrc/Tqzd3CS/AK5xpSK8v6/UAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Macro Dash\"\n        title=\"Macro Dash\"\n        src=\"/static/74c7234ce3901c8300ef383b68c88762/1d69c/macro-dash.png\"\n        srcset=\"/static/74c7234ce3901c8300ef383b68c88762/4dcb9/macro-dash.png 188w,\n/static/74c7234ce3901c8300ef383b68c88762/5ff7e/macro-dash.png 375w,\n/static/74c7234ce3901c8300ef383b68c88762/1d69c/macro-dash.png 750w,\n/static/74c7234ce3901c8300ef383b68c88762/e4374/macro-dash.png 927w\"\n        sizes=\"(max-width: 750px) 100vw, 750px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><a href=\"https://dash.sasjs.io\">Macro Dash</a> is a free, open-source platformer built with the SASjs framework. You are the DATA stepper: bounce through the WORK library, stomp ERRORs and WARNINGs, collect ampersands, grab the FORMAT 10.2 mushroom for super jumps, and get your report to the portal before the job runs out of steam. One run, all levels - amps, health and the speedrun clock carry over. Finish with 0 ERRORs and 0 WARNINGs for the clean-log stamp, then put your SYSUSERID on the dashboard.</p>\n<p>Play it right now: <strong><a href=\"https://dash.sasjs.io\">dash.sasjs.io</a></strong>. It runs on desktop (arrows/WASD, Space to jump, hold Shift to RUN) and mobile (on-screen controls) - the repo is at <a href=\"https://github.com/sasjs/macro-dash\">github.com/sasjs/macro-dash</a>.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 750px; margin-bottom: 1.0725rem;\"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 77.6595744680851%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAIAAACZeshMAAAACXBIWXMAAAsSAAALEgHS3X78AAACWElEQVQoz4WTPU/bQBzGreKXxHZyvpzjOInjs885O3UgSXETEkNeCAgQBdQXQgUdO3To1qF8hqqVqnaqYOrI0m4slbr0i/UMKLJoaaVHp0d+nt/9fSebU3D8p3gzot29/tbJPXNZdW6nqrMqlLvnXy84xR6kJdf6wBujxT07OggGM0T3gTOW7X66o+JYqHTfffzCaY0t4E+BvzEXDHcq3SO0dACb+9byi8L93XwqZdKCzay7/uHzGSeX22KhLiH/WszzudqCavE5S4TuQq7K520REgkF805G9xVvI4Gz5pIACWPEAhU0l+1lRM/1zjMjOmLH0ztPi53DnBMLwBERvaqxSXWZsMnnabjOTNZsVfvH5ehJpTczgtjqzaz4JE9W/w8nvEZUvabqWDMJ9heBYQMDC5rD3mveuRNmpUyxwUnVye7xy9ennFjJ6A0J0VThXzDLKK+Rqt9zF9cE6N0i74Chx6oLwNWsdjWIK8GgSB567XWDdNlDFokF724YUcUMtVq76EY4HNnhkJFsRfiBZrVy5eb82Gm4lWyJqFwKCzgq0VizOgYZFJwetCPdXYE4Mukq80qpmXwIiEo6lck0gTNGyAOb3ScPMJ/HEiKi7mYMT9K9TNG7NtlS/aYArm4eOmzy+09nHKDrOTfOk2EibwibY9Sa6J0JDJlJBJsj1B6DelIAdMo6wBtlyfTi2yUHgm3YPFDJ6EbuSHVGCk7WtBRnTQsfuZtv9M6hSoZ8uXf54xeHh6/C3bd5f1u2eorN/rjB3xSzFARb9Z1TtPRYqa3w5e73y5+/Aekfi9NPD6OYAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Macro Dash (repo)\"\n        title=\"Macro Dash (repo)\"\n        src=\"/static/a8351118e974ba89aeaea249334ae97a/1d69c/macro-dash-repo.png\"\n        srcset=\"/static/a8351118e974ba89aeaea249334ae97a/4dcb9/macro-dash-repo.png 188w,\n/static/a8351118e974ba89aeaea249334ae97a/5ff7e/macro-dash-repo.png 375w,\n/static/a8351118e974ba89aeaea249334ae97a/1d69c/macro-dash-repo.png 750w,\n/static/a8351118e974ba89aeaea249334ae97a/1cfc2/macro-dash-repo.png 900w\"\n        sizes=\"(max-width: 750px) 100vw, 750px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2>But it is not really a game</h2>\n<p>Behind the pixels, Macro Dash is a working demonstration of how to craft and deploy <strong>data-powered web apps on SAS</strong> - the same architecture behind production applications like <a href=\"https://datacontroller.io\">Data Controller</a>:</p>\n<ul>\n<li><strong>A frontend</strong> (plain HTML/JS canvas, strict CSP, no framework) streamed directly from SAS - no separate web tier to build, secure or maintain.</li>\n<li><strong>Backend services written in SAS</strong> (<code class=\"language-text\">sasjs/services/</code>) that receive tables from the browser, run SAS code, and return JSON. The game uses three: <code class=\"language-text\">configure</code>, <code class=\"language-text\">getscores</code>, <code class=\"language-text\">savescore</code> - a complete, persistent, server-side leaderboard.</li>\n<li><strong>One codebase, every flavour of SAS</strong>: deploy to SAS Viya, SAS 9 EBI or <a href=\"https://github.com/sasjs/server\">SASjs Server</a> with a single command (<code class=\"language-text\">sasjs cbd</code>), using <a href=\"https://github.com/sasjs/cli\">@sasjs/cli</a> and the <a href=\"https://github.com/sasjs/core\">@sasjs/core</a> macro library.</li>\n<li><strong>Graceful degradation</strong>: with no backend reachable, the game falls back to localStorage mode (personal best, no leaderboard) - the same pattern you want in resilient production apps.</li>\n</ul>\n<p>If you can build this, you can build a data capture form, an approvals workflow, a parameter manager or a reporting portal on your own SAS platform. The design decisions are documented in <code class=\"language-text\">PLAN.md</code> and <code class=\"language-text\">AGENTS.md</code>; the services are deliberately small and readable.</p>\n<h2>Deploy to SAS Viya in one line - no install</h2>\n<p>Every release ships a single self-contained deploy script - <code class=\"language-text\">macro-dash-viya.sas</code> - that streams the frontend and installs the backend services straight onto the SAS Files Service. No Node, no <code class=\"language-text\">@sasjs/cli</code>, no build step: run it from SAS Studio, SAS Enterprise Guide, or any batch SAS session.</p>\n<div class=\"gatsby-highlight\" data-language=\"sas\"><pre class=\"language-sas\"><code class=\"language-sas\"><span class=\"token macro-keyword keyword\">%let</span> apploc<span class=\"token operator\">=</span><span class=\"token operator\">/</span>your<span class=\"token operator\">/</span>viya<span class=\"token operator\">/</span>folder<span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">filename</span> md url <span class=\"token string\">\"https://github.com/sasjs/macro-dash/releases/latest/download/macro-dash-viya.sas\"</span><span class=\"token punctuation\">;</span>\n<span class=\"token macro-keyword keyword\">%inc</span> md<span class=\"token punctuation\">;</span></code></pre></div>\n<p>That is the whole deployment. Set <code class=\"language-text\">apploc</code> to wherever you want the app to live on the Files Service (it is created if it does not exist), and the script does the rest: uploads the streamed <code class=\"language-text\">MacroDash.html</code> + assets, registers the <code class=\"language-text\">configure</code> / <code class=\"language-text\">getscores</code> / <code class=\"language-text\">savescore</code> services, and prints the app URL when done:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">&lt;SAS Viya base>/SASJobExecution?_FILE=/your/viya/folder/services/MacroDash.html</code></pre></div>\n<p>Open that URL and the game loads. On first visit you get an in-game <strong>configuration screen</strong> - pick a results folder for the leaderboard (a physical folder SAS can write <code class=\"language-text\">scores.sas7bdat</code> to), optionally choose the compute context and a <code class=\"language-text\">runAsTask</code> / <code class=\"language-text\">useComputeApi</code> execution mode, and submit. The <code class=\"language-text\">configure</code> service writes <code class=\"language-text\">settings.sas</code> into your apploc and flips <code class=\"language-text\">configured=\"true\"</code> in the streamed <code class=\"language-text\">MacroDash.html</code>, so every subsequent load skips setup and the leaderboard is live for everyone.</p>\n<h2>Deploy from source / to other platforms</h2>\n<p>The release artefact is built by CI from <code class=\"language-text\">sasjs/</code> on every push to <code class=\"language-text\">main</code>. To build and deploy directly from a checkout (e.g. for SAS 9 or SASjs Server, or to push to Viya without the release script), the targets live in <code class=\"language-text\">sasjs/sasjsconfig.json</code>:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">sasjs cbd -t viya      <span class=\"token comment\"># or: sas9 | server</span></code></pre></div>\n<p><code class=\"language-text\">sasjs cbd</code> compiles the macros + services, builds the streaming web bundle, and deploys a service pack to the target’s <code class=\"language-text\">appLoc</code> in one shot. The <code class=\"language-text\">serverUrl</code> is left blank in the shipped config - set it to your own SAS Viya / SASjs Server instance (and adjust <code class=\"language-text\">appLoc</code>, <code class=\"language-text\">contextName</code>, etc.) before deploying. The public game on <a href=\"https://dash.sasjs.io\">dash.sasjs.io</a> is the backend-free GitHub Pages build.</p>\n<h2>Local development (no SAS required)</h2>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">npm</span> <span class=\"token function\">install</span>\n<span class=\"token function\">npm</span> run devsetup</code></pre></div>\n<p><code class=\"language-text\">devsetup</code> downloads the <code class=\"language-text\">@sasjs/server</code> binary for your platform, writes a <code class=\"language-text\">.env</code> (desktop mode, JS runtime - no SAS installation needed), starts the server on port 5000, deploys the app (<code class=\"language-text\">sasjs cbd -t local</code>) and the JS mocks, then prints the URL:</p>\n<p><strong><a href=\"http://localhost:5000/AppStream/MacroDash/\">http://localhost:5000/AppStream/MacroDash/</a></strong></p>\n<p>The four backend services are executable JS mocks that shadow the <code class=\"language-text\">.sas</code> services, so the leaderboard works end-to-end against a local SASjs Drive - no SAS licence required to develop.</p>\n<h2>Summary</h2>\n<p>Macro Dash is a fun way to see what SASjs makes possible. Play it at <a href=\"https://dash.sasjs.io\">dash.sasjs.io</a>, and if you would like to build data-powered apps on your own SAS estate - or partner with us on a project - <a href=\"/contact\">get in touch</a>.</p>\n<hr>","frontmatter":{"title":"Macro Dash - A SAS-Powered Game on SASjs","featuredImage":{"childImageSharp":{"fixed":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAIAAAAf7rriAAAACXBIWXMAAAsSAAALEgHS3X78AAAC5UlEQVQ4y3WU23PSQBTGGUsICbmRkJBASLJJIKElUGqLkhLCpViBtlxqrdbL+OCDPvigz9ZxxvH/9izR2jp25jcnJ5vz7X672d1UzgxzZpex7oLCTPlhORiNl++IUjtnde9gbDDDFCjpSo/SY0rvZ/UIIqYcSTsrtX1ptC+K/ivWGFOVPl2JMWacswcYEIOyHE0bl2fbzxbBxcpbz+vnp7X1rPHyfPvF2l5N/edLe3mMFhN0NkHriTkc6X6kB0OhNk6xDjwiWjXpkpsrubTmYEo2rSJKQ1nVyqomJL8pIUpBpGDQSk3wJinWHbJWRHCIlj2qUEtI8y5xH0KVyLukvM0nYsY6FP2JEb7VH13pnReV7pucfkAIVkasZkT3P+SdrFL/LWbRISl5lLZHqbt0aY8u72flOlTcEUhVgNzEW2JnwFdH8EIVA6rYgA+EYN4ooZrEiZPmTYI3H7AWJBkBZZWNbQZFSvuZun+lHrwGYGRCsG8Mb3EIz7DgcVaXrPR6/V076GyJflb2k5GHnBND92AVmjJSLXGY4AQRW6xSip+vT8Xtk9LuXGmdZdUmicVPkgULt3Ia+Elzxm0I3vIH74zuK+3hRaG5VlrrNI8e0MU0q4MpvnaUYuxYbJxwTp93B3+I/0Z/KgWLQnMht1aF5hI2Bl/FTvP+UaExg+0ZGqPP7ukPZ/7dOdkwv803e/YVM8U4s2/29NqeXbuLn/LeJRZz1THnHcMcBP/pvdSngncsBstS+F5qriCH35Sijcdc7YkZf5AaZ5R+QFce3QeptfP1uXdyLQYLUtuFE5Wi9Y7UOg8W11rnDW3CiTv8B9h/4A6Wphy+V/avclYkt59X+h8Zu49tM1ZPbJyydpycUiaRmQkhzg0QD6zhJ7XzmlRbyt6lM/nCoI0YDFB6h94o8RLYfdkfqjsDiHJ9onljdWck1WIYPCnAnaJechmE/wC9sFaXw1cKdsFZIYdCBrc/Tqzd3CS/AK5xpSK8v6/UAAAAAElFTkSuQmCC","width":400,"height":371,"src":"/static/74c7234ce3901c8300ef383b68c88762/497c6/macro-dash.png","srcSet":"/static/74c7234ce3901c8300ef383b68c88762/497c6/macro-dash.png 1x,\n/static/74c7234ce3901c8300ef383b68c88762/2a4de/macro-dash.png 1.5x,\n/static/74c7234ce3901c8300ef383b68c88762/ee604/macro-dash.png 2x"}}},"path":"/macro-dash","category":"SASjs","tags":["SASjs","SAS","Viya","SAS Apps","Open Source"],"description":"Macro Dash is a free, open-source platformer built with the SASjs framework. Play it at dash.sasjs.io, or deploy it to your own SAS Viya, SAS 9 or SASjs Server instance with a single command.","date":"2026/08/19"}}},"pageContext":{}}}