mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-10 17:04:36 +00:00
131 lines
12 KiB
HTML
131 lines
12 KiB
HTML
<!doctype html>
|
|
<html class="default no-js">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>sasjs</title>
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="assets/css/main.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="tsd-page-toolbar">
|
|
<div class="container">
|
|
<div class="table-wrap">
|
|
<div class="table-cell" id="tsd-search" data-index="assets/js/search.js" data-base=".">
|
|
<div class="field">
|
|
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
<input id="tsd-search-field" type="text" />
|
|
</div>
|
|
<ul class="results">
|
|
<li class="state loading">Preparing search index...</li>
|
|
<li class="state failure">The search index is not available</li>
|
|
</ul>
|
|
<ul class="results-priority" style="display:none">
|
|
</ul>
|
|
<a href="index.html" class="title">sasjs</a>
|
|
 <a href="https://github.com/macropeople/sasjs" class="title">SASjs on Github</a>
|
|
 <a href="https://sasjs.io" class="title">SASjs.io</a>
|
|
 <a href="https://github.com/macropeople/sasjs-cli" class="title">SASjs CLI</a>
|
|
 <a href="https://github.com/macropeople/react-seed-app" class="title">React Seed App</a>
|
|
</div>
|
|
<div class="table-cell" id="tsd-widgets">
|
|
<div id="tsd-filter">
|
|
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
<div class="tsd-filter-group">
|
|
<div class="tsd-select" id="tsd-filter-visibility">
|
|
<span class="tsd-select-label">All</span>
|
|
<ul class="tsd-select-list">
|
|
<li data-value="public">Public</li>
|
|
<li data-value="protected">Public/Protected</li>
|
|
<li data-value="private" class="selected">All</li>
|
|
</ul>
|
|
</div>
|
|
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
</div>
|
|
</div>
|
|
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tsd-page-title">
|
|
<div class="container">
|
|
<ul class="tsd-breadcrumb">
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="container container-main">
|
|
<div class="row">
|
|
<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
|
|
<nav class="tsd-navigation outline primary">
|
|
<a style="margin-left:0em" href="globals.html">Globals</a>
|
|
<ul style="display:none">
|
|
{"SAS Adapter":{"SASjs":"modules/sasjs","SASjsConfig":"classes/sasjsconfig.sasjsconfig-1","ServerType":"enums/servertype.servertype-1","SASjsRequest":"interfaces/sasjsrequest.sasjsrequest-1","SASjsWaitingRequest":"interfaces/sasjswaitingrequest.sasjswaitingrequest-1"},"SAS Viya API Client":"classes/sasviyaapiclient.sasviyaapiclient-1","SAS 9 API Client":"classes/sas9apiclient.sas9apiclient-1"}
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<div class="col-7 offset-3 col-content">
|
|
<h1>sasjs</h1>
|
|
<div class="tsd-panel tsd-typography">
|
|
<p><a href="https://www.jsdelivr.com/package/npm/sasjs"><img src="https://data.jsdelivr.com/v1/package/npm/sasjs/badge" alt=""></a></p>
|
|
<a href="#sasjs" id="sasjs" style="color: inherit; text-decoration: none;">
|
|
<h1>SASjs</h1>
|
|
</a>
|
|
<p>SASjs is a open-source framework for building Web Apps on SAS® platforms. You can use as much or as little of it as you like. This repository contains the JS adapter, the part that handles the to/from SAS communication on the client side. There are 3 ways to install it:</p>
|
|
<p>1 - <code>npm install sasjs</code> - for use in a node project</p>
|
|
<p>2 - <a href="https://cdn.jsdelivr.net/npm/sasjs/index.js">Download</a> and use a copy of the latest JS file</p>
|
|
<p>3 - Reference directly from the CDN - in which case click <a href="https://www.jsdelivr.com/package/npm/sasjs?tab=collection">here</a> and select "SRI" to get the script tag with the integrity hash.</p>
|
|
<p>If you are short on time and just need to build an app quickly, then check out <a href="https://vimeo.com/393161794">this video</a> and the <a href="https://github.com/macropeople/react-seed-app">react-seed-app</a> which provides some boilerplate.</p>
|
|
<p>For more information on building web apps with SAS, check out <a href="https://sasjs.io">sasjs.io</a></p>
|
|
<a href="#none-of-this-makes-sense--how-do-i-build-an-app-with-it" id="none-of-this-makes-sense--how-do-i-build-an-app-with-it" style="color: inherit; text-decoration: none;">
|
|
<h2>None of this makes sense. How do I build an app with it?</h2>
|
|
</a>
|
|
<p>Ok ok. Deploy this <a href="https://github.com/macropeople/sasjs/blob/master/example.html">example.html</a> file to your web server, and update <code>servertype</code> to <code>SAS9</code> or <code>SASVIYA</code> depending on your backend.</p>
|
|
<p>The backend part can be deployed as follows:</p>
|
|
<pre><code>%let appLoc=/<span class="hljs-built_in">Public</span>/app/readme; <span class="hljs-comment">/* Metadata or Viya Folder location as per SASjs config */</span>
|
|
<span class="hljs-comment">/* compile macros (can also be downloaded & compiled seperately) */</span>
|
|
filename mc url "https://raw.githubusercontent.com/macropeople/macrocore/master/mc_all.sas";
|
|
%inc mc;
|
|
filename ft15f001 <span class="hljs-keyword">temp</span>;
|
|
parmcards4;
|
|
%webout(<span class="hljs-keyword">FETCH</span>) <span class="hljs-comment">/* receive all data as SAS datasets */</span>
|
|
proc <span class="hljs-keyword">sql</span>;
|
|
<span class="hljs-keyword">create</span> <span class="hljs-keyword">table</span> areas <span class="hljs-keyword">as</span> <span class="hljs-keyword">select</span> make,mean(invoice) <span class="hljs-keyword">as</span> avprice
|
|
<span class="hljs-keyword">from</span> sashelp.cars
|
|
<span class="hljs-keyword">where</span> <span class="hljs-keyword">type</span> <span class="hljs-keyword">in</span> (<span class="hljs-keyword">select</span> <span class="hljs-keyword">type</span> <span class="hljs-keyword">from</span> <span class="hljs-keyword">work</span>.fromjs)
|
|
<span class="hljs-keyword">group</span> <span class="hljs-keyword">by</span> <span class="hljs-number">1</span>;
|
|
%webout(<span class="hljs-keyword">OPEN</span>)
|
|
%webout(OBJ,areas)
|
|
%webout(<span class="hljs-keyword">CLOSE</span>)
|
|
;;;;
|
|
%mp_createwebservice(<span class="hljs-type">path</span>=&appLoc/common,<span class="hljs-type">name</span>=getdata)</code></pre><p>You now have a simple web app with a backend service!</p>
|
|
<a href="#more-resources" id="more-resources" style="color: inherit; text-decoration: none;">
|
|
<h1>More resources</h1>
|
|
</a>
|
|
<p>For more information specific to this adapter you can check out this <a href="https://sasjs.io/sasjs/sasjs-adapter/">user guide</a> or the <a href="http://adapter.sasjs.io/">technical</a> documentation. </p>
|
|
<p>For more information on building web apps in general, check out these <a href="https://sasjs.io/training/resources/">resources</a> or contact the <a href="https://www.linkedin.com/in/allanbowe/">author</a> directly.</p>
|
|
</div>
|
|
<!--{"options":"/Users/allan/git/sasjs","tsconfig":"/Users/allan/git/sasjs","inputFiles":["/Users/allan/git/sasjs/src/SAS9ApiClient.ts","/Users/allan/git/sasjs/src/SASViyaApiClient.ts","/Users/allan/git/sasjs/src/SASjs.ts","/Users/allan/git/sasjs/src/index.ts","/Users/allan/git/sasjs/src/types/Context.ts","/Users/allan/git/sasjs/src/types/CsrfToken.ts","/Users/allan/git/sasjs/src/types/Folder.ts","/Users/allan/git/sasjs/src/types/Job.ts","/Users/allan/git/sasjs/src/types/JobResult.ts","/Users/allan/git/sasjs/src/types/Link.ts","/Users/allan/git/sasjs/src/types/SASjsConfig.ts","/Users/allan/git/sasjs/src/types/SASjsRequest.ts","/Users/allan/git/sasjs/src/types/SASjsWaitingRequest.ts","/Users/allan/git/sasjs/src/types/ServerType.ts","/Users/allan/git/sasjs/src/types/Session.ts","/Users/allan/git/sasjs/src/types/index.ts","/Users/allan/git/sasjs/src/utils/asyncForEach.ts","/Users/allan/git/sasjs/src/utils/compareTimestamps.ts","/Users/allan/git/sasjs/src/utils/convertToCsv.ts","/Users/allan/git/sasjs/src/utils/index.ts","/Users/allan/git/sasjs/src/utils/isAuthorizeFormRequired.ts","/Users/allan/git/sasjs/src/utils/isLoginRequired.ts","/Users/allan/git/sasjs/src/utils/isLoginSuccess.ts","/Users/allan/git/sasjs/src/utils/makeRequest.ts","/Users/allan/git/sasjs/src/utils/needsRetry.ts","/Users/allan/git/sasjs/src/utils/parseAndSubmitAuthorizeForm.ts","/Users/allan/git/sasjs/src/utils/parseGeneratedCode.ts","/Users/allan/git/sasjs/src/utils/parseSasViyaLog.ts","/Users/allan/git/sasjs/src/utils/parseSourceCode.ts","/Users/allan/git/sasjs/src/utils/serialize.ts","/Users/allan/git/sasjs/src/utils/splitChunks.ts"],"mode":1,"includeDeclarations":true,"entryPoint":"","exclude":["**/*+(index|.spec|.e2e).ts"],"externalPattern":[],"excludeExternals":true,"excludeNotExported":true,"excludeNotDocumented":false,"excludePrivate":true,"excludeProtected":false,"ignoreCompilerErrors":true,"disableSources":false,"includes":"","media":"","out":"docs","json":"","theme":"./node_modules/typedoc-neo-theme/bin/default","name":"","includeVersion":false,"excludeTags":[],"readme":"","defaultCategory":"Other","categoryOrder":[],"categorizeByGroup":true,"gitRevision":"","gitRemote":"origin","gaID":"","gaSite":"auto","hideGenerator":false,"toc":[],"disableOutputCheck":true,"help":false,"version":false,"plugin":[],"logger":"console","listInvalidSymbolLinks":false,"links":[{"label":"SASjs on Github","url":"https://github.com/macropeople/sasjs"},{"label":"SASjs.io","url":"https://sasjs.io"},{"label":"SASjs CLI","url":"https://github.com/macropeople/sasjs-cli"},{"label":"React Seed App","url":"https://github.com/macropeople/react-seed-app"}],"outline":[{"SAS Adapter":{"SASjs":"modules/sasjs","SASjsConfig":"classes/sasjsconfig.sasjsconfig-1","ServerType":"enums/servertype.servertype-1","SASjsRequest":"interfaces/sasjsrequest.sasjsrequest-1","SASjsWaitingRequest":"interfaces/sasjswaitingrequest.sasjswaitingrequest-1"},"SAS Viya API Client":"classes/sasviyaapiclient.sasviyaapiclient-1","SAS 9 API Client":"classes/sas9apiclient.sas9apiclient-1"}],"disableAutoModuleName":"false"}-->
|
|
</div>
|
|
<div class="col-2 col-menu secondary-menu">
|
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
<ul class="before-current">
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer class="with-border-bottom">
|
|
</footer>
|
|
<div class="container tsd-generator">
|
|
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
</div>
|
|
<div class="overlay"></div>
|
|
<script src="assets/js/main.js"></script>
|
|
<script>if (location.protocol == 'file:') document.write('<script src="assets/js/search.js"><' + '/script>');</script>
|
|
</body>
|
|
</html> |