This file contains 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 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 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 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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 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
%macro listzipcontents (targdir=, outlist=); | |
filename targdir "&targdir"; | |
/* Gather all ZIP files in a given folder */ | |
/* Searches just one folder, not subfolders */ | |
/* for a fancier example see */ | |
/* http://support.sas.com/kb/45/805.html (Full Code tab) */ | |
data _zipfiles; | |
length fid 8; | |
fid=dopen('targdir'); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
/* Which RNG did Thanos use? */ | |
/* https://blogs.sas.com/content/sasdummy/rng-avengers-thanos/ */ | |
/* Using STREAMINIT with the new RNG algorithm argument */ | |
%let algorithm = PCG; | |
data characters; | |
call streaminit("&algorithm.",2018); | |
infile datalines dsd; | |
retain x 0 y 1; | |
length Name $ 60 spared 8 x 8 y 8; |
This file contains 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 |
OlderNewer