This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************/ | |
/* Example of using JSON libname engine */ | |
/* for discovery, then with a JSON map */ | |
/* Copyright 2016 SAS Institute */ | |
/* written by Chris Hemedinger */ | |
/* http://blogs.sas.com/sasdummy */ | |
/****************************************/ | |
/* split URL for readability */ | |
%let url1=http://communities.sas.com/kntur85557/restapi/vc/categories/id/bi/topics/recent; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://prismjs.com/download.html?themes=prism&languages=sas */ | |
/** | |
* prism.js default theme for JavaScript, CSS and HTML | |
* Based on dabblet (http://dabblet.com) | |
* @author Lea Verou | |
*/ | |
/* for Lithium messages */ | |
/* a very specific style override for SAS language in a PRE tag */ | |
#lia-body .lia-content .lia-message-body pre.language-sas, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prism.languages.sas = { | |
'datalines': { | |
/* fixed datalines pattern to include datalines4 and possible whitespace before terminating ; */ | |
pattern: /(^|[\r\n])\s*(?:(?:data)?lines|cards|datalines4);[\s\S]+?[\r\n](\s)*;/i, | |
lookbehind: true, | |
inside: { | |
'keyword': { | |
pattern: /^(\s*)(?:(?:data)?lines|cards|datalines4)/i, | |
lookbehind: true | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example code publish to Slack channel */ | |
/* Author: Chris Hemedinger */ | |
/* See explanation at: */ | |
/* http://blogs.sas.com/content/sasdummy/slack-channel-with-sas/ */ | |
%macro echoResp(fn=); | |
data _null_; | |
infile &fn; | |
input; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example code to access Pokemon data */ | |
/* Author: Chris Hemedinger */ | |
/* See explanation at: */ | |
/* http://blogs.sas.com/content/sasdummy/build-your-pokemon-library-using-sas */ | |
/* First an example that uses the Pokeapi from SAS */ | |
/* utility macro to put file contents to SAS log */ | |
%macro echoResp(fn=); | |
data _null_; | |
infile &fn; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Your zip file folder location */ | |
%let projectDir = c:\temp; | |
/* macro to assign a fileref to a SAS data set in a Base library */ | |
%macro assignFilerefToDataset(_dataset_name); | |
%local outDsName; | |
ods output EngineHost=File; | |
proc contents data=&_dataset_name.; | |
run; | |
proc sql noprint; | |
select cValue1 into: outDsName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This SAS program uses the ARRPI translator at: | |
http://isithackday.com/arrpi.php | |
To translate whatever English text you supply into | |
Pirate speak for Talk Like a Pirate Day | |
*/ | |
%let text = %sysfunc(urlencode('Hello, SAS users are the best')); | |
filename resp TEMP; | |
proc http |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SasMetadataGetColumns.ps1 | |
# Example usage: | |
# For table grid display, use: | |
# .\SasMetadataGetColumns.ps1 | Out-Gridview | |
# For export to CSV | |
# .\SasMetadataGetColumns.ps1 | Export-Csv -Path "c:\output\cols.csv" -NoTypeInformation | |
# ------------------------------------------------------------------- | |
# create the Integration Technologies objects | |
$objFactory = New-Object -ComObject SASObjectManager.ObjectFactoryMulti2 | |
$objServerDef = New-Object -ComObject SASObjectManager.ServerDef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example of how to use PowerShell to script the | |
# SAS Integration Technologies client | |
# You can connect to a remote SAS Workspace | |
# and run a program, retrieve the SAS log and download a file | |
# To use: change this script to reference your SAS Workspace | |
# node name, port (if different), and user credentials | |
# create the Integration Technologies objects | |
$objFactory = New-Object -ComObject SASObjectManager.ObjectFactoryMulti2 |